Goal: Use Greeks and sentiment features derived from end-of-day (EOD) option snapshots to predict performance of different option strategies (e.g. vertical spreads).
Alpha Vantage, Questrade API, and FRED are used to retrieve historical stock prices, current stock prices, and treasury yields (respectively).
For more details, I have written an article explaining the methodology use in section 4.1 below.
-
Part 1: Closing price, splits and dividends
- Retrieve historical closing prices
- Adjust for splits
- Estimate dividend time series
-
- Retrieve market yields on constant maturity securities
- Convert linearly interpolated interest rates to continuous rates
-
- Filter options data for specified ticker
- Remove errors caused by stock splits
- Adjust options by split factors
- Attach dividend and closing prices on data/exp date(s)
-
- 4.1 - Greeks
- Calculate Greeks from clean option spread
- Delta
- For each of call & put, we parameterize: "skew", in-the-money (ITM) spread, out-of-the-money (OTM) spread
- Interpolation at 1, 2, 3, 6 and 12 months constant maturity
- VIX
- Modified stock-specific VIX calculation based on CBOE VIX
- Parameterization
- Call & put VIXs
- Interpolation at 1, 2, 3, 6 and 12 months constant maturity
- Gamma
- No parameterization yet (future)
- Theta (future)
- 4.2 - Custom Input Features
- Use daily change in open
interest (methodology - EDA) and
volume to parameterize options via linear regression
- Years until expiry vs. adjusted moneyness ratio (7 variations on sample weights)
- Call, put slopes and intercepts (2 parameters per variation)
- Use daily change in open
interest (methodology - EDA) and
volume to parameterize options via linear regression
- 4.1 - Greeks
-
- Fit - For each model type:
- Fit separate sub-models that predict EOD price
[1, 5, 10, 15, 20, 40, 65, 90, 130, 260, 390, 520]
days out - Generate 2-dimensional probability density kernels (1 per sub-model) using multi-variate kernel density estimates
- Fit separate sub-models that predict EOD price
- Predict - For each expiry date in test options data date:
- Use the two nearest sub-model kernels and their discrete predictions to linearly interpolate a 1-dimensional density plot for each [data date, expiration date]
- Model Types:
- Baseline model
- Simply uses previous day's EOD price as predictor for target
- Baseline model with target standardization and autoregression
- XGBoost model
- De-trend target variable to be stationary (ARIMA, Augmented Dickey-Fuller)
- Baseline model
- Fit - For each model type:
-
- Select the most suitable option(s) per [data date, expiration date] based on prediction PDF
- Strategies: