G|Flows, or Greek Flows, provides 30-minute updates for the SPX, NDX, and RUT indexes every Monday-Friday from 9:00am-4:30pm ET.
- Delta, gamma, vanna, and charm exposure for stocks/indexes
- Implied volatility (IV) average
- All expirations
- Current month
- Current monthly OPEX
- 0DTE, if available, otherwise the closest expiration
- Need a refresh? View the meaning behind each greek and how their flows can be interpreted
Compatible with Python versions >=3.9
Install the app's required packages:
$ pip install -r requirements.txt
(Recommended) To keep the package installation local/within a virtual environment, run these before the pip
command:
$ python -m venv venv
$ source venv/bin/activate
Create a .env file in the project's working directory to configure the app, otherwise the app will use default values:
API_URL=YOURAPIURL # For downloading options data. If not set, the app defaults to a CBOE API — see ticker_dwn for info
AUTO_RESPONSE=y # Auto-respond to prompt 'Download recent data? (y/n).' If not set, user input is requested
TICKERS=^SPX,^NDX,^RUT # Default. Choose tickers from https://finance.yahoo.com/lookup (excluding futures)
my_app.py
:
G|Flows uses a scheduler to periodically redownload options data. To disable it, comment out this code
"""
# schedule when to redownload data
sched = BackgroundScheduler(daemon=True)
sched.add_job(
sensor,
CronTrigger.from_crontab(
"0,30 9-16 * * 0-4", timezone=timezone("America/New_York")
),
)
sched.start()
"""
To analyze CSV data, change the is_json value to False within the analyze_data function
def analyze_data(ticker, expir):
# Analyze stored data of specified ticker and expiry
# defaults: json format, timezone 'America/New_York'
result = get_options_data(
ticker,
expir,
is_json=True, # False for CSV
tz="America/New_York",
)
...
For manual updates, CSV-formatted options data can be downloaded here then placed in the data/csv
directory
Upon completion, run the Dash app (available at http://localhost:8050):
$ python my_app.py