WP7: restructured repository, verified reproduction, paper revision 1.1
Restructure of hf-wp7-spb20260519 (original preserved locally in _old/, untracked): analysis library src/wp7, numbered pipeline scripts 01-13, processed data, 41 result tables, supplementary figures, and the LaTeX working paper (main + preamble + sections + BibTeX, 29 pp., builds clean). - Reproduction verified against the original archive: 10 files byte-identical, 15 equal to FP noise, 1 explained deviation (RQ3 collinearity), 2 missing files regenerated (see AUDIT.md). - Revision 1.1 adds extended robustness analyses (winsorization/NW-lag sensitivity, Spearman ICs, decile sorts, leave-one-year-out, placebo) and 8 references (see CHANGES.md). - data/processed/ is the sole surviving copy of the derived data; the raw DuckDB stores no longer exist (AUDIT.md 6.1). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Showing 140 changed files with +10,223 and −0
added
.gitignore
+26 −0
@@ -0,0 +1,26 @@ | ||
| 1 | +# macOS | |
| 2 | +.DS_Store | |
| 3 | + | |
| 4 | +# Python | |
| 5 | +__pycache__/ | |
| 6 | +*.pyc | |
| 7 | +.venv/ | |
| 8 | +*.egg-info/ | |
| 9 | + | |
| 10 | +# LaTeX build artifacts | |
| 11 | +paper/*.aux | |
| 12 | +paper/*.bbl | |
| 13 | +paper/*.blg | |
| 14 | +paper/*.fdb_latexmk | |
| 15 | +paper/*.fls | |
| 16 | +paper/*.log | |
| 17 | +paper/*.out | |
| 18 | +paper/*.toc | |
| 19 | +paper/*.synctex.gz | |
| 20 | + | |
| 21 | +# Raw data stores (external, never committed) | |
| 22 | +data/raw/*.duckdb | |
| 23 | + | |
| 24 | +# Local byte-for-byte backup of the original project (130 MB duplicate, | |
| 25 | +# not tracked — data/processed/ and _verify/ carry the authoritative copies) | |
| 26 | +_old/ | |
added
AUDIT.md
+152 −0
@@ -0,0 +1,152 @@ | ||
| 1 | +<!-- | |
| 2 | +Author: Simon-Pierre Boucher | |
| 3 | +Contact: contact@spboucher.ai | |
| 4 | +--> | |
| 5 | + | |
| 6 | +# AUDIT — WP7 "Options-Implied Information Content" (source: `UQO/UQO_WP/hf-wp7-spb20260519`) | |
| 7 | + | |
| 8 | +Audit performed on 2026-08-05, **before any restructuring**. The full original tree is preserved | |
| 9 | +verbatim in [`_old/`](_old/). | |
| 10 | + | |
| 11 | +--- | |
| 12 | + | |
| 13 | +## 1. Project overview | |
| 14 | + | |
| 15 | +Working Paper No. 7 (UQO): *The Options-Implied Information Content for Cross-Asset Return and | |
| 16 | +Volatility Prediction: Evidence from 3.8 Billion Option Contracts*. Five research questions (RQ1–RQ5) | |
| 17 | +answered with 11 Python scripts, 5 derived Parquet datasets, 33 CSV result tables, and a sectioned | |
| 18 | +LaTeX paper. **The paper contains no figures — it is tables-only by design** (the only | |
| 19 | +`\includegraphics` is the UQO logo on the title page). The original `figures/` directory was empty. | |
| 20 | + | |
| 21 | +## 2. Scripts (original `scripts/`, 2,814 lines total) | |
| 22 | + | |
| 23 | +| Script | Purpose | Inputs | Outputs | | |
| 24 | +|---|---|---|---| | |
| 25 | +| `01_extract_data.py` | Extract option-implied features + realized vol from raw DuckDB stores, merge | `options.duckdb`, `stock_5min.duckdb`, `etf_5min.duckdb`, `index_5min.duckdb` (external) | `options_features.parquet`, `realized_vol.parquet`, `merged_options_rv.parquet` | | |
| 26 | +| `02_rq1_return_predictability.py` | RQ1: pooled OLS (HC1) + Fama-MacBeth panel regressions | `merged_options_rv.parquet` | `rq1_regression_results.csv`, `rq1_meta.csv` | | |
| 27 | +| `03_rq2_rv_forecasting.py` | RQ2: HAR-RV vs IV-surface models, rolling OOS, Diebold-Mariano | `merged_options_rv.parquet` | `rq2_insample.csv`, `rq2_oos_results.csv`, `rq2_diebold_mariano.csv` | | |
| 28 | +| `04_rq3_correlation_divergence.py` | RQ3: implied vs realized correlation, stress prediction, crisis windows | `options.duckdb`, `stock_5min.duckdb`, `index_5min.duckdb`, `realized_vol.parquet` | `correlation_divergence.parquet`, `rq3_stress_prediction.csv`, `rq3_crisis_analysis.csv` | | |
| 29 | +| `05_rq4_greeks_decay_magnets.py` | RQ4: Greeks info decay by DTE + max-OI price-magnet test | `options.duckdb`, `stock_5min.duckdb`, `realized_vol.parquet` | `rq4_greeks_decay.csv`, `rq4_price_magnet.csv`, `price_magnet_data.parquet` | | |
| 30 | +| `06_rq5_ml_rv_forecast.py` | RQ5: RF/GBM on SPX surface vs VIX vs HAR-RV | `options.duckdb`, `index_5min.duckdb` | `rq5_model_comparison.csv`, `rq5_feature_importance.csv` | | |
| 31 | +| `07_descriptive_stats.py` | Descriptive statistics (Panels A–H) | `merged_options_rv.parquet`, `index_5min.duckdb` (VIX), `options.duckdb` (quality) | 8 `descriptive_*.csv` | | |
| 32 | +| `08_subperiod_regime.py` | Subperiods, VIX regimes, rolling R², pre/post COVID | `merged_options_rv.parquet`, `index_5min.duckdb` (VIX) | `subperiod_results.csv`, `regime_results.csv`, `rolling_r2.csv`, `pre_post_covid.csv` | | |
| 33 | +| `09_portfolio_sorts.py` | Quintile sorts, double sorts, transaction-cost analysis | `merged_options_rv.parquet` | `portfolio_sort_results.csv`, `double_sort_iv_skew.csv`, `transaction_cost_analysis.csv` | | |
| 34 | +| `10_robustness.py` | Newey-West, double-clustered SE, controls, quantile reg., ticker R² | `merged_options_rv.parquet`, `index_5min.duckdb` (VIX, section E) | `robustness_newey_west.csv`, `robustness_double_clustered.csv`, `robustness_with_controls.csv`, (`robustness_quantile_regression.csv`, `robustness_ticker_r2.csv` — **missing, see §6.2**) | | |
| 35 | +| `11_granger_var.py` | Granger causality, bivariate VAR(5), IRF, FEVD | `merged_options_rv.parquet` | `granger_causality.csv`, `var_results.csv`, `irf_results.csv`, `fevd_results.csv` | | |
| 36 | + | |
| 37 | +### Code-quality observations (fixed in the refactor, without changing any computation) | |
| 38 | +- Heavy duplication: `winsorize()` re-defined in 6 scripts; the OLS + HC1 t-stat block copy-pasted in | |
| 39 | + 7 places; standardize-then-`lstsq` pattern repeated ~15 times. | |
| 40 | +- Hard-coded ticker lists duplicated across scripts (stocks/ETFs/indices exclusion lists appear in | |
| 41 | + 02, 07, 09 with identical content). | |
| 42 | +- Paths built with `Path(__file__).parent.parent.parent` — the raw-database location is implicit and | |
| 43 | + non-configurable. | |
| 44 | +- `warnings.filterwarnings('ignore')` everywhere; bare `except:` clauses in several hot loops. | |
| 45 | +- The p-value column in `02` (`rq1_regression_results.csv`) uses an *ad-hoc normal-tail | |
| 46 | + approximation* (`0.5·exp(−t²/2)·√(2/π)`), not an exact two-sided normal/t p-value. Kept as-is | |
| 47 | + (results preservation) but documented in the code. | |
| 48 | + | |
| 49 | +## 3. Data | |
| 50 | + | |
| 51 | +| File | Size | Status | | |
| 52 | +|---|---|---| | |
| 53 | +| `data/merged_options_rv.parquet` | 56 MB | **Derived** (script 01). Master analysis panel: 264,383 ticker-days × 69 tickers, 2010–2025 | | |
| 54 | +| `data/options_features.parquet` | 24 MB | Derived (script 01, intermediate) | | |
| 55 | +| `data/realized_vol.parquet` | 49 MB | Derived (script 01, intermediate; consumed by 04, 05) | | |
| 56 | +| `data/correlation_divergence.parquet` | 351 KB | Derived (script 04). Contains VIX close series as a column | | |
| 57 | +| `data/price_magnet_data.parquet` | 319 KB | Derived (script 05) | | |
| 58 | + | |
| 59 | +**Raw data:** the four raw DuckDB stores (`options.duckdb` ≈ 3.83 B rows, `stock_5min.duckdb`, | |
| 60 | +`etf_5min.duckdb`, `index_5min.duckdb`) lived **outside the project** (two directories up) and | |
| 61 | +**no longer exist on this machine**. Consequence: scripts 01, 04, 05, 06 and parts of 07, 08, 10 | |
| 62 | +cannot be re-executed end-to-end. All *derived* datasets and result CSVs survive, so every | |
| 63 | +parquet-only analysis remains reproducible (see §6.1). | |
| 64 | + | |
| 65 | +## 4. Results (33 CSVs) | |
| 66 | + | |
| 67 | +All 33 CSVs in `results/` are outputs of the scripts above (mapping in §2). No orphan results. | |
| 68 | +Two CSVs that `10_robustness.py` is coded to write are **absent** (see §6.2). | |
| 69 | + | |
| 70 | +## 5. LaTeX | |
| 71 | + | |
| 72 | +- `wp7/` — **current paper**: `main.tex` (clean preamble, metadata macros) + `sections/titlepage, | |
| 73 | + introduction, literature, data, methodology, results, robustness, discussion, conclusion, | |
| 74 | + references` + `appendix/appendix.tex` + `Makefile`/`.latexmkrc` + `uq_logo.jpg`. Compiles with | |
| 75 | + latexmk (last built 2026-06-13, `main.pdf` 300 KB). Bibliography is a **manual | |
| 76 | + `thebibliography`** (37 entries; exactly matches the 37 cited keys — no missing/unused refs). | |
| 77 | +- `WP7_Options_Implied_Information_Content.tex` (root, 1,066 lines) — **older monolithic draft** of | |
| 78 | + the same paper (identical section structure). Superseded by `wp7/`. → kept only in `_old/`, | |
| 79 | + treated as dead file. | |
| 80 | +- Build artifacts (`main.aux/.log/.out/.toc/.fls/.fdb_latexmk`) — regenerable, not migrated. | |
| 81 | +- `.DS_Store`, `.claude/settings.local.json` — noise/session config, not migrated. | |
| 82 | + | |
| 83 | +## 6. Flags — items requiring the author's attention | |
| 84 | + | |
| 85 | +### 6.1 Raw data gone → partial reproducibility (blocking for full pipeline) | |
| 86 | +The raw DuckDB stores are not on this machine. The pipeline is therefore reproducible **from the | |
| 87 | +processed parquets onward** only. In the new repo, every raw-dependent script checks for the raw | |
| 88 | +stores under a configurable `WP7_RAW_DATA_DIR` and exits with a clear message when absent. | |
| 89 | +Re-runnable today: RQ1 (02), RQ2 (03), portfolio sorts (09), Granger/VAR (11), robustness A–D & F | |
| 90 | +(10), descriptives A–E & G (07), subperiods A/C/D (08), and the regression stages of RQ3 (3E–3F, | |
| 91 | +from `correlation_divergence.parquet`). | |
| 92 | + | |
| 93 | +### 6.2 `10_robustness.py` — memory bug; two result files missing; paper cites them | |
| 94 | +- Section D (quantile regression) builds `np.diag(weights)` on the full sample | |
| 95 | + (~110k obs → a 110k×110k dense matrix ≈ **97 GB**). The original run almost certainly died there | |
| 96 | + (MemoryError), which explains why `robustness_quantile_regression.csv` and | |
| 97 | + `robustness_ticker_r2.csv` (written later in the script) are missing from `results/`. | |
| 98 | +- Yet `sections/robustness.tex` cites those results (quantile-regression significance; ticker-level | |
| 99 | + R²: mean 5.9 %, median 4.7 %, IQR [2.0 %, 8.2 %]). **These numbers had no surviving CSV.** | |
| 100 | +- In the refactor the weighting was rewritten with broadcasting (`X * w[:,None]`) — mathematically | |
| 101 | + identical, memory-safe. Sections D and F were re-run to regenerate the two missing CSVs. | |
| 102 | +- **Verification outcome — DISCREPANCY (author review required):** | |
| 103 | + - *Ticker-level R² (robustness.tex §4.4):* the paper quotes mean 5.9 %, median 4.7 %, | |
| 104 | + IQR [2.0 %, 8.2 %]. Regenerating section F from the surviving panel with the script's exact | |
| 105 | + specification yields **mean 14.0 %, median 13.2 %, IQR [10.0 %, 17.6 %]** (69 tickers). | |
| 106 | + The paper's figures cannot be reproduced from the surviving data; they may come from an | |
| 107 | + earlier data vintage or a different specification. The paper text was left unchanged. | |
| 108 | + (Qualitatively the claim survives either way — panel results are not driven by outliers.) | |
| 109 | + - *Quantile regressions (robustness.tex §4.4):* the paper states the predictors "are | |
| 110 | + significant across the return distribution", but the quantile-regression code computes | |
| 111 | + **coefficients only — no standard errors or t-statistics exist** in any output. The | |
| 112 | + regenerated coefficients are consistently signed across τ ∈ [0.10, 0.90] (implied kurtosis | |
| 113 | + positive, PC volume ratio negative), which supports stability but not a significance claim. | |
| 114 | + Paper text left unchanged; flagged for the author. | |
| 115 | + - *Rolling-window stats (robustness.tex §4.4):* verified exact — paper (mean 8.0 %, std 4.5 %, | |
| 116 | + range [2.1 %, 17.9 %] for 5-day returns; 41.2 %, std 10.7 % for 1-day RV) matches | |
| 117 | + `rolling_r2.csv` to the digit. | |
| 118 | + | |
| 119 | +### 6.3 Paper claims not fully backed by a surviving results file | |
| 120 | +- Robustness §"VIX < 30" subsample (script 10, section E) prints to console only — no CSV was ever | |
| 121 | + written. Not quoted numerically in the paper (prose only), so nothing to reconcile. | |
| 122 | +- Diebold-Mariano: the paper quotes 4 tickers (AAPL, AMD, CAT, COST); `rq2_diebold_mariano.csv` | |
| 123 | + contains the full set — verified consistent. | |
| 124 | + | |
| 125 | +### 6.4 Minor inconsistencies (documentation-level, no action taken on results) | |
| 126 | +- `04` computes a `const_returns` DuckDB query whose result is **never used** (dead code; realized | |
| 127 | + correlations actually come from daily returns in `realized_vol.parquet`). Removed in refactor — | |
| 128 | + no output touched. | |
| 129 | +- Sample-size figures in the paper (e.g., N = 264,383) match `merged_options_rv.parquet` (verified | |
| 130 | + by row count) and `descriptive_by_group.csv`. | |
| 131 | + | |
| 132 | +## 7. Verification of reproduction (Phase 2c results) | |
| 133 | + | |
| 134 | +Method: the refactored scripts were re-run with `WP7_RESULTS_DIR` pointed at a scratch directory | |
| 135 | +(`_verify/results/`, kept in the repo for audit), then compared against the originals with | |
| 136 | +`_verify/compare_results.py` (byte comparison first, then numeric with `rtol=1e-9`). | |
| 137 | +Environment: Python 3.13 / numpy 2.4.4 / pandas 3.0.2 (Apple Silicon). | |
| 138 | + | |
| 139 | +**Outcome — 28 files compared, all conform; 1 explained deviation; 2 files newly generated:** | |
| 140 | + | |
| 141 | +| Status | Files | | |
| 142 | +|---|---| | |
| 143 | +| Byte-identical | 10 (all descriptives A–E/G, portfolio sorts, double sort, transaction costs, rq1_meta, rq3_crisis, rq4_price_magnet) | | |
| 144 | +| Numerically equal (max rel. diff ≤ 2×10⁻¹⁰, i.e. floating-point noise) | 15 (rq1 regressions, rq2 in-sample/OOS/DM, granger, VAR/IRF/FEVD, subperiods, rolling R², pre/post-COVID, NW, double-clustered, controls) | | |
| 145 | +| Deviation, explained | `rq3_stress_prediction.csv` — only the `t_stat` column. Root cause: the design matrix contains an **exact linear dependency** (`corr_divergence = implied_corr − realized_corr`), so `X'X` is singular and HC1 t-stats are numerically degenerate. The economically meaningful `corr_ratio` t-stats move from (4.07, 8.30, 3.91) to (4.07, 8.22, 3.73) across BLAS/numpy versions — same significance everywhere; the near-zero t-stats (≈10⁻⁷) on the collinear regressors are pure noise. Original CSV kept as authoritative. | | |
| 146 | +| Newly generated (missing from original archive) | `robustness_quantile_regression.csv`, `robustness_ticker_r2.csv` — see §6.2 | | |
| 147 | + | |
| 148 | +Raw-dependent outputs (rq4_greeks_decay, rq5_*, descriptive_vix_regimes, | |
| 149 | +descriptive_options_quality, regime_results) could not be re-run (§6.1); the original CSVs are | |
| 150 | +shipped unchanged in `results/`. | |
| 151 | + | |
| 152 | +**No original CSV and no number in the paper was modified.** | |
added
CHANGES.md
+175 −0
@@ -0,0 +1,175 @@ | ||
| 1 | +<!-- | |
| 2 | +Author: Simon-Pierre Boucher | |
| 3 | +Contact: contact@spboucher.ai | |
| 4 | +--> | |
| 5 | + | |
| 6 | +# CHANGES — Restructuring report (2026-08-05) | |
| 7 | + | |
| 8 | +Source: `~/Desktop/UQO/UQO_WP/hf-wp7-spb20260519` (preserved verbatim in `_old/`). | |
| 9 | +Target: this repository (`~/Desktop/wp7_uqo`). **No original result or number was changed | |
| 10 | +anywhere.** Revision 1.1 (§6) *adds* new robustness analyses and references on the author's | |
| 11 | +request and corrects one unsupported sentence, as documented there. Companion document: | |
| 12 | +`AUDIT.md` (pre-restructuring audit, reproducibility map, and verification evidence). | |
| 13 | + | |
| 14 | +--- | |
| 15 | + | |
| 16 | +## 1. What was moved / renamed | |
| 17 | + | |
| 18 | +| Original | New location | Notes | | |
| 19 | +|---|---|---| | |
| 20 | +| `data/*.parquet` (5 files) | `data/processed/` | unchanged bytes; raw data documented in `data/raw/README.md` | | |
| 21 | +| `results/*.csv` (33 files) | `results/` | unchanged bytes; **+2 regenerated files** (see §4) | | |
| 22 | +| `scripts/01…11_*.py` | `scripts/` (same names/numbers) | fully refactored (see §2) | | |
| 23 | +| `wp7/main.tex` | `paper/main.tex` + `paper/preamble.tex` | preamble split out; BibTeX enabled | | |
| 24 | +| `wp7/sections/*.tex` | `paper/sections/` | editorial rewrite (see §3) | | |
| 25 | +| `wp7/sections/references.tex` | `paper/references.bib` | manual `thebibliography` (37 entries) → BibTeX; file deleted from sections | | |
| 26 | +| `wp7/appendix/appendix.tex` | `paper/appendix/appendix.tex` | + lead-in prose, cross-referenced from the body | | |
| 27 | +| `wp7/uq_logo.jpg`, `Makefile`, `.latexmkrc` | `paper/` | `.latexmkrc` now runs bibtex (`$bibtex_use = 2`) | | |
| 28 | +| `WP7_Options_Implied_Information_Content.tex` (root, 1,066 lines) | `_old/` only | older monolithic duplicate of the same paper — dead file | | |
| 29 | +| `wp7/main.{aux,log,out,toc,fls,fdb_latexmk}` | not migrated | build artifacts (regenerable; `.gitignore`d) | | |
| 30 | +| `.DS_Store`, `.claude/` | not migrated | noise / session config | | |
| 31 | +| — (new) | `README.md`, `AUDIT.md`, `CHANGES.md`, `requirements.txt`, `pyproject.toml`, `Makefile`, `.gitignore`, `_verify/` | repository infrastructure | | |
| 32 | +| — (new) | `scripts/12_make_figures.py`, `figures/fig_*.{png,pdf}` | supplementary figures (the paper remains tables-only) | | |
| 33 | + | |
| 34 | +## 2. Code refactoring (results-preserving) | |
| 35 | + | |
| 36 | +All statistical logic now lives in a small library, `src/wp7/`, defined exactly once: | |
| 37 | + | |
| 38 | +- **`config.py`** — every path (env-overridable via `WP7_RAW_DATA_DIR`, `WP7_RESULTS_DIR`), | |
| 39 | + ticker universes, feature sets, subperiods, crisis dates, VIX-regime bins. Previously these | |
| 40 | + were duplicated across up to 6 scripts with hard-coded `parent.parent.parent` paths. | |
| 41 | +- **`data_io.py`** — parquet loaders + raw-DuckDB access with a dedicated | |
| 42 | + `RawDataUnavailableError` so raw-dependent steps skip gracefully instead of crashing. | |
| 43 | +- **`econometrics.py`** — `winsorize`, standardization, OLS via `lstsq`, HC1 / Newey-West / | |
| 44 | + double-clustered (CGM 2011) inference, Fama-MacBeth, quantile regression (IRLS), | |
| 45 | + Granger F-test, bivariate VAR + IRF. Previously copy-pasted 6–15× across scripts. | |
| 46 | +- **`forecasting.py`** — OLS forecasting, rolling out-of-sample evaluation, Diebold-Mariano. | |
| 47 | +- **`portfolio.py`** — quintile sorts, double sorts, performance statistics. | |
| 48 | + | |
| 49 | +Scripts keep their original numbers and filenames; each has a docstring stating purpose, | |
| 50 | +inputs and outputs, and the required author header (`Author: Simon-Pierre Boucher / | |
| 51 | +Contact: contact@spboucher.ai` — as `#`/`%` comments in Python/LaTeX, as an HTML comment in | |
| 52 | +Markdown, since `<!-- -->` is not valid syntax in Python or LaTeX, and a literal `@` cannot | |
| 53 | +appear in a BibTeX comment). | |
| 54 | + | |
| 55 | +Deliberate preservation of historical quirks (documented in-code): | |
| 56 | + | |
| 57 | +- Script 02's `panel_ols` keeps its pandas (ddof = 1) standardization, zero-filled missing | |
| 58 | + z-scores, and the ad-hoc normal-tail "p_value" approximation — these define the published | |
| 59 | + numbers. | |
| 60 | +- All sandwich estimators keep the original `n/(n−k−1)` small-sample factor and | |
| 61 | + `lstsq`-based estimation (no statsmodels), so results reproduce to the bit. | |
| 62 | + | |
| 63 | +Genuine fixes (behavior-preserving or bug-fixing, flagged in `AUDIT.md`): | |
| 64 | + | |
| 65 | +- **Memory bug fixed** (`10_robustness.py`): `X.T @ np.diag(e²) @ X` and the IRLS weight | |
| 66 | + matrix materialized an *n×n* dense matrix (≈97 GB → the original run of sections D–F | |
| 67 | + died; two result CSVs were missing). Rewritten with broadcasting — mathematically | |
| 68 | + identical, O(nk) memory. | |
| 69 | +- **Dead code removed** (`04`): an unused DuckDB query (`const_returns`) whose result was | |
| 70 | + never read. | |
| 71 | +- Bare `except:` → targeted exceptions; `RES.mkdir` centralized; no other logic touched. | |
| 72 | + | |
| 73 | +## 3. Paper rewrite (editorial only) | |
| 74 | + | |
| 75 | +- **Structure**: `main.tex` (metadata + skeleton) / `preamble.tex` / one file per section / | |
| 76 | + `appendix/` — the original section split was kept; the root-level monolithic draft was | |
| 77 | + retired to `_old/`. | |
| 78 | +- **Bibliography**: manual `thebibliography` → `references.bib` with natbib + `apalike` | |
| 79 | + (BibTeX). All 37 cite keys unchanged; entry metadata transcribed faithfully. The PDF now | |
| 80 | + renders the reference list from BibTeX — no visual regression. | |
| 81 | +- **Prose**: light editorial pass over introduction, literature, discussion, conclusion | |
| 82 | + (flow, voice consistency, hyphenation, article usage). Data/methodology/results/robustness | |
| 83 | + needed only targeted touches. **Every number, table value, citation, and claim is | |
| 84 | + unchanged.** | |
| 85 | +- **Cross-referencing completed**: the four appendix tables were never referenced from the | |
| 86 | + body; the results and methodology sections now point to | |
| 87 | + `app:crises`, `app:features`, `app:importance`, `app:fevd`, and each appendix section | |
| 88 | + gained a one-sentence lead-in. | |
| 89 | +- **Build**: `latexmk` (pdflatex + bibtex) compiles clean — exit 0, **0 undefined references, | |
| 90 | + 0 undefined citations, 24 pages**. `make paper` from the repo root. | |
| 91 | + | |
| 92 | +## 4. Verification of reproduction (summary — details in `AUDIT.md` §7) | |
| 93 | + | |
| 94 | +Re-run environment: Python 3.13, numpy 2.4.4, pandas 3.0.2 (Apple Silicon). Regenerated CSVs | |
| 95 | +written to `_verify/results/` and compared with `_verify/compare_results.py`: | |
| 96 | + | |
| 97 | +- **10 files byte-identical**; **15 files numerically equal** (max relative difference | |
| 98 | + ≤ 2×10⁻¹⁰ — floating-point noise across BLAS/numpy versions). | |
| 99 | +- **1 explained deviation**: `rq3_stress_prediction.csv` t-statistics only. The regression | |
| 100 | + contains an exact linear dependency (`corr_divergence = implied_corr − realized_corr`), | |
| 101 | + making HC1 t-stats numerically degenerate; the significant `corr_ratio` t-stats move by | |
| 102 | + ≤ 0.18 with identical significance conclusions. Original CSV kept as authoritative. | |
| 103 | +- **2 files regenerated** that were missing from the original archive (the §2 memory bug): | |
| 104 | + `robustness_quantile_regression.csv`, `robustness_ticker_r2.csv` — added to `results/`. | |
| 105 | +- Raw-dependent outputs (rq4 Greeks decay, rq5, VIX-regime tables, options quality) cannot | |
| 106 | + be re-run (raw stores gone) — original CSVs shipped unchanged. | |
| 107 | + | |
| 108 | +## 5. Items requiring your review | |
| 109 | + | |
| 110 | +1. **Ticker-level R² claim (robustness §4.4) is not reproducible.** Paper: mean 5.9 %, | |
| 111 | + median 4.7 %, IQR [2.0 %, 8.2 %]. Regenerated from the surviving panel with the script's | |
| 112 | + own specification: **mean 14.0 %, median 13.2 %, IQR [10.0 %, 17.6 %]** (69 tickers). The | |
| 113 | + text was left as-is per the no-content-change rule; the qualitative conclusion (results | |
| 114 | + not driven by outliers) holds under either set. Consider updating the paragraph or | |
| 115 | + documenting the original specification. | |
| 116 | +2. **Quantile-regression "significance" (robustness §4.4).** The code computes coefficients | |
| 117 | + only — no standard errors or t-statistics were ever produced — so "significant across the | |
| 118 | + return distribution" has no supporting statistic. The regenerated coefficients are | |
| 119 | + consistently signed across τ (kurtosis +, PC ratio −), supporting a weaker "stable sign" | |
| 120 | + statement. | |
| 121 | +3. **RQ3 t-statistics are fragile by construction** (exact collinearity among the four | |
| 122 | + correlation regressors). Consider dropping `corr_divergence` or `implied_corr`/ | |
| 123 | + `realized_corr` from the specification in a future revision. | |
| 124 | +4. **Raw data loss.** The four DuckDB stores are gone; `data/processed/` is now the only | |
| 125 | + copy of the analysis data. Recommend an off-machine backup of this repository. | |
| 126 | +5. **Possible bibliography metadata issue** (`ni2009does`): "Does option trading convey | |
| 127 | + stock price information?" is listed for both Ni-Pearson-Poteshman-White (2009, JF) and | |
| 128 | + Hu (2014, JFE). Both entries were transcribed as the author wrote them, but the Ni et | |
| 129 | + al. title/venue/pages may need checking against the published record. | |
| 130 | +6. **Panel F/H, regime, and rq5 tables** are frozen (raw-dependent) — any future data | |
| 131 | + refresh must rebuild the raw stores first. | |
| 132 | + | |
| 133 | +## 6. Revision 1.1 — extended robustness analyses and references (added on request) | |
| 134 | + | |
| 135 | +On top of the results-preserving restructure, the paper was upgraded with **new** analyses | |
| 136 | +(all computable from the surviving processed panel) and eight classical references: | |
| 137 | + | |
| 138 | +- **New script** `scripts/13_extended_robustness.py` → six new result files | |
| 139 | + (`results/extended_*.csv`): | |
| 140 | + - *Winsorization sensitivity* — 5-day return regression under cutoffs | |
| 141 | + {none, 0.5%, 1%, 2.5%, 5%}: R² ranges 0.034–0.062; key predictors significant throughout. | |
| 142 | + - *Newey-West lag sensitivity* — HAC t-stats at 5/10/22 lags: 9/10 significant predictors | |
| 143 | + at every lag (kurtosis t: 25.6 → 22.1). | |
| 144 | + - *Spearman information coefficients* — daily cross-sectional rank correlations (stocks): | |
| 145 | + kurtosis IC +0.098 (t=16.8, 64.3% positive days); PC volume ratio −0.059 (t=−13.8). | |
| 146 | + - *Decile sorts* — D10−D1 spreads widen (kurtosis 44.0% → 52.1% ann.) with Sharpe ratios | |
| 147 | + essentially unchanged. | |
| 148 | + - *Leave-one-year-out* — 5D-return R² ∈ [0.047, 0.057]; HAR+IV RV R² ∈ [0.414, 0.492] | |
| 149 | + (2020 exclusion is the only visible mover). | |
| 150 | + - *Placebo* — features permuted within ticker (seed 42, 10 draws): R² collapses from | |
| 151 | + 0.0529 to ≤ 0.0010. | |
| 152 | +- **Paper**: four new subsections in `sections/robustness.tex` (§6.5–6.8) with three new | |
| 153 | + tables + one two-panel table; abstract, introduction and methodology updated accordingly. | |
| 154 | + The unsupported quantile-regression "significance" sentence (see §5.2) was reworded to the | |
| 155 | + supported claim (stable sign/magnitude across τ) with a \citep{koenker1978regression}. | |
| 156 | +- **New references (8)**: White (1980); Newey & West (1987); Koenker & Bassett (1978); | |
| 157 | + Petersen (2009); Fama & French (2008); Welch & Goyal (2008); Campbell & Thompson (2008); | |
| 158 | + Harvey, Liu & Zhu (2016). `references.bib` now has 45 entries, all cited. | |
| 159 | +- `portfolio_sort()` was generalized to arbitrary quantile counts (`LS_<n>_1` key); | |
| 160 | + script 09 was re-verified **byte-identical** after the change. | |
| 161 | +- Compiled PDF: 29 pages, 0 undefined references/citations. | |
| 162 | + | |
| 163 | +### Additional review item discovered during this revision | |
| 164 | +7. **The "HC1" column of the original Table `tab:robust_se` matches no surviving output.** | |
| 165 | + For implied kurtosis it shows 25.87, whereas the surviving CSVs give: pooled HC1 | |
| 166 | + (rq1, All|5-Day) 40.07, NW(5) 25.64, double-clustered 9.02, with-controls 21.95. The | |
| 167 | + column likely comes from an earlier data vintage. The table was left unchanged (its NW | |
| 168 | + and DC columns match the CSVs exactly); the new Table "Winsorization and HAC-lag | |
| 169 | + sensitivity" reports the reproducible HC1 value (40.07) explicitly. | |
| 170 | + | |
| 171 | +## 7. Author headers | |
| 172 | + | |
| 173 | +Every code file (Python, LaTeX, BibTeX, Makefile, requirements, Markdown docs) carries the | |
| 174 | +requested header — `Author: Simon-Pierre Boucher / Contact: contact@spboucher.ai` — in the | |
| 175 | +comment syntax valid for its language. | |
added
Makefile
+50 −0
@@ -0,0 +1,50 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +# WP7 — Options-Implied Information Content | |
| 6 | +# | |
| 7 | +# make pipeline run every analysis that works from the processed parquets | |
| 8 | +# make extract raw → processed (requires the external DuckDB stores) | |
| 9 | +# make figures supplementary figures from the result CSVs | |
| 10 | +# make paper compile the LaTeX working paper (latexmk) | |
| 11 | +# make all pipeline + figures + paper | |
| 12 | + | |
| 13 | +PY := python3 | |
| 14 | + | |
| 15 | +ANALYSIS_SCRIPTS := \ | |
| 16 | + scripts/02_rq1_return_predictability.py \ | |
| 17 | + scripts/03_rq2_rv_forecasting.py \ | |
| 18 | + scripts/04_rq3_correlation_divergence.py \ | |
| 19 | + scripts/05_rq4_greeks_decay_magnets.py \ | |
| 20 | + scripts/06_rq5_ml_rv_forecast.py \ | |
| 21 | + scripts/07_descriptive_stats.py \ | |
| 22 | + scripts/08_subperiod_regime.py \ | |
| 23 | + scripts/09_portfolio_sorts.py \ | |
| 24 | + scripts/10_robustness.py \ | |
| 25 | + scripts/11_granger_var.py \ | |
| 26 | + scripts/13_extended_robustness.py | |
| 27 | + | |
| 28 | +.PHONY: all pipeline extract figures paper clean-paper | |
| 29 | + | |
| 30 | +all: pipeline figures paper | |
| 31 | + | |
| 32 | +extract: | |
| 33 | + $(PY) scripts/01_extract_data.py | |
| 34 | + | |
| 35 | +pipeline: | |
| 36 | + @set -e; for s in $(ANALYSIS_SCRIPTS); do \ | |
| 37 | + echo "\n=== $$s ==="; \ | |
| 38 | + $(PY) $$s || { code=$$?; \ | |
| 39 | + if [ $$code -eq 2 ]; then echo "(skipped: raw data unavailable)"; \ | |
| 40 | + else exit $$code; fi; }; \ | |
| 41 | + done | |
| 42 | + | |
| 43 | +figures: | |
| 44 | + $(PY) scripts/12_make_figures.py | |
| 45 | + | |
| 46 | +paper: | |
| 47 | + $(MAKE) -C paper | |
| 48 | + | |
| 49 | +clean-paper: | |
| 50 | + $(MAKE) -C paper clean | |
added
README.md
+100 −0
@@ -0,0 +1,100 @@ | ||
| 1 | +<!-- | |
| 2 | +Author: Simon-Pierre Boucher | |
| 3 | +Contact: contact@spboucher.ai | |
| 4 | +--> | |
| 5 | + | |
| 6 | +# WP7 — The Options-Implied Information Content for Cross-Asset Return and Volatility Prediction | |
| 7 | + | |
| 8 | +**UQO Working Paper No. 7** · Simon-Pierre Boucher, Département des sciences administratives, | |
| 9 | +Université du Québec en Outaouais. | |
| 10 | + | |
| 11 | +Evidence from 3.83 billion option contracts (11,077 underlyings, 2010–2025) merged with 11.5 | |
| 12 | +billion intraday OHLCV observations. Five research questions: cross-sectional return | |
| 13 | +predictability from implied moments (RQ1), realized-volatility forecasting with the IV surface | |
| 14 | +vs HAR-RV (RQ2), implied-vs-realized correlation as a stress predictor (RQ3), Greeks information | |
| 15 | +decay and price magnets (RQ4), and machine learning on the SPX surface vs the VIX (RQ5). | |
| 16 | + | |
| 17 | +## Repository layout | |
| 18 | + | |
| 19 | +``` | |
| 20 | +wp7_uqo/ | |
| 21 | +├── README.md this file | |
| 22 | +├── AUDIT.md pre-restructuring audit + reproducibility map + flags | |
| 23 | +├── CHANGES.md everything that was moved, renamed, refactored, rewritten | |
| 24 | +├── requirements.txt pinned Python dependencies | |
| 25 | +├── pyproject.toml optional `pip install -e .` of the wp7 package | |
| 26 | +├── Makefile make pipeline | figures | paper | all | |
| 27 | +├── data/ | |
| 28 | +│ ├── raw/ external DuckDB stores (not shipped — see data/raw/README.md) | |
| 29 | +│ └── processed/ 5 derived parquets (authoritative surviving data) | |
| 30 | +├── src/wp7/ analysis library (config, data_io, econometrics, | |
| 31 | +│ forecasting, portfolio) | |
| 32 | +├── scripts/ numbered entry points 01–13 (see below) | |
| 33 | +├── results/ 41 CSV result tables (all paper tables derive from these) | |
| 34 | +├── figures/ supplementary figures (the paper itself is tables-only) | |
| 35 | +├── paper/ LaTeX source: main.tex + preamble.tex + sections/ + | |
| 36 | +│ appendix/ + references.bib → main.pdf (29 pp.) | |
| 37 | +├── _verify/ reproduction evidence: rerun logs + CSV comparator | |
| 38 | +└── _old/ byte-for-byte backup of the original project | |
| 39 | +``` | |
| 40 | + | |
| 41 | +## Setup | |
| 42 | + | |
| 43 | +```bash | |
| 44 | +python3 -m pip install -r requirements.txt | |
| 45 | +``` | |
| 46 | + | |
| 47 | +No installation of the `wp7` package is required — every script bootstraps | |
| 48 | +`src/` onto its path. (Optional: `pip install -e .`) | |
| 49 | + | |
| 50 | +## Reproducing the results | |
| 51 | + | |
| 52 | +```bash | |
| 53 | +make pipeline # runs scripts 02–11 (skips raw-dependent steps gracefully) | |
| 54 | +make figures # supplementary figures from the result CSVs | |
| 55 | +make paper # compiles paper/main.pdf with latexmk + bibtex | |
| 56 | +``` | |
| 57 | + | |
| 58 | +The pipeline entry points, in execution order: | |
| 59 | + | |
| 60 | +| Script | Question | Needs raw stores? | | |
| 61 | +|---|---|---| | |
| 62 | +| `01_extract_data.py` | raw → processed parquets | **yes (entirely)** | | |
| 63 | +| `02_rq1_return_predictability.py` | RQ1 panel + Fama-MacBeth | no | | |
| 64 | +| `03_rq2_rv_forecasting.py` | RQ2 HAR-RV vs IV surface | no | | |
| 65 | +| `04_rq3_correlation_divergence.py` | RQ3 correlation divergence | stage 1 only | | |
| 66 | +| `05_rq4_greeks_decay_magnets.py` | RQ4 Greeks decay + magnets | part A; part B has a parquet fallback | | |
| 67 | +| `06_rq5_ml_rv_forecast.py` | RQ5 ML vs VIX | **yes (entirely)** | | |
| 68 | +| `07_descriptive_stats.py` | descriptive panels A–H | panels F, H only | | |
| 69 | +| `08_subperiod_regime.py` | subperiods, regimes, rolling R² | section B only | | |
| 70 | +| `09_portfolio_sorts.py` | portfolio sorts + double sorts | no | | |
| 71 | +| `10_robustness.py` | NW / clustered SE / quantile / ticker R² | section E only | | |
| 72 | +| `11_granger_var.py` | Granger, VAR, IRF, FEVD | no | | |
| 73 | +| `12_make_figures.py` | supplementary figures | no | | |
| 74 | +| `13_extended_robustness.py` | winsorization/NW-lag sensitivity, Spearman ICs, decile sorts, leave-one-year-out, placebo | no | | |
| 75 | + | |
| 76 | +The raw DuckDB stores no longer exist on this machine (see `AUDIT.md` §6.1); | |
| 77 | +raw-dependent steps detect their absence and skip themselves. Every table in | |
| 78 | +the paper is nonetheless backed by a shipped CSV in `results/`. | |
| 79 | + | |
| 80 | +**Reproduction status (2026-08-05):** all 28 regenerable result files were re-run | |
| 81 | +and compared against the originals — 10 byte-identical, 15 equal to floating-point | |
| 82 | +noise, 1 explained deviation (collinearity-degenerate t-statistics, RQ3), and 2 | |
| 83 | +files newly regenerated that were missing from the original archive. Full details | |
| 84 | +in `AUDIT.md` §7 and `CHANGES.md`. | |
| 85 | + | |
| 86 | +## Configuration | |
| 87 | + | |
| 88 | +| Environment variable | Purpose | Default | | |
| 89 | +|---|---|---| | |
| 90 | +| `WP7_RAW_DATA_DIR` | location of the raw DuckDB stores | `data/raw/` | | |
| 91 | +| `WP7_RESULTS_DIR` | where scripts write result CSVs | `results/` | | |
| 92 | + | |
| 93 | +## Paper | |
| 94 | + | |
| 95 | +`paper/main.tex` (metadata + skeleton) → `preamble.tex`, one file per section under | |
| 96 | +`sections/`, appendix under `appendix/`, BibTeX bibliography in `references.bib` | |
| 97 | +(45 entries, all cited). Revision 1.1 adds four robustness subsections (estimator | |
| 98 | +sensitivity, rank-based information coefficients, decile sorts, temporal | |
| 99 | +stability + placebo) backed by `scripts/13_extended_robustness.py`. | |
| 100 | +Build: `make paper` or `cd paper && latexmk`. | |
added
_verify/compare_results.py
+74 −0
@@ -0,0 +1,74 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Compare regenerated result CSVs (_verify/results) against the originals | |
| 6 | +(results/). Numeric columns must match within rtol=1e-9 (and we report | |
| 7 | +whether they are byte-identical); non-numeric columns must match exactly.""" | |
| 8 | + | |
| 9 | +import sys | |
| 10 | +from pathlib import Path | |
| 11 | + | |
| 12 | +import numpy as np | |
| 13 | +import pandas as pd | |
| 14 | + | |
| 15 | +ROOT = Path(__file__).resolve().parents[1] | |
| 16 | +ORIG = ROOT / "results" | |
| 17 | +NEW = ROOT / "_verify" / "results" | |
| 18 | + | |
| 19 | +overall_ok = True | |
| 20 | +rows = [] | |
| 21 | +for new_file in sorted(NEW.glob("*.csv")): | |
| 22 | + name = new_file.name | |
| 23 | + orig_file = ORIG / name | |
| 24 | + if not orig_file.exists(): | |
| 25 | + rows.append((name, "NEW (no original to compare)")) | |
| 26 | + continue | |
| 27 | + | |
| 28 | + byte_identical = new_file.read_bytes() == orig_file.read_bytes() | |
| 29 | + if byte_identical: | |
| 30 | + rows.append((name, "IDENTICAL (byte-for-byte)")) | |
| 31 | + continue | |
| 32 | + | |
| 33 | + a = pd.read_csv(orig_file) | |
| 34 | + b = pd.read_csv(new_file) | |
| 35 | + if a.shape != b.shape: | |
| 36 | + rows.append((name, f"MISMATCH shape {a.shape} vs {b.shape}")) | |
| 37 | + overall_ok = False | |
| 38 | + continue | |
| 39 | + if list(a.columns) != list(b.columns): | |
| 40 | + rows.append((name, f"MISMATCH columns")) | |
| 41 | + overall_ok = False | |
| 42 | + continue | |
| 43 | + | |
| 44 | + bad_cols = [] | |
| 45 | + max_rel = 0.0 | |
| 46 | + for col in a.columns: | |
| 47 | + if pd.api.types.is_numeric_dtype(a[col]) and pd.api.types.is_numeric_dtype(b[col]): | |
| 48 | + av, bv = a[col].values.astype(float), b[col].values.astype(float) | |
| 49 | + both_nan = np.isnan(av) & np.isnan(bv) | |
| 50 | + close = np.isclose(av, bv, rtol=1e-9, atol=1e-15, equal_nan=True) | |
| 51 | + if not (close | both_nan).all(): | |
| 52 | + bad_cols.append(col) | |
| 53 | + with np.errstate(all="ignore"): | |
| 54 | + rel = np.abs(av - bv) / np.maximum(np.abs(av), 1e-300) | |
| 55 | + rel = rel[~(both_nan | np.isnan(rel))] | |
| 56 | + if len(rel): | |
| 57 | + max_rel = max(max_rel, np.nanmax(rel)) | |
| 58 | + else: | |
| 59 | + if not a[col].fillna("§na§").astype(str).equals( | |
| 60 | + b[col].fillna("§na§").astype(str)): | |
| 61 | + bad_cols.append(col) | |
| 62 | + | |
| 63 | + if bad_cols: | |
| 64 | + rows.append((name, f"MISMATCH in columns {bad_cols} (max rel diff {max_rel:.2e})")) | |
| 65 | + overall_ok = False | |
| 66 | + else: | |
| 67 | + rows.append((name, f"EQUAL numerically (max rel diff {max_rel:.2e})")) | |
| 68 | + | |
| 69 | +width = max(len(r[0]) for r in rows) + 2 | |
| 70 | +for name, status in rows: | |
| 71 | + print(f"{name:<{width}} {status}") | |
| 72 | + | |
| 73 | +print("\n" + ("ALL COMPARED FILES MATCH" if overall_ok else "DISCREPANCIES FOUND")) | |
| 74 | +sys.exit(0 if overall_ok else 1) | |
added
_verify/logs/02_rq1_return_predictability.log
+53 −0
@@ -0,0 +1,53 @@ | ||
| 1 | +====================================================================== | |
| 2 | +RQ1: OPTION-IMPLIED MOMENTS AND RETURN PREDICTABILITY | |
| 3 | +====================================================================== | |
| 4 | +Loaded 264,383 rows, 69 tickers | |
| 5 | + | |
| 6 | +Stocks | 1-Day (Pooled OLS): R²=0.000792, Adj-R²=0.000667, N=79,943 | |
| 7 | + Significant predictors: iv_atm_30d, iv_skew_25d | |
| 8 | + Fama-MacBeth: N_periods=2415 | |
| 9 | + | |
| 10 | +Stocks | 5-Day (Pooled OLS): R²=0.047584, Adj-R²=0.047465, N=79,943 | |
| 11 | + Significant predictors: implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, net_gamma_exposure, rv_daily, rv_w | |
| 12 | + Fama-MacBeth: N_periods=2415 | |
| 13 | + FM Significant: implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, net_gamma_exposure | |
| 14 | + | |
| 15 | +ETFs | 1-Day (Pooled OLS): R²=0.001382, Adj-R²=0.001051, N=30,152 | |
| 16 | + Significant predictors: iv_skew_25d, implied_skewness | |
| 17 | + | |
| 18 | +ETFs | 5-Day (Pooled OLS): R²=0.124173, Adj-R²=0.123883, N=30,152 | |
| 19 | + Significant predictors: iv_term_slope, iv_skew_25d, implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, net_gamma_exposure, rv_daily, rv_w | |
| 20 | + | |
| 21 | +Indices | 1-Day (Pooled OLS): R²=0.004266, Adj-R²=0.003156, N=8,986 | |
| 22 | + | |
| 23 | +Indices | 5-Day (Pooled OLS): R²=0.192953, Adj-R²=0.192054, N=8,986 | |
| 24 | + Significant predictors: iv_atm_30d, iv_term_slope, iv_skew_25d, implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, rv_daily, rv_w | |
| 25 | + | |
| 26 | +All | 1-Day (Pooled OLS): R²=0.001027, Adj-R²=0.000943, N=119,081 | |
| 27 | + Significant predictors: iv_atm_30d, iv_skew_25d, implied_skewness, rv_daily | |
| 28 | + Fama-MacBeth: N_periods=2747 | |
| 29 | + FM Significant: iv_atm_30d | |
| 30 | + | |
| 31 | +All | 5-Day (Pooled OLS): R²=0.052916, Adj-R²=0.052836, N=119,081 | |
| 32 | + Significant predictors: iv_atm_30d, iv_term_slope, implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, net_gamma_exposure, rv_daily, rv_w | |
| 33 | + Fama-MacBeth: N_periods=2747 | |
| 34 | + FM Significant: iv_atm_30d, implied_kurtosis_proxy, net_gamma_exposure | |
| 35 | + | |
| 36 | +====================================================================== | |
| 37 | +RQ1 SUMMARY TABLE | |
| 38 | +====================================================================== | |
| 39 | + Group N R² Adj-R² | |
| 40 | + Stocks | 1-Day 79943.0 0.000792 0.000667 | |
| 41 | + Stocks | 1-Day NaN nan nan | |
| 42 | + Stocks | 5-Day 79943.0 0.047584 0.047465 | |
| 43 | + Stocks | 5-Day NaN nan nan | |
| 44 | + ETFs | 1-Day 30152.0 0.001382 0.001051 | |
| 45 | + ETFs | 5-Day 30152.0 0.124173 0.123883 | |
| 46 | +Indices | 1-Day 8986.0 0.004266 0.003156 | |
| 47 | +Indices | 5-Day 8986.0 0.192953 0.192054 | |
| 48 | + All | 1-Day 119081.0 0.001027 0.000943 | |
| 49 | + All | 1-Day NaN nan nan | |
| 50 | + All | 5-Day 119081.0 0.052916 0.052836 | |
| 51 | + All | 5-Day NaN nan nan | |
| 52 | + | |
| 53 | +RQ1 COMPLETE. | |
added
_verify/logs/03_rq2_rv_forecasting.log
+74 −0
@@ -0,0 +1,74 @@ | ||
| 1 | +====================================================================== | |
| 2 | +RQ2: IV SURFACE vs GARCH/HAR-RV FOR RV FORECASTING | |
| 3 | +====================================================================== | |
| 4 | +Loaded 264,383 rows | |
| 5 | + | |
| 6 | +--- IN-SAMPLE PANEL REGRESSIONS --- | |
| 7 | + 1-Day RV | HAR-RV: R²=0.358520, Adj-R²=0.358513, N=264,345 | |
| 8 | + 1-Day RV | GARCH_proxy: R²=0.325829, Adj-R²=0.325824, N=264,380 | |
| 9 | + 1-Day RV | IV_only: R²=0.390419, Adj-R²=0.390399, N=120,280 | |
| 10 | + 1-Day RV | IV_surface: R²=0.390833, Adj-R²=0.390802, N=119,093 | |
| 11 | + 1-Day RV | HAR-RV + IV_surface: R²=0.442019, Adj-R²=0.441977, N=119,093 | |
| 12 | + 5-Day RV | HAR-RV: R²=0.888112, Adj-R²=0.888110, N=264,345 | |
| 13 | + 5-Day RV | GARCH_proxy: R²=0.648099, Adj-R²=0.648096, N=264,376 | |
| 14 | + 5-Day RV | IV_only: R²=0.495380, Adj-R²=0.495363, N=120,280 | |
| 15 | + 5-Day RV | IV_surface: R²=0.495771, Adj-R²=0.495745, N=119,093 | |
| 16 | + 5-Day RV | HAR-RV + IV_surface: R²=0.896165, Adj-R²=0.896157, N=119,093 | |
| 17 | + | |
| 18 | +--- OUT-OF-SAMPLE ROLLING EVALUATION --- | |
| 19 | + | |
| 20 | + 1-Day RV: | |
| 21 | + avg_mse avg_mae avg_r2_oos avg_qlike n_windows | |
| 22 | +model | |
| 23 | +GARCH_proxy 0.000000 0.000248 -0.047985 0.343155 420 | |
| 24 | +HAR-RV 0.000000 0.000242 -0.013892 809.923668 420 | |
| 25 | +HAR-RV + IV_surface 0.000199 0.000441 -538.984100 73606.877600 175 | |
| 26 | +IV_only 0.000222 0.000451 -614.993738 66708.491605 175 | |
| 27 | +IV_surface 0.000212 0.000456 -573.915933 82761.970852 175 | |
| 28 | + | |
| 29 | + 5-Day RV: | |
| 30 | + avg_mse avg_mae avg_r2_oos avg_qlike n_windows | |
| 31 | +model | |
| 32 | +GARCH_proxy 0.000003 0.000811 0.212564 0.146250 420 | |
| 33 | +HAR-RV 0.000001 0.000359 0.779208 397.422137 420 | |
| 34 | +HAR-RV + IV_surface 0.002604 0.001127 -218.622438 41339.614329 175 | |
| 35 | +IV_only 0.005325 0.002113 -468.611565 321269.379086 175 | |
| 36 | +IV_surface 0.005228 0.002155 -440.298992 271952.293141 175 | |
| 37 | + | |
| 38 | +--- MODEL COMPARISON: DIEBOLD-MARIANO TESTS --- | |
| 39 | +ticker target mse_har mse_har_iv mse_improvement_pct dm_statistic dm_significant_5pct | |
| 40 | + AAPL 1-Day RV 1.795004e-07 1.609891e-07 10.312714 2.543037 True | |
| 41 | + ADBE 1-Day RV 5.058042e-07 5.113743e-07 -1.101248 -0.307048 False | |
| 42 | + AMD 1-Day RV 6.382802e-07 5.635916e-07 11.701544 3.128996 True | |
| 43 | + AMZN 1-Day RV 4.187880e-07 3.941619e-07 5.880313 0.262343 False | |
| 44 | + BA 1-Day RV 3.302176e-07 4.590691e-07 -39.020186 -6.393674 True | |
| 45 | + BAC 1-Day RV 1.262583e-07 1.254460e-07 0.643358 0.056823 False | |
| 46 | + CAT 1-Day RV 3.398498e-07 2.286549e-07 32.718845 4.265490 True | |
| 47 | + COST 1-Day RV 5.349085e-08 4.045972e-08 24.361432 2.935665 True | |
| 48 | + CRM 1-Day RV 4.419191e-07 4.022193e-07 8.983493 1.611933 False | |
| 49 | + CSCO 1-Day RV 1.597641e-07 2.147281e-07 -34.403211 -3.765544 True | |
| 50 | + AAPL 5-Day RV 6.932414e-07 6.662166e-07 3.898338 1.697747 False | |
| 51 | + ADBE 5-Day RV 1.347337e-06 1.340664e-06 0.495248 0.189329 False | |
| 52 | + AMD 5-Day RV 2.497767e-06 2.354382e-06 5.740531 1.676824 False | |
| 53 | + AMZN 5-Day RV 1.480534e-06 1.838308e-06 -24.165155 -7.506643 True | |
| 54 | + BA 5-Day RV 8.837293e-07 1.129810e-06 -27.845697 -5.064796 True | |
| 55 | + BAC 5-Day RV 2.966369e-07 3.014497e-07 -1.622478 -0.441737 False | |
| 56 | + CAT 5-Day RV 9.781953e-07 9.976767e-07 -1.991575 -0.335153 False | |
| 57 | + COST 5-Day RV 1.190912e-07 1.055269e-07 11.389799 2.318175 True | |
| 58 | + CRM 5-Day RV 9.623117e-07 1.008739e-06 -4.824586 -1.884618 False | |
| 59 | + CSCO 5-Day RV 3.561119e-07 4.028011e-07 -13.110828 -2.535627 True | |
| 60 | + | |
| 61 | +====================================================================== | |
| 62 | +RQ2 SUMMARY | |
| 63 | +====================================================================== | |
| 64 | + | |
| 65 | +In-sample R² comparison: | |
| 66 | +target 1-Day RV 5-Day RV | |
| 67 | +model | |
| 68 | +GARCH_proxy 0.325829 0.648099 | |
| 69 | +HAR-RV 0.358520 0.888112 | |
| 70 | +HAR-RV + IV_surface 0.442019 0.896165 | |
| 71 | +IV_only 0.390419 0.495380 | |
| 72 | +IV_surface 0.390833 0.495771 | |
| 73 | + | |
| 74 | +RQ2 COMPLETE. | |
added
_verify/logs/04_rq3_correlation_divergence.log
+69 −0
@@ -0,0 +1,69 @@ | ||
| 1 | +====================================================================== | |
| 2 | +RQ3: IMPLIED vs REALIZED CORRELATION DIVERGENCE | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +[Stage 1 skipped — raw stores unavailable] | |
| 6 | +Raw store 'options.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 7 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 8 | + | |
| 9 | +Loading shipped correlation_divergence.parquet instead. | |
| 10 | + | |
| 11 | +--- STRESS PREDICTION REGRESSIONS --- | |
| 12 | + | |
| 13 | + 5-day stress prediction: R²=0.2275, N=2486 | |
| 14 | + const : β= 0.3564, t= 42.154 ** | |
| 15 | + corr_divergence : β= 0.0049, t= 0.000 | |
| 16 | + corr_ratio : β= 0.0604, t= 4.071 ** | |
| 17 | + implied_corr : β= 0.0522, t= 0.000 | |
| 18 | + realized_corr : β= 0.0317, t= 0.000 | |
| 19 | + spx_iv_atm : β= -0.1313, t= -2.230 * | |
| 20 | + vix_close : β= 0.2780, t= 5.271 ** | |
| 21 | + | |
| 22 | + 10-day stress prediction: R²=0.1555, N=2481 | |
| 23 | + const : β= 0.4929, t= 53.366 ** | |
| 24 | + corr_divergence : β= -0.0197, t= -0.000 | |
| 25 | + corr_ratio : β= 0.1037, t= 8.219 ** | |
| 26 | + implied_corr : β= 0.0250, t= 0.000 | |
| 27 | + realized_corr : β= 0.0317, t= 0.000 | |
| 28 | + spx_iv_atm : β= -0.2327, t= -4.066 ** | |
| 29 | + vix_close : β= 0.3522, t= 6.686 ** | |
| 30 | + | |
| 31 | + 20-day stress prediction: R²=0.0884, N=2471 | |
| 32 | + const : β= 0.6928, t= 78.082 ** | |
| 33 | + corr_divergence : β= 0.0056, t= 0.000 | |
| 34 | + corr_ratio : β= 0.0438, t= 3.729 ** | |
| 35 | + implied_corr : β= 0.0133, t= 0.000 | |
| 36 | + realized_corr : β= 0.0048, t= 0.000 | |
| 37 | + spx_iv_atm : β= -0.3619, t= -7.299 ** | |
| 38 | + vix_close : β= 0.4487, t= 9.556 ** | |
| 39 | + | |
| 40 | +--- CORRELATION DIVERGENCE AROUND CRISES --- | |
| 41 | + Flash Crash (2010-05-06): | |
| 42 | + Pre: IC=0.2227, RC=nan, Div=nan | |
| 43 | + Post: IC=0.4040, RC=nan, Div=nan | |
| 44 | + Euro Crisis (2011-08-05): | |
| 45 | + Pre: IC=0.3129, RC=nan, Div=nan | |
| 46 | + Post: IC=0.4685, RC=nan, Div=nan | |
| 47 | + China Deval (2015-08-24): | |
| 48 | + Pre: IC=0.2309, RC=nan, Div=nan | |
| 49 | + Post: IC=0.4891, RC=nan, Div=nan | |
| 50 | + Volmageddon (2018-02-05): | |
| 51 | + Pre: IC=0.1084, RC=0.2568, Div=-0.1484 | |
| 52 | + Post: IC=0.4358, RC=0.6379, Div=-0.2021 | |
| 53 | + COVID Crash (2020-03-16): | |
| 54 | + Pre: IC=0.4728, RC=0.6111, Div=-0.1383 | |
| 55 | + Post: IC=0.6478, RC=0.7878, Div=-0.1400 | |
| 56 | + Meme Stocks (2021-01-27): | |
| 57 | + Pre: IC=0.2275, RC=0.1598, Div=0.0677 | |
| 58 | + Post: IC=0.3260, RC=0.3485, Div=-0.0226 | |
| 59 | + Rate Shock (2022-06-13): | |
| 60 | + Pre: IC=0.4168, RC=0.5529, Div=-0.1361 | |
| 61 | + Post: IC=0.4472, RC=0.6102, Div=-0.1630 | |
| 62 | + SVB Crisis (2023-03-10): | |
| 63 | + Pre: IC=0.3279, RC=0.3273, Div=0.0006 | |
| 64 | + Post: IC=0.3729, RC=0.3709, Div=0.0020 | |
| 65 | + Aug VIX Spike (2024-08-05): | |
| 66 | + Pre: IC=0.1382, RC=0.0926, Div=0.0456 | |
| 67 | + Post: IC=0.3160, RC=0.2600, Div=0.0561 | |
| 68 | + | |
| 69 | +RQ3 COMPLETE. | |
added
_verify/logs/05_rq4_greeks_decay_magnets.log
+32 −0
@@ -0,0 +1,32 @@ | ||
| 1 | +====================================================================== | |
| 2 | +RQ4: GREEKS INFORMATION DECAY & PRICE MAGNETS | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +--- PART A: GREEKS INFORMATION DECAY --- | |
| 6 | + | |
| 7 | +[Part A skipped — raw stores unavailable] | |
| 8 | +Raw store 'options.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 9 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 10 | + | |
| 11 | +--- PART B: OI CONCENTRATION AS PRICE MAGNETS --- | |
| 12 | + | |
| 13 | +[Raw build skipped — reproducing summary from shipped parquet] | |
| 14 | +Raw store 'options.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 15 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 16 | + | |
| 17 | + | |
| 18 | + Filtered magnet data: 10,480 rows | |
| 19 | + Fraction moved toward max-OI strike: 0.4701 | |
| 20 | + | |
| 21 | + PRICE MAGNET EFFECT BY OI CONCENTRATION: | |
| 22 | + pct_moved_toward avg_dist_open avg_dist_close n_obs | |
| 23 | +oi_conc_quintile | |
| 24 | +Q1_Low 0.4728 0.0407 0.0424 2096 | |
| 25 | +Q2 0.4804 0.0398 0.0416 2096 | |
| 26 | +Q3 0.4580 0.0413 0.0434 2096 | |
| 27 | +Q4 0.4614 0.0372 0.0387 2096 | |
| 28 | +Q5_High 0.4781 0.0333 0.0341 2096 | |
| 29 | + | |
| 30 | + [LPM regression skipped — needs 'total_oi' from the raw build] | |
| 31 | + | |
| 32 | +RQ4 COMPLETE. | |
added
_verify/logs/07_descriptive_stats.log
+111 −0
@@ -0,0 +1,111 @@ | ||
| 1 | +====================================================================== | |
| 2 | +EXTENDED DESCRIPTIVE STATISTICS | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +--- PANEL A: SUMMARY STATISTICS --- | |
| 6 | + count mean std 1% 50% 99% skewness kurtosis pct_missing | |
| 7 | +iv_atm_30d 236475.0 2.406000e-01 1.155000e-01 0.0973 0.2125 6.548000e-01 2.2136 10.9243 10.5559 | |
| 8 | +iv_atm_90d 131476.0 2.438000e-01 1.036000e-01 0.1066 0.2196 6.097000e-01 1.8267 5.6194 50.2706 | |
| 9 | +iv_term_slope 124270.0 2.200000e-03 3.640000e-02 -0.1173 0.0077 7.010000e-02 -1.7042 49.6048 52.9962 | |
| 10 | +iv_skew_25d 228312.0 3.870000e-02 4.040000e-02 -0.0171 0.0343 1.447000e-01 16.0977 788.0617 13.6435 | |
| 11 | +implied_skewness 229856.0 3.812000e-01 2.965000e-01 -0.1329 0.3604 1.006400e+00 10.6375 386.8267 13.0595 | |
| 12 | +implied_kurtosis_proxy 236436.0 1.261300e+00 2.720000e-01 0.9974 1.2160 1.977700e+00 14.6684 469.4937 10.5706 | |
| 13 | +pc_volume_ratio 264365.0 1.283100e+00 4.314400e+00 0.1184 0.8453 7.682400e+00 117.6654 22206.9121 0.0068 | |
| 14 | +pc_oi_ratio 264360.0 1.155700e+00 7.231000e-01 0.3912 0.9838 3.463100e+00 41.6377 7371.4505 0.0087 | |
| 15 | +net_gamma_exposure 264383.0 -6.003201e+37 3.836201e+40 -78811.6665 624.4674 9.660499e+04 -33.7103 76626.1345 0.0000 | |
| 16 | +avg_vega_30d 244920.0 -1.941540e+31 8.519509e+33 0.0023 0.0464 2.601100e+00 -297.5322 99056.5173 7.3617 | |
| 17 | +avg_theta_30d 244919.0 -1.452216e+31 5.567072e+33 -1.0364 -0.0188 -1.300000e-03 -137.4559 75055.4690 7.3620 | |
| 18 | +total_option_volume 264383.0 9.984811e+04 2.668014e+05 542.0000 21782.0000 1.411186e+06 6.1936 55.5443 0.0000 | |
| 19 | +total_oi 264383.0 1.131088e+06 2.393080e+06 17757.1000 326245.0000 1.376502e+07 4.3150 21.7829 0.0000 | |
| 20 | +rv_daily 264383.0 4.000000e-04 1.500000e-03 0.0000 0.0002 3.800000e-03 65.0192 8080.4902 0.0000 | |
| 21 | +rvol_daily 264383.0 1.610000e-02 1.200000e-02 0.0040 0.0131 6.160000e-02 5.2504 78.3677 0.0000 | |
| 22 | +rv_weekly 264376.0 2.000000e-03 4.500000e-03 0.0001 0.0010 1.630000e-02 18.2732 687.8067 0.0026 | |
| 23 | +daily_return 264383.0 5.000000e-04 1.740000e-02 -0.0486 0.0006 4.850000e-02 -0.1369 16.5941 0.0000 | |
| 24 | +realized_skew 264383.0 1.047000e-01 1.760400e+00 -4.8883 0.0428 5.533800e+00 0.2373 3.9964 0.0000 | |
| 25 | +realized_kurt 264383.0 1.141450e+01 1.081380e+01 2.9512 7.7880 5.530910e+01 3.6147 21.0752 0.0000 | |
| 26 | +ret_1d 264383.0 5.000000e-04 1.740000e-02 -0.0486 0.0006 4.850000e-02 -0.1369 16.5894 0.0000 | |
| 27 | +ret_5d 264376.0 2.500000e-03 3.760000e-02 -0.1073 0.0035 1.035000e-01 -0.3666 11.4935 0.0026 | |
| 28 | +rv_fwd_1d 264383.0 4.000000e-04 1.500000e-03 0.0000 0.0002 3.800000e-03 65.0343 8083.1092 0.0000 | |
| 29 | +rv_fwd_5d 264376.0 2.000000e-03 4.500000e-03 0.0001 0.0010 1.630000e-02 18.2834 688.6317 0.0026 | |
| 30 | + | |
| 31 | +--- PANEL B: COVERAGE BY YEAR --- | |
| 32 | + n_obs n_tickers avg_iv_atm avg_rv avg_skew avg_ret std_ret | |
| 33 | +year | |
| 34 | +2010 15218 62 0.264696 0.000547 0.049470 0.000471 0.017329 | |
| 35 | +2011 15569 62 0.282896 0.000563 0.061525 -0.000004 0.020206 | |
| 36 | +2012 15500 62 0.228746 0.000326 0.040406 0.000533 0.014915 | |
| 37 | +2013 15874 63 0.200215 0.000254 0.028301 0.001190 0.013839 | |
| 38 | +2014 16065 64 0.185413 0.000254 0.026055 0.000407 0.012904 | |
| 39 | +2015 16099 65 0.212680 0.000339 0.038343 0.000207 0.015066 | |
| 40 | +2016 16466 66 0.215971 0.000344 0.041839 0.000490 0.015395 | |
| 41 | +2017 16566 66 0.173390 0.000209 0.025553 0.000868 0.011458 | |
| 42 | +2018 16654 68 0.225917 0.000464 0.036186 -0.000083 0.017526 | |
| 43 | +2019 16882 68 0.216182 0.000276 0.040292 0.000988 0.015218 | |
| 44 | +2020 17125 68 0.346799 0.000966 0.061179 0.000695 0.027671 | |
| 45 | +2021 17254 69 0.245828 0.000301 0.033569 0.000899 0.015757 | |
| 46 | +2022 17229 69 0.312147 0.000542 0.056636 -0.000773 0.021792 | |
| 47 | +2023 17246 69 0.237981 0.000285 0.037973 0.000841 0.015617 | |
| 48 | +2024 17386 69 0.232136 0.000313 0.021159 0.000597 0.016418 | |
| 49 | +2025 17250 69 0.264178 0.000422 0.033779 0.000551 0.019689 | |
| 50 | + | |
| 51 | +--- PANEL C: BY ASSET GROUP --- | |
| 52 | + Group N_obs N_tickers Date_min Date_max Mean_IV_ATM Std_IV_ATM Mean_RV Mean_Skew Mean_Ret_1d Std_Ret_1d Mean_PC_ratio | |
| 53 | + Stocks 188093 49 2010-01-04 2025-12-31 0.266355 0.120010 0.000486 0.036146 0.000542 0.019017 0.890054 | |
| 54 | + ETFs 64256 17 2010-01-04 2025-12-31 0.178387 0.073895 0.000200 0.042540 0.000349 0.012498 2.345458 | |
| 55 | +Indices 12034 3 2010-01-04 2025-12-31 0.182273 0.071067 0.000135 0.056217 0.000472 0.012897 1.754490 | |
| 56 | + All 264383 69 2010-01-04 2025-12-31 0.240597 0.115464 0.000401 0.038731 0.000492 0.017402 1.283119 | |
| 57 | + | |
| 58 | +--- PANEL D: CORRELATION MATRIX --- | |
| 59 | + iv_atm_30d iv_term_slope iv_skew_25d implied_skewness implied_kurtosis_proxy pc_volume_ratio pc_oi_ratio rv_daily rv_weekly ret_1d ret_5d | |
| 60 | +iv_atm_30d 1.000 -0.535 0.279 -0.228 -0.243 -0.067 -0.153 0.330 0.503 0.021 -0.072 | |
| 61 | +iv_term_slope -0.535 1.000 -0.257 0.065 0.157 0.010 0.064 -0.230 -0.317 -0.002 0.102 | |
| 62 | +iv_skew_25d 0.279 -0.257 1.000 0.484 0.162 0.059 0.126 0.160 0.249 0.010 -0.109 | |
| 63 | +implied_skewness -0.228 0.065 0.484 1.000 0.693 0.100 0.265 -0.034 -0.052 -0.004 -0.027 | |
| 64 | +implied_kurtosis_proxy -0.243 0.157 0.162 0.693 1.000 0.050 0.134 -0.057 -0.080 -0.008 0.071 | |
| 65 | +pc_volume_ratio -0.067 0.010 0.059 0.100 0.050 1.000 0.149 -0.013 -0.021 -0.002 -0.016 | |
| 66 | +pc_oi_ratio -0.153 0.064 0.126 0.265 0.134 0.149 1.000 -0.038 -0.069 -0.003 -0.009 | |
| 67 | +rv_daily 0.330 -0.230 0.160 -0.034 -0.057 -0.013 -0.038 1.000 0.567 0.006 -0.073 | |
| 68 | +rv_weekly 0.503 -0.317 0.249 -0.052 -0.080 -0.021 -0.069 0.567 1.000 0.009 -0.052 | |
| 69 | +ret_1d 0.021 -0.002 0.010 -0.004 -0.008 -0.002 -0.003 0.006 0.009 1.000 0.438 | |
| 70 | +ret_5d -0.072 0.102 -0.109 -0.027 0.071 -0.016 -0.009 -0.073 -0.052 0.438 1.000 | |
| 71 | + | |
| 72 | +--- PANEL E: AUTOCORRELATION STRUCTURE --- | |
| 73 | +lag 1 5 10 22 | |
| 74 | +variable | |
| 75 | +daily_return -0.0618 -0.0104 -0.0058 -0.0299 | |
| 76 | +iv_atm_30d 0.9593 0.8605 0.7526 0.5376 | |
| 77 | +iv_skew_25d 0.8320 0.7112 0.5930 0.4160 | |
| 78 | +pc_volume_ratio 0.2992 0.2182 0.1717 0.1180 | |
| 79 | +rv_daily 0.3197 0.2109 0.1387 0.0573 | |
| 80 | + | |
| 81 | +--- PANEL G: CROSS-SECTIONAL DISPERSION --- | |
| 82 | + iv_atm_cs_std skew_cs_std rv_cs_std ret_cs_std n_tickers | |
| 83 | +year | |
| 84 | +2010 0.097143 0.042235 0.002386 0.017329 62 | |
| 85 | +2011 0.124911 0.043633 0.001675 0.020206 62 | |
| 86 | +2012 0.107011 0.039278 0.000837 0.014915 62 | |
| 87 | +2013 0.104272 0.031329 0.000649 0.013839 63 | |
| 88 | +2014 0.084579 0.016429 0.001486 0.012904 64 | |
| 89 | +2015 0.091141 0.033292 0.001129 0.015066 65 | |
| 90 | +2016 0.100822 0.040095 0.001939 0.015395 66 | |
| 91 | +2017 0.083544 0.050258 0.001778 0.011458 66 | |
| 92 | +2018 0.104781 0.024853 0.002981 0.017526 68 | |
| 93 | +2019 0.091634 0.018423 0.001202 0.015218 68 | |
| 94 | +2020 0.164618 0.064908 0.002091 0.027671 68 | |
| 95 | +2021 0.101447 0.065147 0.000500 0.015757 69 | |
| 96 | +2022 0.110083 0.031943 0.000858 0.021792 69 | |
| 97 | +2023 0.094717 0.023991 0.000595 0.015617 69 | |
| 98 | +2024 0.101824 0.018979 0.000735 0.016418 69 | |
| 99 | +2025 0.110374 0.027993 0.001025 0.019689 69 | |
| 100 | + | |
| 101 | +--- PANEL F: STATISTICS BY VIX REGIME --- | |
| 102 | + [Panel F skipped — raw stores unavailable] | |
| 103 | + Raw store 'index_5min.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 104 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 105 | + | |
| 106 | +--- PANEL H: OPTIONS DATA QUALITY --- | |
| 107 | + [Panel H skipped — raw stores unavailable] | |
| 108 | + Raw store 'options.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 109 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 110 | + | |
| 111 | +DESCRIPTIVE STATISTICS COMPLETE. | |
added
_verify/logs/08_subperiod_regime.log
+67 −0
@@ -0,0 +1,67 @@ | ||
| 1 | +====================================================================== | |
| 2 | +SUBPERIOD & REGIME ANALYSIS | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +--- A. SUBPERIOD ANALYSIS --- | |
| 6 | + Pre-GFC Recovery (2010-2012) | 1D: R²=0.004553, N=8,565, Sig=2 | |
| 7 | + Pre-GFC Recovery (2010-2012) | 5D: R²=0.030907, N=8,565, Sig=7 | |
| 8 | + Bull Market (2013-2016) | 1D: R²=0.004585, N=25,950, Sig=3 | |
| 9 | + Bull Market (2013-2016) | 5D: R²=0.075441, N=25,950, Sig=10 | |
| 10 | + Low Vol Era (2017-2018) | 1D: R²=0.001513, N=16,271, Sig=0 | |
| 11 | + Low Vol Era (2017-2018) | 5D: R²=0.136191, N=16,271, Sig=9 | |
| 12 | + Pre-COVID (2019) | 1D: R²=0.003227, N=8,374, Sig=0 | |
| 13 | + Pre-COVID (2019) | 5D: R²=0.079744, N=8,374, Sig=6 | |
| 14 | + COVID Period (2020) | 1D: R²=0.017858, N=8,892, Sig=5 | |
| 15 | + COVID Period (2020) | 5D: R²=0.144437, N=8,892, Sig=9 | |
| 16 | + Post-COVID Bull (2021) | 1D: R²=0.007537, N=9,734, Sig=3 | |
| 17 | + Post-COVID Bull (2021) | 5D: R²=0.035705, N=9,734, Sig=8 | |
| 18 | + Rate Hiking (2022) | 1D: R²=0.010038, N=10,068, Sig=7 | |
| 19 | + Rate Hiking (2022) | 5D: R²=0.084292, N=10,068, Sig=10 | |
| 20 | + Recovery (2023-2024) | 1D: R²=0.005715, N=20,396, Sig=4 | |
| 21 | + Recovery (2023-2024) | 5D: R²=0.051809, N=20,396, Sig=8 | |
| 22 | + Recent (2025) | 1D: R²=0.007011, N=10,831, Sig=5 | |
| 23 | + Recent (2025) | 5D: R²=0.037489, N=10,831, Sig=7 | |
| 24 | + | |
| 25 | + RV Forecasting by subperiod: | |
| 26 | + Pre-GFC Recovery (2010-2012) | HAR-RV: R²=0.343758 | |
| 27 | + Pre-GFC Recovery (2010-2012) | HAR+IV: R²=0.392095 | |
| 28 | + Bull Market (2013-2016) | HAR-RV: R²=0.341638 | |
| 29 | + Bull Market (2013-2016) | HAR+IV: R²=0.336050 | |
| 30 | + Low Vol Era (2017-2018) | HAR-RV: R²=0.309402 | |
| 31 | + Low Vol Era (2017-2018) | HAR+IV: R²=0.419184 | |
| 32 | + Pre-COVID (2019) | HAR-RV: R²=0.279508 | |
| 33 | + Pre-COVID (2019) | HAR+IV: R²=0.363255 | |
| 34 | + COVID Period (2020) | HAR-RV: R²=0.603843 | |
| 35 | + COVID Period (2020) | HAR+IV: R²=0.720927 | |
| 36 | + Post-COVID Bull (2021) | HAR-RV: R²=0.376172 | |
| 37 | + Post-COVID Bull (2021) | HAR+IV: R²=0.439624 | |
| 38 | + Rate Hiking (2022) | HAR-RV: R²=0.386563 | |
| 39 | + Rate Hiking (2022) | HAR+IV: R²=0.470806 | |
| 40 | + Recovery (2023-2024) | HAR-RV: R²=0.290370 | |
| 41 | + Recovery (2023-2024) | HAR+IV: R²=0.390172 | |
| 42 | + Recent (2025) | HAR-RV: R²=0.320827 | |
| 43 | + Recent (2025) | HAR+IV: R²=0.401901 | |
| 44 | + | |
| 45 | +--- B. VIX REGIME ANALYSIS --- | |
| 46 | + [Section B skipped — raw stores unavailable; existing regime_results.csv left untouched] | |
| 47 | + Raw store 'index_5min.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 48 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 49 | + | |
| 50 | +--- C. ROLLING WINDOW R² (252-day) --- | |
| 51 | + 120 rolling windows computed | |
| 52 | + | |
| 53 | + 5D_Return: mean R²=0.079942, min=0.021352, max=0.178893, std=0.044522 | |
| 54 | + | |
| 55 | + 1D_RV: mean R²=0.412446, min=0.257679, max=0.756025, std=0.107310 | |
| 56 | + | |
| 57 | +--- D. PRE vs POST COVID COMPARISON --- | |
| 58 | + Pre-COVID | 1D: R²=0.001994 | |
| 59 | + Pre-COVID | 5D: R²=0.070884 | |
| 60 | + Pre-COVID | HAR-RV: R²=0.346303 | |
| 61 | + Pre-COVID | HAR+IV: R²=0.381442 | |
| 62 | + Post-COVID | 1D: R²=0.001177 | |
| 63 | + Post-COVID | 5D: R²=0.051770 | |
| 64 | + Post-COVID | HAR-RV: R²=0.462938 | |
| 65 | + Post-COVID | HAR+IV: R²=0.570581 | |
| 66 | + | |
| 67 | +SUBPERIOD & REGIME ANALYSIS COMPLETE. | |
added
_verify/logs/09_portfolio_sorts.log
+176 −0
@@ -0,0 +1,176 @@ | ||
| 1 | +====================================================================== | |
| 2 | +PORTFOLIO SORTS & ECONOMIC SIGNIFICANCE | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | + ATM IV (30d) → 1-Day Returns: | |
| 6 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 7 | + Q1 3.17 7.98 12.97 0.615 2.382 3777 | |
| 8 | + Q2 3.69 9.29 15.75 0.590 2.284 3777 | |
| 9 | + Q3 4.50 11.34 18.10 0.627 2.426 3777 | |
| 10 | + Q4 6.02 15.16 21.28 0.713 2.759 3777 | |
| 11 | + Q5 8.67 21.85 29.73 0.735 2.846 3777 | |
| 12 | + L/S(5-1) 5.51 13.88 25.55 0.543 2.103 3777 | |
| 13 | + | |
| 14 | + ATM IV (30d) → 5-Day Returns: | |
| 15 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 16 | + Q1 29.29 15.23 11.82 1.288 10.979 3777 | |
| 17 | + Q2 27.47 14.28 15.05 0.949 8.090 3777 | |
| 18 | + Q3 21.90 11.39 17.42 0.654 5.571 3777 | |
| 19 | + Q4 17.87 9.29 20.85 0.446 3.799 3777 | |
| 20 | + Q5 25.90 13.47 29.53 0.456 3.887 3777 | |
| 21 | + L/S(5-1) -3.39 -1.76 26.13 -0.067 -0.575 3777 | |
| 22 | + | |
| 23 | + Volatility Skew (25d) → 1-Day Returns: | |
| 24 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 25 | + Q1 4.91 12.37 18.36 0.674 2.609 3778 | |
| 26 | + Q2 4.35 10.97 17.22 0.637 2.467 3778 | |
| 27 | + Q3 5.73 14.44 18.78 0.769 2.978 3778 | |
| 28 | + Q4 5.89 14.84 20.42 0.727 2.813 3778 | |
| 29 | + Q5 6.13 15.46 24.22 0.638 2.471 3778 | |
| 30 | + L/S(5-1) 1.22 3.08 19.70 0.157 0.606 3778 | |
| 31 | + | |
| 32 | + Volatility Skew (25d) → 5-Day Returns: | |
| 33 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 34 | + Q1 62.40 32.45 17.74 1.829 15.593 3778 | |
| 35 | + Q2 33.24 17.28 16.37 1.056 9.001 3778 | |
| 36 | + Q3 22.98 11.95 18.06 0.662 5.640 3778 | |
| 37 | + Q4 14.25 7.41 19.62 0.378 3.218 3778 | |
| 38 | + Q5 -9.78 -5.08 23.98 -0.212 -1.807 3778 | |
| 39 | + L/S(5-1) -72.18 -37.53 20.10 -1.868 -15.918 3778 | |
| 40 | + | |
| 41 | + Implied Skewness → 1-Day Returns: | |
| 42 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 43 | + Q1 7.67 19.33 24.36 0.794 3.072 3777 | |
| 44 | + Q2 4.56 11.48 20.21 0.568 2.199 3777 | |
| 45 | + Q3 4.92 12.41 18.49 0.671 2.598 3777 | |
| 46 | + Q4 4.99 12.57 17.75 0.708 2.742 3777 | |
| 47 | + Q5 4.37 11.00 16.84 0.653 2.530 3777 | |
| 48 | + L/S(5-1) -3.31 -8.33 17.91 -0.465 -1.800 3777 | |
| 49 | + | |
| 50 | + Implied Skewness → 5-Day Returns: | |
| 51 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 52 | + Q1 42.45 22.08 24.22 0.912 7.769 3777 | |
| 53 | + Q2 15.43 8.03 19.58 0.410 3.493 3777 | |
| 54 | + Q3 18.44 9.59 17.64 0.544 4.634 3777 | |
| 55 | + Q4 18.93 9.84 16.98 0.580 4.940 3777 | |
| 56 | + Q5 23.39 12.16 15.88 0.766 6.527 3777 | |
| 57 | + L/S(5-1) -19.06 -9.91 18.81 -0.527 -4.493 3777 | |
| 58 | + | |
| 59 | + Implied Kurtosis → 1-Day Returns: | |
| 60 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 61 | + Q1 7.90 19.91 24.26 0.821 3.177 3777 | |
| 62 | + Q2 4.79 12.08 20.67 0.584 2.261 3777 | |
| 63 | + Q3 4.16 10.49 18.77 0.559 2.164 3777 | |
| 64 | + Q4 4.23 10.65 17.34 0.614 2.377 3777 | |
| 65 | + Q5 4.79 12.06 15.65 0.771 2.984 3777 | |
| 66 | + L/S(5-1) -3.11 -7.85 18.30 -0.429 -1.660 3777 | |
| 67 | + | |
| 68 | + Implied Kurtosis → 5-Day Returns: | |
| 69 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 70 | + Q1 -24.35 -12.66 23.88 -0.530 -4.519 3777 | |
| 71 | + Q2 10.82 5.63 20.22 0.278 2.372 3777 | |
| 72 | + Q3 30.12 15.66 17.93 0.874 7.444 3777 | |
| 73 | + Q4 47.43 24.66 16.32 1.511 12.880 3777 | |
| 74 | + Q5 60.33 31.37 15.15 2.071 17.651 3777 | |
| 75 | + L/S(5-1) 84.68 44.04 18.91 2.328 19.843 3777 | |
| 76 | + | |
| 77 | + Put-Call Volume Ratio → 1-Day Returns: | |
| 78 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 79 | + Q1 2.99 7.53 18.09 0.416 1.662 4024 | |
| 80 | + Q2 6.05 15.24 19.52 0.780 3.119 4024 | |
| 81 | + Q3 6.22 15.68 19.74 0.794 3.174 4024 | |
| 82 | + Q4 6.28 15.83 19.30 0.820 3.278 4024 | |
| 83 | + Q5 5.46 13.76 18.53 0.743 2.968 4024 | |
| 84 | + L/S(5-1) 2.47 6.24 12.04 0.518 2.070 4024 | |
| 85 | + | |
| 86 | + Put-Call Volume Ratio → 5-Day Returns: | |
| 87 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 88 | + Q1 58.19 30.26 17.47 1.732 15.234 4024 | |
| 89 | + Q2 37.30 19.39 18.71 1.036 9.118 4024 | |
| 90 | + Q3 26.60 13.83 19.32 0.716 6.300 4024 | |
| 91 | + Q4 12.21 6.35 18.66 0.340 2.994 4024 | |
| 92 | + Q5 -0.05 -0.03 17.68 -0.002 -0.014 4024 | |
| 93 | + L/S(5-1) -58.25 -30.29 12.22 -2.478 -21.796 4024 | |
| 94 | + | |
| 95 | + Put-Call OI Ratio → 1-Day Returns: | |
| 96 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 97 | + Q1 4.72 11.88 18.65 0.637 2.546 4024 | |
| 98 | + Q2 4.20 10.59 17.87 0.592 2.368 4024 | |
| 99 | + Q3 4.53 11.43 19.01 0.601 2.402 4024 | |
| 100 | + Q4 6.72 16.93 19.64 0.862 3.445 4024 | |
| 101 | + Q5 6.75 17.01 20.12 0.846 3.379 4024 | |
| 102 | + L/S(5-1) 2.04 5.13 13.28 0.386 1.544 4024 | |
| 103 | + | |
| 104 | + Put-Call OI Ratio → 5-Day Returns: | |
| 105 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 106 | + Q1 24.26 12.61 18.30 0.689 6.062 4024 | |
| 107 | + Q2 18.55 9.64 17.37 0.555 4.884 4024 | |
| 108 | + Q3 25.65 13.34 17.53 0.761 6.693 4024 | |
| 109 | + Q4 31.82 16.55 19.01 0.870 7.655 4024 | |
| 110 | + Q5 34.38 17.88 19.44 0.919 8.089 4024 | |
| 111 | + L/S(5-1) 10.13 5.27 13.27 0.397 3.492 4024 | |
| 112 | + | |
| 113 | + IV Term Structure Slope → 1-Day Returns: | |
| 114 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 115 | + Q1 7.72 19.46 25.81 0.754 2.457 2676 | |
| 116 | + Q2 1.85 4.67 19.88 0.235 0.765 2676 | |
| 117 | + Q3 2.47 6.23 18.81 0.331 1.079 2676 | |
| 118 | + Q4 4.16 10.48 18.14 0.578 1.883 2676 | |
| 119 | + Q5 5.81 14.63 20.14 0.726 2.367 2676 | |
| 120 | + L/S(5-1) -1.92 -4.83 20.46 -0.236 -0.769 2676 | |
| 121 | + | |
| 122 | + IV Term Structure Slope → 5-Day Returns: | |
| 123 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 124 | + Q1 20.45 10.63 25.99 0.409 2.935 2676 | |
| 125 | + Q2 9.71 5.05 20.02 0.252 1.810 2676 | |
| 126 | + Q3 24.57 12.78 18.55 0.689 4.941 2676 | |
| 127 | + Q4 34.51 17.94 17.72 1.013 7.265 2676 | |
| 128 | + Q5 42.23 21.96 19.52 1.125 8.070 2676 | |
| 129 | + L/S(5-1) 21.79 11.33 20.30 0.558 4.004 2676 | |
| 130 | + | |
| 131 | +====================================================================== | |
| 132 | +LONG-SHORT PORTFOLIO SUMMARY (Q5 - Q1) | |
| 133 | +====================================================================== | |
| 134 | + sort_variable return_horizon mean_daily_bps annualized_return_pct sharpe_ratio t_statistic | |
| 135 | + ATM IV (30d) 1-Day 5.507 13.878 0.543 2.103 | |
| 136 | + ATM IV (30d) 5-Day -3.391 -1.763 -0.067 -0.575 | |
| 137 | + Volatility Skew (25d) 1-Day 1.223 3.083 0.157 0.606 | |
| 138 | + Volatility Skew (25d) 5-Day -72.178 -37.533 -1.868 -15.918 | |
| 139 | + Implied Skewness 1-Day -3.305 -8.329 -0.465 -1.800 | |
| 140 | + Implied Skewness 5-Day -19.064 -9.913 -0.527 -4.493 | |
| 141 | + Implied Kurtosis 1-Day -3.114 -7.847 -0.429 -1.660 | |
| 142 | + Implied Kurtosis 5-Day 84.684 44.036 2.328 19.843 | |
| 143 | + Put-Call Volume Ratio 1-Day 2.474 6.236 0.518 2.070 | |
| 144 | + Put-Call Volume Ratio 5-Day -58.247 -30.289 -2.478 -21.796 | |
| 145 | + Put-Call OI Ratio 1-Day 2.036 5.131 0.386 1.544 | |
| 146 | + Put-Call OI Ratio 5-Day 10.126 5.266 0.397 3.492 | |
| 147 | +IV Term Structure Slope 1-Day -1.915 -4.826 -0.236 -0.769 | |
| 148 | +IV Term Structure Slope 5-Day 21.786 11.329 0.558 4.004 | |
| 149 | + | |
| 150 | +====================================================================== | |
| 151 | +DOUBLE SORT: IV_ATM x IMPLIED_SKEWNESS → 5-Day Returns | |
| 152 | +====================================================================== | |
| 153 | + Low Skew Med Skew High Skew | |
| 154 | +Low IV 8.15 24.12 35.90 | |
| 155 | +Med IV 22.11 23.80 15.62 | |
| 156 | +High IV 41.76 2.72 -47.82 | |
| 157 | + | |
| 158 | +t-statistics: | |
| 159 | + Low Skew Med Skew High Skew | |
| 160 | +Low IV 2.037 11.080 24.972 | |
| 161 | +Med IV 6.477 10.148 5.830 | |
| 162 | +High IV 13.121 0.649 -6.171 | |
| 163 | + | |
| 164 | +====================================================================== | |
| 165 | +TRANSACTION COST SENSITIVITY (Long-Short on Implied Skewness, 5D) | |
| 166 | +====================================================================== | |
| 167 | + TC (bps) Net Ret(bps) Ann.Ret% Sharpe | |
| 168 | + 0 -19.06 -9.91 -0.527 | |
| 169 | + 5 -21.06 -10.95 -0.582 | |
| 170 | + 10 -23.06 -11.99 -0.638 | |
| 171 | + 15 -25.06 -13.03 -0.693 | |
| 172 | + 20 -27.06 -14.07 -0.748 | |
| 173 | + 30 -31.06 -16.15 -0.859 | |
| 174 | + 50 -39.06 -20.31 -1.080 | |
| 175 | + | |
| 176 | +PORTFOLIO SORTS COMPLETE. | |
added
_verify/logs/09_recheck.log
+176 −0
@@ -0,0 +1,176 @@ | ||
| 1 | +====================================================================== | |
| 2 | +PORTFOLIO SORTS & ECONOMIC SIGNIFICANCE | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | + ATM IV (30d) → 1-Day Returns: | |
| 6 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 7 | + Q1 3.17 7.98 12.97 0.615 2.382 3777 | |
| 8 | + Q2 3.69 9.29 15.75 0.590 2.284 3777 | |
| 9 | + Q3 4.50 11.34 18.10 0.627 2.426 3777 | |
| 10 | + Q4 6.02 15.16 21.28 0.713 2.759 3777 | |
| 11 | + Q5 8.67 21.85 29.73 0.735 2.846 3777 | |
| 12 | + L/S(5-1) 5.51 13.88 25.55 0.543 2.103 3777 | |
| 13 | + | |
| 14 | + ATM IV (30d) → 5-Day Returns: | |
| 15 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 16 | + Q1 29.29 15.23 11.82 1.288 10.979 3777 | |
| 17 | + Q2 27.47 14.28 15.05 0.949 8.090 3777 | |
| 18 | + Q3 21.90 11.39 17.42 0.654 5.571 3777 | |
| 19 | + Q4 17.87 9.29 20.85 0.446 3.799 3777 | |
| 20 | + Q5 25.90 13.47 29.53 0.456 3.887 3777 | |
| 21 | + L/S(5-1) -3.39 -1.76 26.13 -0.067 -0.575 3777 | |
| 22 | + | |
| 23 | + Volatility Skew (25d) → 1-Day Returns: | |
| 24 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 25 | + Q1 4.91 12.37 18.36 0.674 2.609 3778 | |
| 26 | + Q2 4.35 10.97 17.22 0.637 2.467 3778 | |
| 27 | + Q3 5.73 14.44 18.78 0.769 2.978 3778 | |
| 28 | + Q4 5.89 14.84 20.42 0.727 2.813 3778 | |
| 29 | + Q5 6.13 15.46 24.22 0.638 2.471 3778 | |
| 30 | + L/S(5-1) 1.22 3.08 19.70 0.157 0.606 3778 | |
| 31 | + | |
| 32 | + Volatility Skew (25d) → 5-Day Returns: | |
| 33 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 34 | + Q1 62.40 32.45 17.74 1.829 15.593 3778 | |
| 35 | + Q2 33.24 17.28 16.37 1.056 9.001 3778 | |
| 36 | + Q3 22.98 11.95 18.06 0.662 5.640 3778 | |
| 37 | + Q4 14.25 7.41 19.62 0.378 3.218 3778 | |
| 38 | + Q5 -9.78 -5.08 23.98 -0.212 -1.807 3778 | |
| 39 | + L/S(5-1) -72.18 -37.53 20.10 -1.868 -15.918 3778 | |
| 40 | + | |
| 41 | + Implied Skewness → 1-Day Returns: | |
| 42 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 43 | + Q1 7.67 19.33 24.36 0.794 3.072 3777 | |
| 44 | + Q2 4.56 11.48 20.21 0.568 2.199 3777 | |
| 45 | + Q3 4.92 12.41 18.49 0.671 2.598 3777 | |
| 46 | + Q4 4.99 12.57 17.75 0.708 2.742 3777 | |
| 47 | + Q5 4.37 11.00 16.84 0.653 2.530 3777 | |
| 48 | + L/S(5-1) -3.31 -8.33 17.91 -0.465 -1.800 3777 | |
| 49 | + | |
| 50 | + Implied Skewness → 5-Day Returns: | |
| 51 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 52 | + Q1 42.45 22.08 24.22 0.912 7.769 3777 | |
| 53 | + Q2 15.43 8.03 19.58 0.410 3.493 3777 | |
| 54 | + Q3 18.44 9.59 17.64 0.544 4.634 3777 | |
| 55 | + Q4 18.93 9.84 16.98 0.580 4.940 3777 | |
| 56 | + Q5 23.39 12.16 15.88 0.766 6.527 3777 | |
| 57 | + L/S(5-1) -19.06 -9.91 18.81 -0.527 -4.493 3777 | |
| 58 | + | |
| 59 | + Implied Kurtosis → 1-Day Returns: | |
| 60 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 61 | + Q1 7.90 19.91 24.26 0.821 3.177 3777 | |
| 62 | + Q2 4.79 12.08 20.67 0.584 2.261 3777 | |
| 63 | + Q3 4.16 10.49 18.77 0.559 2.164 3777 | |
| 64 | + Q4 4.23 10.65 17.34 0.614 2.377 3777 | |
| 65 | + Q5 4.79 12.06 15.65 0.771 2.984 3777 | |
| 66 | + L/S(5-1) -3.11 -7.85 18.30 -0.429 -1.660 3777 | |
| 67 | + | |
| 68 | + Implied Kurtosis → 5-Day Returns: | |
| 69 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 70 | + Q1 -24.35 -12.66 23.88 -0.530 -4.519 3777 | |
| 71 | + Q2 10.82 5.63 20.22 0.278 2.372 3777 | |
| 72 | + Q3 30.12 15.66 17.93 0.874 7.444 3777 | |
| 73 | + Q4 47.43 24.66 16.32 1.511 12.880 3777 | |
| 74 | + Q5 60.33 31.37 15.15 2.071 17.651 3777 | |
| 75 | + L/S(5-1) 84.68 44.04 18.91 2.328 19.843 3777 | |
| 76 | + | |
| 77 | + Put-Call Volume Ratio → 1-Day Returns: | |
| 78 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 79 | + Q1 2.99 7.53 18.09 0.416 1.662 4024 | |
| 80 | + Q2 6.05 15.24 19.52 0.780 3.119 4024 | |
| 81 | + Q3 6.22 15.68 19.74 0.794 3.174 4024 | |
| 82 | + Q4 6.28 15.83 19.30 0.820 3.278 4024 | |
| 83 | + Q5 5.46 13.76 18.53 0.743 2.968 4024 | |
| 84 | + L/S(5-1) 2.47 6.24 12.04 0.518 2.070 4024 | |
| 85 | + | |
| 86 | + Put-Call Volume Ratio → 5-Day Returns: | |
| 87 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 88 | + Q1 58.19 30.26 17.47 1.732 15.234 4024 | |
| 89 | + Q2 37.30 19.39 18.71 1.036 9.118 4024 | |
| 90 | + Q3 26.60 13.83 19.32 0.716 6.300 4024 | |
| 91 | + Q4 12.21 6.35 18.66 0.340 2.994 4024 | |
| 92 | + Q5 -0.05 -0.03 17.68 -0.002 -0.014 4024 | |
| 93 | + L/S(5-1) -58.25 -30.29 12.22 -2.478 -21.796 4024 | |
| 94 | + | |
| 95 | + Put-Call OI Ratio → 1-Day Returns: | |
| 96 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 97 | + Q1 4.72 11.88 18.65 0.637 2.546 4024 | |
| 98 | + Q2 4.20 10.59 17.87 0.592 2.368 4024 | |
| 99 | + Q3 4.53 11.43 19.01 0.601 2.402 4024 | |
| 100 | + Q4 6.72 16.93 19.64 0.862 3.445 4024 | |
| 101 | + Q5 6.75 17.01 20.12 0.846 3.379 4024 | |
| 102 | + L/S(5-1) 2.04 5.13 13.28 0.386 1.544 4024 | |
| 103 | + | |
| 104 | + Put-Call OI Ratio → 5-Day Returns: | |
| 105 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 106 | + Q1 24.26 12.61 18.30 0.689 6.062 4024 | |
| 107 | + Q2 18.55 9.64 17.37 0.555 4.884 4024 | |
| 108 | + Q3 25.65 13.34 17.53 0.761 6.693 4024 | |
| 109 | + Q4 31.82 16.55 19.01 0.870 7.655 4024 | |
| 110 | + Q5 34.38 17.88 19.44 0.919 8.089 4024 | |
| 111 | + L/S(5-1) 10.13 5.27 13.27 0.397 3.492 4024 | |
| 112 | + | |
| 113 | + IV Term Structure Slope → 1-Day Returns: | |
| 114 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 115 | + Q1 7.72 19.46 25.81 0.754 2.457 2676 | |
| 116 | + Q2 1.85 4.67 19.88 0.235 0.765 2676 | |
| 117 | + Q3 2.47 6.23 18.81 0.331 1.079 2676 | |
| 118 | + Q4 4.16 10.48 18.14 0.578 1.883 2676 | |
| 119 | + Q5 5.81 14.63 20.14 0.726 2.367 2676 | |
| 120 | + L/S(5-1) -1.92 -4.83 20.46 -0.236 -0.769 2676 | |
| 121 | + | |
| 122 | + IV Term Structure Slope → 5-Day Returns: | |
| 123 | + Q Mean(bps) Ann.Ret% Ann.Vol% Sharpe t-stat N | |
| 124 | + Q1 20.45 10.63 25.99 0.409 2.935 2676 | |
| 125 | + Q2 9.71 5.05 20.02 0.252 1.810 2676 | |
| 126 | + Q3 24.57 12.78 18.55 0.689 4.941 2676 | |
| 127 | + Q4 34.51 17.94 17.72 1.013 7.265 2676 | |
| 128 | + Q5 42.23 21.96 19.52 1.125 8.070 2676 | |
| 129 | + L/S(5-1) 21.79 11.33 20.30 0.558 4.004 2676 | |
| 130 | + | |
| 131 | +====================================================================== | |
| 132 | +LONG-SHORT PORTFOLIO SUMMARY (Q5 - Q1) | |
| 133 | +====================================================================== | |
| 134 | + sort_variable return_horizon mean_daily_bps annualized_return_pct sharpe_ratio t_statistic | |
| 135 | + ATM IV (30d) 1-Day 5.507 13.878 0.543 2.103 | |
| 136 | + ATM IV (30d) 5-Day -3.391 -1.763 -0.067 -0.575 | |
| 137 | + Volatility Skew (25d) 1-Day 1.223 3.083 0.157 0.606 | |
| 138 | + Volatility Skew (25d) 5-Day -72.178 -37.533 -1.868 -15.918 | |
| 139 | + Implied Skewness 1-Day -3.305 -8.329 -0.465 -1.800 | |
| 140 | + Implied Skewness 5-Day -19.064 -9.913 -0.527 -4.493 | |
| 141 | + Implied Kurtosis 1-Day -3.114 -7.847 -0.429 -1.660 | |
| 142 | + Implied Kurtosis 5-Day 84.684 44.036 2.328 19.843 | |
| 143 | + Put-Call Volume Ratio 1-Day 2.474 6.236 0.518 2.070 | |
| 144 | + Put-Call Volume Ratio 5-Day -58.247 -30.289 -2.478 -21.796 | |
| 145 | + Put-Call OI Ratio 1-Day 2.036 5.131 0.386 1.544 | |
| 146 | + Put-Call OI Ratio 5-Day 10.126 5.266 0.397 3.492 | |
| 147 | +IV Term Structure Slope 1-Day -1.915 -4.826 -0.236 -0.769 | |
| 148 | +IV Term Structure Slope 5-Day 21.786 11.329 0.558 4.004 | |
| 149 | + | |
| 150 | +====================================================================== | |
| 151 | +DOUBLE SORT: IV_ATM x IMPLIED_SKEWNESS → 5-Day Returns | |
| 152 | +====================================================================== | |
| 153 | + Low Skew Med Skew High Skew | |
| 154 | +Low IV 8.15 24.12 35.90 | |
| 155 | +Med IV 22.11 23.80 15.62 | |
| 156 | +High IV 41.76 2.72 -47.82 | |
| 157 | + | |
| 158 | +t-statistics: | |
| 159 | + Low Skew Med Skew High Skew | |
| 160 | +Low IV 2.037 11.080 24.972 | |
| 161 | +Med IV 6.477 10.148 5.830 | |
| 162 | +High IV 13.121 0.649 -6.171 | |
| 163 | + | |
| 164 | +====================================================================== | |
| 165 | +TRANSACTION COST SENSITIVITY (Long-Short on Implied Skewness, 5D) | |
| 166 | +====================================================================== | |
| 167 | + TC (bps) Net Ret(bps) Ann.Ret% Sharpe | |
| 168 | + 0 -19.06 -9.91 -0.527 | |
| 169 | + 5 -21.06 -10.95 -0.582 | |
| 170 | + 10 -23.06 -11.99 -0.638 | |
| 171 | + 15 -25.06 -13.03 -0.693 | |
| 172 | + 20 -27.06 -14.07 -0.748 | |
| 173 | + 30 -31.06 -16.15 -0.859 | |
| 174 | + 50 -39.06 -20.31 -1.080 | |
| 175 | + | |
| 176 | +PORTFOLIO SORTS COMPLETE. | |
added
_verify/logs/10_robustness.log
+185 −0
@@ -0,0 +1,185 @@ | ||
| 1 | +====================================================================== | |
| 2 | +ROBUSTNESS CHECKS | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +--- A. NEWEY-WEST HAC STANDARD ERRORS (lag=5) --- | |
| 6 | + | |
| 7 | + 1-Day: R²=0.001027, N=119,081 | |
| 8 | + Significant (NW): iv_atm_30d, iv_skew_25d, implied_skewness, rv_daily | |
| 9 | + const : β= 0.000418 t_NW= 9.676 ** | |
| 10 | + iv_atm_30d : β= 0.000280 t_NW= 2.617 ** | |
| 11 | + iv_term_slope : β= 0.000081 t_NW= 1.236 | |
| 12 | + iv_skew_25d : β= 0.000559 t_NW= 5.078 ** | |
| 13 | + implied_skewness : β=-0.000274 t_NW= -2.717 ** | |
| 14 | + implied_kurtosis_proxy : β= 0.000032 t_NW= 0.488 | |
| 15 | + pc_volume_ratio : β=-0.000001 t_NW= -0.031 | |
| 16 | + pc_oi_ratio : β=-0.000064 t_NW= -1.183 | |
| 17 | + net_gamma_exposure : β= 0.000005 t_NW= 0.114 | |
| 18 | + rv_daily : β=-0.000321 t_NW= -2.794 ** | |
| 19 | + rv_w : β=-0.000047 t_NW= -0.414 | |
| 20 | + | |
| 21 | + 5-Day: R²=0.052916, N=119,081 | |
| 22 | + Significant (NW): iv_atm_30d, iv_term_slope, implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, net_gamma_exposure, rv_daily, rv_w | |
| 23 | + const : β= 0.002249 t_NW= 13.142 ** | |
| 24 | + iv_atm_30d : β= 0.001322 t_NW= 3.325 ** | |
| 25 | + iv_term_slope : β= 0.001134 t_NW= 4.591 ** | |
| 26 | + iv_skew_25d : β=-0.000373 t_NW= -0.927 | |
| 27 | + implied_skewness : β=-0.004685 t_NW=-13.656 ** | |
| 28 | + implied_kurtosis_proxy : β= 0.006342 t_NW= 25.642 ** | |
| 29 | + pc_volume_ratio : β=-0.002133 t_NW=-16.691 ** | |
| 30 | + pc_oi_ratio : β= 0.002634 t_NW= 13.119 ** | |
| 31 | + net_gamma_exposure : β= 0.003021 t_NW= 17.830 ** | |
| 32 | + rv_daily : β=-0.005554 t_NW=-17.871 ** | |
| 33 | + rv_w : β= 0.003483 t_NW= 7.951 ** | |
| 34 | + | |
| 35 | +--- B. DOUBLE-CLUSTERED SE (ticker + date) --- | |
| 36 | + | |
| 37 | + 1-Day: R²=0.001027, N=119,081 | |
| 38 | + Significant (DC): | |
| 39 | + const : β= 0.000418 t_DC= 2.187 * | |
| 40 | + iv_atm_30d : β= 0.000280 t_DC= 0.915 | |
| 41 | + iv_term_slope : β= 0.000081 t_DC= 0.434 | |
| 42 | + iv_skew_25d : β= 0.000559 t_DC= 1.800 | |
| 43 | + implied_skewness : β=-0.000274 t_DC= -1.273 | |
| 44 | + implied_kurtosis_proxy : β= 0.000032 t_DC= 0.198 | |
| 45 | + pc_volume_ratio : β=-0.000001 t_DC= -0.018 | |
| 46 | + pc_oi_ratio : β=-0.000064 t_DC= -0.843 | |
| 47 | + net_gamma_exposure : β= 0.000005 t_DC= 0.115 | |
| 48 | + rv_daily : β=-0.000321 t_DC= -0.973 | |
| 49 | + rv_w : β=-0.000047 t_DC= -0.118 | |
| 50 | + | |
| 51 | + 5-Day: R²=0.052916, N=119,081 | |
| 52 | + Significant (DC): iv_term_slope, implied_skewness, implied_kurtosis_proxy, pc_volume_ratio, pc_oi_ratio, net_gamma_exposure, rv_daily, rv_w | |
| 53 | + const : β= 0.002249 t_DC= 3.924 ** | |
| 54 | + iv_atm_30d : β= 0.001322 t_DC= 1.402 | |
| 55 | + iv_term_slope : β= 0.001134 t_DC= 2.123 * | |
| 56 | + iv_skew_25d : β=-0.000373 t_DC= -0.388 | |
| 57 | + implied_skewness : β=-0.004685 t_DC= -4.938 ** | |
| 58 | + implied_kurtosis_proxy : β= 0.006342 t_DC= 9.024 ** | |
| 59 | + pc_volume_ratio : β=-0.002133 t_DC= -7.960 ** | |
| 60 | + pc_oi_ratio : β= 0.002634 t_DC= 4.609 ** | |
| 61 | + net_gamma_exposure : β= 0.003021 t_DC= 5.395 ** | |
| 62 | + rv_daily : β=-0.005554 t_DC= -7.267 ** | |
| 63 | + rv_w : β= 0.003483 t_DC= 3.527 ** | |
| 64 | + | |
| 65 | +--- C. WITH CONTROL VARIABLES (volume, log_oi, spread proxy) --- | |
| 66 | + | |
| 67 | + 1-Day with controls: R²=0.002293, N=119,076 | |
| 68 | + const : β= 0.000418 t= 9.333 ** | |
| 69 | + iv_atm_30d : β= 0.000413 t= 3.627 ** | |
| 70 | + iv_term_slope : β= 0.000097 t= 1.398 | |
| 71 | + iv_skew_25d : β= 0.000576 t= 4.795 ** | |
| 72 | + implied_skewness : β=-0.000333 t= -3.031 ** | |
| 73 | + implied_kurtosis_proxy : β= 0.000084 t= 1.190 | |
| 74 | + pc_volume_ratio : β=-0.000015 t= -0.301 | |
| 75 | + pc_oi_ratio : β=-0.000058 t= -0.979 | |
| 76 | + net_gamma_exposure : β= 0.000028 t= 0.591 | |
| 77 | + rv_daily : β=-0.000123 t= -1.000 | |
| 78 | + rv_w : β=-0.000099 t= -0.845 | |
| 79 | + log_volume : β= 0.000155 t= 1.375 | |
| 80 | + log_oi : β=-0.000094 t= -0.848 | |
| 81 | + abs_return : β=-0.000516 t= -6.356 ** | |
| 82 | + ret_lag1 : β= 0.000272 t= 3.898 ** | |
| 83 | + ret_lag5 : β=-0.000408 t= -5.764 ** | |
| 84 | + | |
| 85 | + 5-Day with controls: R²=0.380110, N=119,076 | |
| 86 | + const : β= 0.002249 t= 28.524 ** | |
| 87 | + iv_atm_30d : β=-0.000562 t= -2.766 ** | |
| 88 | + iv_term_slope : β= 0.000340 t= 2.765 ** | |
| 89 | + iv_skew_25d : β= 0.000882 t= 4.115 ** | |
| 90 | + implied_skewness : β=-0.002003 t=-10.442 ** | |
| 91 | + implied_kurtosis_proxy : β= 0.002705 t= 21.948 ** | |
| 92 | + pc_volume_ratio : β=-0.001791 t=-22.146 ** | |
| 93 | + pc_oi_ratio : β= 0.001143 t= 11.161 ** | |
| 94 | + net_gamma_exposure : β= 0.000966 t= 11.627 ** | |
| 95 | + rv_daily : β=-0.003108 t=-12.492 ** | |
| 96 | + rv_w : β= 0.003433 t= 14.190 ** | |
| 97 | + log_volume : β= 0.001837 t= 9.351 ** | |
| 98 | + log_oi : β=-0.001716 t= -8.804 ** | |
| 99 | + abs_return : β= 0.000024 t= 0.147 | |
| 100 | + ret_lag1 : β= 0.007347 t= 59.040 ** | |
| 101 | + ret_lag5 : β= 0.016172 t=126.664 ** | |
| 102 | + | |
| 103 | +--- D. QUANTILE REGRESSION (iterative reweighting) --- | |
| 104 | + | |
| 105 | + 5-Day | τ=0.1: | |
| 106 | + const : β=-0.036443 | |
| 107 | + iv_atm_30d : β=-0.010547 | |
| 108 | + iv_term_slope : β= 0.000196 | |
| 109 | + iv_skew_25d : β=-0.001291 | |
| 110 | + implied_skewness : β=-0.001948 | |
| 111 | + implied_kurtosis_proxy : β= 0.004509 | |
| 112 | + pc_volume_ratio : β=-0.001223 | |
| 113 | + pc_oi_ratio : β= 0.001985 | |
| 114 | + net_gamma_exposure : β= 0.002942 | |
| 115 | + rv_daily : β=-0.007981 | |
| 116 | + rv_w : β=-0.003487 | |
| 117 | + | |
| 118 | + 5-Day | τ=0.25: | |
| 119 | + const : β=-0.018286 | |
| 120 | + iv_atm_30d : β=-0.004897 | |
| 121 | + iv_term_slope : β= 0.000676 | |
| 122 | + iv_skew_25d : β=-0.000810 | |
| 123 | + implied_skewness : β=-0.002419 | |
| 124 | + implied_kurtosis_proxy : β= 0.004277 | |
| 125 | + pc_volume_ratio : β=-0.001496 | |
| 126 | + pc_oi_ratio : β= 0.001951 | |
| 127 | + net_gamma_exposure : β= 0.002808 | |
| 128 | + rv_daily : β=-0.010143 | |
| 129 | + rv_w : β= 0.000953 | |
| 130 | + | |
| 131 | + 5-Day | τ=0.5: | |
| 132 | + const : β= 0.002161 | |
| 133 | + iv_atm_30d : β= 0.001941 | |
| 134 | + iv_term_slope : β= 0.001334 | |
| 135 | + iv_skew_25d : β=-0.000464 | |
| 136 | + implied_skewness : β=-0.003373 | |
| 137 | + implied_kurtosis_proxy : β= 0.004838 | |
| 138 | + pc_volume_ratio : β=-0.001685 | |
| 139 | + pc_oi_ratio : β= 0.002010 | |
| 140 | + net_gamma_exposure : β= 0.002399 | |
| 141 | + rv_daily : β=-0.007690 | |
| 142 | + rv_w : β= 0.004121 | |
| 143 | + | |
| 144 | + 5-Day | τ=0.75: | |
| 145 | + const : β= 0.023323 | |
| 146 | + iv_atm_30d : β= 0.007600 | |
| 147 | + iv_term_slope : β= 0.002057 | |
| 148 | + iv_skew_25d : β=-0.000562 | |
| 149 | + implied_skewness : β=-0.003865 | |
| 150 | + implied_kurtosis_proxy : β= 0.005015 | |
| 151 | + pc_volume_ratio : β=-0.001877 | |
| 152 | + pc_oi_ratio : β= 0.002243 | |
| 153 | + net_gamma_exposure : β= 0.002156 | |
| 154 | + rv_daily : β=-0.003220 | |
| 155 | + rv_w : β= 0.009848 | |
| 156 | + | |
| 157 | + 5-Day | τ=0.9: | |
| 158 | + const : β= 0.040952 | |
| 159 | + iv_atm_30d : β= 0.013137 | |
| 160 | + iv_term_slope : β= 0.003289 | |
| 161 | + iv_skew_25d : β= 0.000189 | |
| 162 | + implied_skewness : β=-0.005053 | |
| 163 | + implied_kurtosis_proxy : β= 0.005233 | |
| 164 | + pc_volume_ratio : β=-0.002135 | |
| 165 | + pc_oi_ratio : β= 0.002180 | |
| 166 | + net_gamma_exposure : β= 0.002046 | |
| 167 | + rv_daily : β=-0.000794 | |
| 168 | + rv_w : β= 0.010163 | |
| 169 | + | |
| 170 | +--- E. EXCLUDING HIGH-VIX PERIODS (VIX < 30) --- | |
| 171 | + [Section E skipped — raw stores unavailable] | |
| 172 | + Raw store 'index_5min.duckdb' not found under /Users/simon-pierreboucher/Desktop/wp7_uqo/data/raw. | |
| 173 | +These stores (~3.8B option records / 11.5B intraday bars) are kept outside the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, or skip the raw-dependent steps — every downstream analysis runs from the processed parquets in data/processed/. | |
| 174 | + | |
| 175 | +--- F. TICKER-BY-TICKER R² DISTRIBUTION (5-Day returns) --- | |
| 176 | + Distribution of R² across 69 tickers: | |
| 177 | + Mean: 0.140170 | |
| 178 | + Median: 0.131901 | |
| 179 | + Std: 0.054948 | |
| 180 | + Min: 0.051515 | |
| 181 | + Max: 0.286874 | |
| 182 | + Q25: 0.100164 | |
| 183 | + Q75: 0.176140 | |
| 184 | + | |
| 185 | +ROBUSTNESS CHECKS COMPLETE. | |
added
_verify/logs/11_granger_var.log
+61 −0
@@ -0,0 +1,61 @@ | ||
| 1 | +====================================================================== | |
| 2 | +GRANGER CAUSALITY & VAR ANALYSIS | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +--- A. GRANGER CAUSALITY TESTS --- | |
| 6 | + ATM_IV → RV : F= 62.381, p=0.0000, 100.0% sig *** | |
| 7 | + RV → ATM_IV : F= 17.933, p=0.1501, 60.9% sig | |
| 8 | + Skew → RV : F= 20.792, p=0.0177, 94.2% sig ** | |
| 9 | + RV → Skew : F= 6.589, p=0.0628, 75.4% sig * | |
| 10 | + ATM_IV → Return : F= 1.799, p=0.2688, 24.6% sig | |
| 11 | + Return → ATM_IV : F= 3.977, p=0.1741, 58.0% sig | |
| 12 | + Skew → Return : F= 1.412, p=0.3817, 13.0% sig | |
| 13 | + Return → Skew : F= 13.576, p=0.0133, 95.7% sig ** | |
| 14 | + PC_Ratio → Return : F= 1.010, p=0.4999, 5.8% sig | |
| 15 | + Return → PC_Ratio : F= 2.819, p=0.1638, 46.4% sig | |
| 16 | + Impl_Skew → RV : F= 1.343, p=0.3856, 17.4% sig | |
| 17 | + Impl_Kurt → RV : F= 5.619, p=0.0861, 75.4% sig * | |
| 18 | + | |
| 19 | +--- B. BIVARIATE VAR: IV_ATM ↔ RV (pooled) --- | |
| 20 | + | |
| 21 | + VAR estimated for 20 tickers | |
| 22 | + Avg R² (IV equation): 0.9363 | |
| 23 | + Avg R² (RV equation): 0.3977 | |
| 24 | + | |
| 25 | + Average Impulse Response Function: | |
| 26 | + h IV→IV RV→IV IV→RV RV→RV | |
| 27 | + 0 1.0000 0.0000 0.0000 1.0000 | |
| 28 | + 2 0.8923 -0.0485 0.6683 0.1410 | |
| 29 | + 4 0.8046 -0.0417 0.5105 0.1038 | |
| 30 | + 6 0.7625 -0.0415 0.4224 0.0597 | |
| 31 | + 8 0.7212 -0.0397 0.3869 0.0295 | |
| 32 | + 10 0.6819 -0.0375 0.3534 0.0127 | |
| 33 | + 12 0.6455 -0.0354 0.3296 0.0018 | |
| 34 | + 14 0.6114 -0.0332 0.3088 -0.0040 | |
| 35 | + 16 0.5795 -0.0312 0.2907 -0.0073 | |
| 36 | + 18 0.5496 -0.0292 0.2747 -0.0090 | |
| 37 | + | |
| 38 | +--- C. FORECAST ERROR VARIANCE DECOMPOSITION --- | |
| 39 | + Horizon % RV by IV % RV by RV | |
| 40 | + 1 0.00 100.00 | |
| 41 | + 2 28.01 71.99 | |
| 42 | + 3 44.32 55.68 | |
| 43 | + 4 51.28 48.72 | |
| 44 | + 5 56.10 43.90 | |
| 45 | + 6 58.76 41.24 | |
| 46 | + 7 61.24 38.76 | |
| 47 | + 8 63.29 36.71 | |
| 48 | + 9 64.98 35.02 | |
| 49 | + 10 66.41 33.59 | |
| 50 | + 11 67.61 32.39 | |
| 51 | + 12 68.66 31.34 | |
| 52 | + 13 69.58 30.42 | |
| 53 | + 14 70.40 29.60 | |
| 54 | + 15 71.12 28.88 | |
| 55 | + 16 71.77 28.23 | |
| 56 | + 17 72.36 27.64 | |
| 57 | + 18 72.89 27.11 | |
| 58 | + 19 73.37 26.63 | |
| 59 | + 20 73.82 26.18 | |
| 60 | + | |
| 61 | +GRANGER CAUSALITY & VAR ANALYSIS COMPLETE. | |
added
_verify/logs/13_extended_robustness.log
+72 −0
@@ -0,0 +1,72 @@ | ||
| 1 | +====================================================================== | |
| 2 | +EXTENDED ROBUSTNESS ANALYSES | |
| 3 | +====================================================================== | |
| 4 | + | |
| 5 | +--- A. WINSORIZATION SENSITIVITY (5-day returns) --- | |
| 6 | + None : R²=0.0335, t_kurt= 13.76, t_pc= -3.59, sig=8/10 | |
| 7 | + 0.5% : R²=0.0510, t_kurt= 36.51, t_pc=-21.31, sig=10/10 | |
| 8 | + 1% (baseline) : R²=0.0529, t_kurt= 40.07, t_pc=-21.48, sig=9/10 | |
| 9 | + 2.5% : R²=0.0577, t_kurt= 43.66, t_pc=-21.32, sig=9/10 | |
| 10 | + 5% : R²=0.0619, t_kurt= 45.73, t_pc=-20.86, sig=9/10 | |
| 11 | + | |
| 12 | +--- B. NEWEY-WEST LAG SENSITIVITY --- | |
| 13 | + 1-Day | NW( 5): 4/10 significant at 5% | |
| 14 | + 1-Day | NW(10): 4/10 significant at 5% | |
| 15 | + 1-Day | NW(22): 4/10 significant at 5% | |
| 16 | + 5-Day | NW( 5): 9/10 significant at 5% | |
| 17 | + 5-Day | NW(10): 9/10 significant at 5% | |
| 18 | + 5-Day | NW(22): 9/10 significant at 5% | |
| 19 | + | |
| 20 | +--- C. RANK-BASED INFORMATION COEFFICIENTS (stocks) --- | |
| 21 | + 1-Day | iv_atm_30d : IC=+0.0140, t= 1.84, %>0= 52.2 | |
| 22 | + 1-Day | iv_term_slope : IC=-0.0013, t= -0.25, %>0= 49.2 | |
| 23 | + 1-Day | iv_skew_25d : IC=+0.0200, t= 3.51, %>0= 53.1 | |
| 24 | + 1-Day | implied_skewness : IC=-0.0018, t= -0.32, %>0= 50.3 | |
| 25 | + 1-Day | implied_kurtosis_proxy : IC=-0.0083, t= -1.44, %>0= 49.0 | |
| 26 | + 1-Day | pc_volume_ratio : IC=+0.0133, t= 3.10, %>0= 54.2 | |
| 27 | + 1-Day | pc_oi_ratio : IC=+0.0071, t= 1.56, %>0= 51.0 | |
| 28 | + 1-Day | net_gamma_exposure : IC=-0.0107, t= -2.17, %>0= 48.1 | |
| 29 | + 1-Day | rv_daily : IC=-0.0004, t= -0.06, %>0= 50.0 | |
| 30 | + 1-Day | rv_w : IC=+0.0019, t= 0.28, %>0= 50.1 | |
| 31 | + 5-Day | iv_atm_30d : IC=+0.0085, t= 1.09, %>0= 53.0 | |
| 32 | + 5-Day | iv_term_slope : IC=+0.0328, t= 6.30, %>0= 54.6 | |
| 33 | + 5-Day | iv_skew_25d : IC=-0.0558, t= -9.66, %>0= 41.9 | |
| 34 | + 5-Day | implied_skewness : IC=-0.0188, t= -3.30, %>0= 47.4 | |
| 35 | + 5-Day | implied_kurtosis_proxy : IC=+0.0978, t= 16.77, %>0= 64.3 | |
| 36 | + 5-Day | pc_volume_ratio : IC=-0.0591, t= -13.81, %>0= 37.2 | |
| 37 | + 5-Day | pc_oi_ratio : IC=+0.0170, t= 3.63, %>0= 52.4 | |
| 38 | + 5-Day | net_gamma_exposure : IC=+0.1702, t= 33.99, %>0= 77.8 | |
| 39 | + 5-Day | rv_daily : IC=+0.0161, t= 2.41, %>0= 52.7 | |
| 40 | + 5-Day | rv_w : IC=+0.0120, t= 1.73, %>0= 51.2 | |
| 41 | + | |
| 42 | +--- D. DECILE SORTS (D10 - D1, 5-day returns) --- | |
| 43 | + Implied Kurtosis | Quintile (baseline) : ann.ret= 44.04%, Sharpe= 2.328, t= 19.84 | |
| 44 | + Implied Kurtosis | Decile : ann.ret= 52.08%, Sharpe= 2.185, t= 18.56 | |
| 45 | + Put-Call Volume Ratio | Quintile (baseline) : ann.ret= -30.29%, Sharpe=-2.478, t= -21.80 | |
| 46 | + Put-Call Volume Ratio | Decile : ann.ret= -33.37%, Sharpe=-2.099, t= -18.47 | |
| 47 | + Volatility Skew (25d) | Quintile (baseline) : ann.ret= -37.53%, Sharpe=-1.868, t= -15.92 | |
| 48 | + Volatility Skew (25d) | Decile : ann.ret= -52.51%, Sharpe=-1.896, t= -16.11 | |
| 49 | + | |
| 50 | +--- E. LEAVE-ONE-YEAR-OUT PANEL R² --- | |
| 51 | + excl. 2010: 5D-ret R²=0.0537, HAR+IV RV R²=0.4852 | |
| 52 | + excl. 2011: 5D-ret R²=0.0535, HAR+IV RV R²=0.4810 | |
| 53 | + excl. 2012: 5D-ret R²=0.0537, HAR+IV RV R²=0.4831 | |
| 54 | + excl. 2013: 5D-ret R²=0.0538, HAR+IV RV R²=0.4800 | |
| 55 | + excl. 2014: 5D-ret R²=0.0529, HAR+IV RV R²=0.4833 | |
| 56 | + excl. 2015: 5D-ret R²=0.0514, HAR+IV RV R²=0.4922 | |
| 57 | + excl. 2016: 5D-ret R²=0.0520, HAR+IV RV R²=0.4844 | |
| 58 | + excl. 2017: 5D-ret R²=0.0547, HAR+IV RV R²=0.4839 | |
| 59 | + excl. 2018: 5D-ret R²=0.0469, HAR+IV RV R²=0.4861 | |
| 60 | + excl. 2019: 5D-ret R²=0.0540, HAR+IV RV R²=0.4858 | |
| 61 | + excl. 2020: 5D-ret R²=0.0505, HAR+IV RV R²=0.4142 | |
| 62 | + excl. 2021: 5D-ret R²=0.0557, HAR+IV RV R²=0.4817 | |
| 63 | + excl. 2022: 5D-ret R²=0.0500, HAR+IV RV R²=0.4786 | |
| 64 | + excl. 2023: 5D-ret R²=0.0532, HAR+IV RV R²=0.4883 | |
| 65 | + excl. 2024: 5D-ret R²=0.0572, HAR+IV RV R²=0.4895 | |
| 66 | + excl. 2025: 5D-ret R²=0.0573, HAR+IV RV R²=0.4900 | |
| 67 | + | |
| 68 | +--- F. PLACEBO TEST (features permuted within ticker) --- | |
| 69 | + Actual R²: 0.0529 (N=119,081) | |
| 70 | + Placebo R² over 10 draws: mean=0.000804, max=0.000982 | |
| 71 | + | |
| 72 | +EXTENDED ROBUSTNESS COMPLETE. | |
added
_verify/results/descriptive_autocorrelations.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +variable,lag,avg_autocorr | |
| 2 | +iv_atm_30d,1,0.9592728365408905 | |
| 3 | +iv_atm_30d,5,0.860490448442951 | |
| 4 | +iv_atm_30d,10,0.7525586182871806 | |
| 5 | +iv_atm_30d,22,0.5376331506127137 | |
| 6 | +iv_skew_25d,1,0.8320262103395855 | |
| 7 | +iv_skew_25d,5,0.7111734826039526 | |
| 8 | +iv_skew_25d,10,0.5930315973773796 | |
| 9 | +iv_skew_25d,22,0.41602239955232856 | |
| 10 | +rv_daily,1,0.3197367267859841 | |
| 11 | +rv_daily,5,0.21094579758939003 | |
| 12 | +rv_daily,10,0.13867834780170124 | |
| 13 | +rv_daily,22,0.05726846293551011 | |
| 14 | +daily_return,1,-0.06184021467546654 | |
| 15 | +daily_return,5,-0.010432528026758989 | |
| 16 | +daily_return,10,-0.005825324552553195 | |
| 17 | +daily_return,22,-0.029889633855063914 | |
| 18 | +pc_volume_ratio,1,0.2992094150098126 | |
| 19 | +pc_volume_ratio,5,0.21816764253881243 | |
| 20 | +pc_volume_ratio,10,0.1717197805083051 | |
| 21 | +pc_volume_ratio,22,0.117984242042143 | |
added
_verify/results/descriptive_by_group.csv
+5 −0
@@ -0,0 +1,5 @@ | ||
| 1 | +Group,N_obs,N_tickers,Date_min,Date_max,Mean_IV_ATM,Std_IV_ATM,Mean_RV,Mean_Skew,Mean_Ret_1d,Std_Ret_1d,Mean_PC_ratio | |
| 2 | +Stocks,188093,49,2010-01-04,2025-12-31,0.26635484437446266,0.12001045805245089,0.0004863592952177116,0.03614561510932377,0.0005422781792618706,0.01901712817556674,0.890054068073878 | |
| 3 | +ETFs,64256,17,2010-01-04,2025-12-31,0.17838701250486216,0.0738950556393931,0.00019979200172208882,0.04253964408090098,0.00034922540563498734,0.012498140766909539,2.3454580288965676 | |
| 4 | +Indices,12034,3,2010-01-04,2025-12-31,0.18227346379280654,0.07106732907176552,0.00013525566205162284,0.056216542666832216,0.00047203897814238716,0.01289727864086633,1.7544899128965963 | |
| 5 | +All,264383,69,2010-01-04,2025-12-31,0.24059665686005302,0.11546400261064191,0.00040073030571242783,0.03873144189798992,0.0004921612747391106,0.017402131346727637,1.2831191218436342 | |
added
_verify/results/descriptive_correlation_matrix.csv
+12 −0
@@ -0,0 +1,12 @@ | ||
| 1 | +,iv_atm_30d,iv_term_slope,iv_skew_25d,implied_skewness,implied_kurtosis_proxy,pc_volume_ratio,pc_oi_ratio,rv_daily,rv_weekly,ret_1d,ret_5d | |
| 2 | +iv_atm_30d,1.0,-0.535,0.279,-0.228,-0.243,-0.067,-0.153,0.33,0.503,0.021,-0.072 | |
| 3 | +iv_term_slope,-0.535,1.0,-0.257,0.065,0.157,0.01,0.064,-0.23,-0.317,-0.002,0.102 | |
| 4 | +iv_skew_25d,0.279,-0.257,1.0,0.484,0.162,0.059,0.126,0.16,0.249,0.01,-0.109 | |
| 5 | +implied_skewness,-0.228,0.065,0.484,1.0,0.693,0.1,0.265,-0.034,-0.052,-0.004,-0.027 | |
| 6 | +implied_kurtosis_proxy,-0.243,0.157,0.162,0.693,1.0,0.05,0.134,-0.057,-0.08,-0.008,0.071 | |
| 7 | +pc_volume_ratio,-0.067,0.01,0.059,0.1,0.05,1.0,0.149,-0.013,-0.021,-0.002,-0.016 | |
| 8 | +pc_oi_ratio,-0.153,0.064,0.126,0.265,0.134,0.149,1.0,-0.038,-0.069,-0.003,-0.009 | |
| 9 | +rv_daily,0.33,-0.23,0.16,-0.034,-0.057,-0.013,-0.038,1.0,0.567,0.006,-0.073 | |
| 10 | +rv_weekly,0.503,-0.317,0.249,-0.052,-0.08,-0.021,-0.069,0.567,1.0,0.009,-0.052 | |
| 11 | +ret_1d,0.021,-0.002,0.01,-0.004,-0.008,-0.002,-0.003,0.006,0.009,1.0,0.438 | |
| 12 | +ret_5d,-0.072,0.102,-0.109,-0.027,0.071,-0.016,-0.009,-0.073,-0.052,0.438,1.0 | |
added
_verify/results/descriptive_coverage_by_year.csv
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +year,n_obs,n_tickers,avg_iv_atm,avg_rv,avg_skew,avg_ret,std_ret | |
| 2 | +2010,15218,62,0.264696,0.000547,0.04947,0.000471,0.017329 | |
| 3 | +2011,15569,62,0.282896,0.000563,0.061525,-4e-06,0.020206 | |
| 4 | +2012,15500,62,0.228746,0.000326,0.040406,0.000533,0.014915 | |
| 5 | +2013,15874,63,0.200215,0.000254,0.028301,0.00119,0.013839 | |
| 6 | +2014,16065,64,0.185413,0.000254,0.026055,0.000407,0.012904 | |
| 7 | +2015,16099,65,0.21268,0.000339,0.038343,0.000207,0.015066 | |
| 8 | +2016,16466,66,0.215971,0.000344,0.041839,0.00049,0.015395 | |
| 9 | +2017,16566,66,0.17339,0.000209,0.025553,0.000868,0.011458 | |
| 10 | +2018,16654,68,0.225917,0.000464,0.036186,-8.3e-05,0.017526 | |
| 11 | +2019,16882,68,0.216182,0.000276,0.040292,0.000988,0.015218 | |
| 12 | +2020,17125,68,0.346799,0.000966,0.061179,0.000695,0.027671 | |
| 13 | +2021,17254,69,0.245828,0.000301,0.033569,0.000899,0.015757 | |
| 14 | +2022,17229,69,0.312147,0.000542,0.056636,-0.000773,0.021792 | |
| 15 | +2023,17246,69,0.237981,0.000285,0.037973,0.000841,0.015617 | |
| 16 | +2024,17386,69,0.232136,0.000313,0.021159,0.000597,0.016418 | |
| 17 | +2025,17250,69,0.264178,0.000422,0.033779,0.000551,0.019689 | |
added
_verify/results/descriptive_cross_sectional_dispersion.csv
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +year,iv_atm_cs_std,skew_cs_std,rv_cs_std,ret_cs_std,n_tickers | |
| 2 | +2010,0.097143,0.042235,0.002386,0.017329,62 | |
| 3 | +2011,0.124911,0.043633,0.001675,0.020206,62 | |
| 4 | +2012,0.107011,0.039278,0.000837,0.014915,62 | |
| 5 | +2013,0.104272,0.031329,0.000649,0.013839,63 | |
| 6 | +2014,0.084579,0.016429,0.001486,0.012904,64 | |
| 7 | +2015,0.091141,0.033292,0.001129,0.015066,65 | |
| 8 | +2016,0.100822,0.040095,0.001939,0.015395,66 | |
| 9 | +2017,0.083544,0.050258,0.001778,0.011458,66 | |
| 10 | +2018,0.104781,0.024853,0.002981,0.017526,68 | |
| 11 | +2019,0.091634,0.018423,0.001202,0.015218,68 | |
| 12 | +2020,0.164618,0.064908,0.002091,0.027671,68 | |
| 13 | +2021,0.101447,0.065147,0.0005,0.015757,69 | |
| 14 | +2022,0.110083,0.031943,0.000858,0.021792,69 | |
| 15 | +2023,0.094717,0.023991,0.000595,0.015617,69 | |
| 16 | +2024,0.101824,0.018979,0.000735,0.016418,69 | |
| 17 | +2025,0.110374,0.027993,0.001025,0.019689,69 | |
added
_verify/results/descriptive_summary_stats.csv
+24 −0
@@ -0,0 +1,24 @@ | ||
| 1 | +,count,mean,std,min,1%,5%,25%,50%,75%,95%,99%,max,skewness,kurtosis,pct_missing | |
| 2 | +iv_atm_30d,236475.0,0.24059665686005302,0.11546400261064191,0.045149999999999996,0.09731604761904761,0.11867198412698413,0.16278,0.21250000000000002,0.2836692307692308,0.4651756818181818,0.6548320000000002,3.0159,2.2135620764266073,10.92432765550004,10.555898072115076 | |
| 3 | +iv_atm_90d,131476.0,0.24376081999403457,0.10357525119688325,0.0,0.10661666666666665,0.12971916666666666,0.173025,0.21955,0.286325,0.45043750000000005,0.6097125,1.50696875,1.826665591919962,5.61940871178548,50.270630108592464 | |
| 4 | +iv_term_slope,124270.0,0.002214315247264522,0.03644156518965625,-0.8957666666666666,-0.11732206150793646,-0.05911466666666666,-0.010149999999999992,0.007728660714285726,0.020810645053475945,0.0448429934210526,0.07012685716783217,0.6817916666666666,-1.7041797261595744,49.60476268978388,52.99622139093664 | |
| 5 | +iv_skew_25d,228312.0,0.03873144189798992,0.040371360598382824,-1.5878,-0.017050593333333277,0.0028612976044226214,0.021987500000000014,0.034258090437788005,0.04955624999999992,0.08414999999999995,0.1447324819444442,2.9163333333333337,16.097668566692892,788.0616853779302,13.643464216685642 | |
| 6 | +implied_skewness,229856.0,0.38121736691148084,0.296451072084222,-7.829815393638992,-0.1329156325094457,0.030452742711783793,0.23387352440427323,0.36042126396277974,0.5083632196426691,0.7443977143095875,1.0063572240997747,20.93355754857997,10.637511271288002,386.826675460415,13.059462976061246 | |
| 7 | +implied_kurtosis_proxy,236436.0,1.2612816036768173,0.2720281120233158,0.0,0.9974434466422932,1.0599576980557062,1.1409909592619876,1.216043619449638,1.3215414465288216,1.5597282406707427,1.977742400047588,19.34128662035639,14.66835247639418,469.4937474208965,10.570649398788879 | |
| 8 | +pc_volume_ratio,264365.0,1.2831191218436342,4.314381979656647,0.0,0.1184310631926767,0.27121300341800963,0.554651144693633,0.845342198453422,1.3525559673079852,3.0719904948457737,7.682400287459553,1031.138528138528,117.66536452116708,22206.91205964587,0.006808304618678205 | |
| 9 | +pc_oi_ratio,264360.0,1.1557369199703253,0.7230771290289001,0.0,0.39124218988459014,0.5368117836803997,0.7693031361817986,0.9838043760337389,1.335905656481052,2.3364548256874684,3.4631250740348465,147.2967409948542,41.63774793896402,7371.450513244507,0.008699500346088818 | |
| 10 | +net_gamma_exposure,264383.0,-6.003200818470901e+37,3.8362012518777524e+40,-1.2434597510865127e+43,-78811.66645199998,-13309.295490000015,-72.4060999999989,624.4674,3896.1542500000023,29565.892430000004,96604.99421199977,1.1407625388710046e+43,-33.71025982847343,76626.1345355379,0.0 | |
| 11 | +avg_vega_30d,244920.0,-1.9415400764096769e+31,8.519508906548525e+33,-2.859515517970832e+36,0.0022799999999999995,0.005939211423699911,0.022477619047619045,0.04635644324548662,0.08287745354239255,0.49790896956424074,2.601142458689459,5.251270781458781e+35,-297.53223300508887,99056.51730337592,7.361668488518551 | |
| 12 | +avg_theta_30d,244919.0,-1.4522160866555816e+31,5.567071913783503e+33,-1.76312121944393e+36,-1.0364389911397107,-0.22287204464285723,-0.04259600988700564,-0.018790000000000005,-0.00884333853270224,-0.0028652589587559248,-0.0013062594537815123,1.3945997813054467e+36,-137.4558920975691,75055.46896118295,7.362046727664033 | |
| 13 | +total_option_volume,264383.0,99848.1113195629,266801.37520592957,0.0,542.0,2282.1000000000004,9503.0,21782.0,61329.5,485055.7999999995,1411185.9999999995,7317630.0,6.193609115538391,55.54427910677232,0.0 | |
| 14 | +total_oi,264383.0,1131087.6974238132,2393079.7653611824,0.0,17757.100000000002,58093.1,162681.0,326245.0,858131.0,5051509.3,13765023.19999998,34225198.0,4.314969706380939,21.782915613491635,0.0 | |
| 15 | +rv_daily,264383.0,0.00040073030571242783,0.0015373425069068758,1.3768559028485862e-06,1.6268291267545182e-05,3.255445647704381e-05,8.610603043620723e-05,0.00017102609348791355,0.0003613316700531579,0.0012712464869274456,0.0037993331269221635,0.262113205775071,65.0192350791737,8080.490217231984,0.0 | |
| 16 | +rvol_daily,264383.0,0.016058334343875397,0.01195243674603625,0.0011733950327356027,0.004033396987242746,0.005705651275401214,0.009279333512133272,0.01307769450201042,0.019008726155453667,0.035654543705416784,0.06163873073738284,0.5119699266315073,5.250388246503591,78.36767957553224,0.0 | |
| 17 | +rv_weekly,264376.0,0.002004234313553365,0.004483295729211252,2.240963617665533e-05,0.0001192418441172048,0.00021961741031746219,0.0005280666354195562,0.0009981191401328801,0.00201445189045793,0.006400268729689679,0.016330381185275824,0.26813351965687465,18.273197892293776,687.8067480899355,0.0026476740183748577 | |
| 18 | +daily_return,264383.0,0.0004931375757165654,0.017401505071253712,-0.34146660820780744,-0.048616807162727455,-0.024992839062357955,-0.007006595046734136,0.0006311139370100773,0.008249620294458186,0.025035502227542812,0.048479995130289256,0.35429575109859524,-0.13690080815424654,16.59414595254334,0.0 | |
| 19 | +realized_skew,264383.0,0.10472644456787142,1.7604272294478531,-12.146119981792701,-4.888301717851265,-2.579167831052471,-0.7306972922207067,0.04277738200343342,0.8843473328226423,2.98892741438237,5.533776997053528,11.890223343080633,0.23729732402068204,3.9963586655308903,0.0 | |
| 20 | +realized_kurt,264383.0,11.414495043039281,10.813811721895863,1.9732620131613592,2.951198894514506,3.585530848920119,5.286177777626968,7.788030853629648,13.117602676270334,32.03678964300675,55.30907031744122,156.6544763306374,3.6147282988073712,21.075240982912334,0.0 | |
| 21 | +ret_1d,264383.0,0.0004921612747391106,0.017402131346727637,-0.34146660820780744,-0.04861589873670486,-0.024993515057339464,-0.007011148111940965,0.0006310277484861863,0.008249018827133768,0.025034835668677112,0.0484867173148171,0.35429575109859524,-0.1369138439158137,16.58939772377889,0.0 | |
| 22 | +ret_5d,264376.0,0.002462273467014857,0.037564006342308845,-0.6963033699729,-0.10730782433400138,-0.05477268982320896,-0.014573271363676164,0.003523198007316708,0.02058717249257189,0.05657238919898349,0.10349160694254442,0.6680591286973019,-0.36657522021349376,11.49346828532021,0.0026476740183748577 | |
| 23 | +rv_fwd_1d,264383.0,0.0004006746225960613,0.0015372182562227563,0.0,1.6268291267545182e-05,3.255418815372144e-05,8.610936501935275e-05,0.00017103325021062643,0.0003613209515248866,0.0012711582755783669,0.003795880003549758,0.262113205775071,65.03430629901956,8083.109163340245,0.0 | |
| 24 | +rv_fwd_5d,264376.0,0.0020038041274330134,0.004481792473205312,2.240963617665533e-05,0.00011926852998930454,0.00021961079215989282,0.0005279488831194709,0.0009979124041882338,0.0020139607451699474,0.0063987616724714355,0.016328470914410597,0.26813351965687465,18.283436681406506,688.6316620154149,0.0026476740183748577 | |
added
_verify/results/double_sort_iv_skew.csv
+10 −0
@@ -0,0 +1,10 @@ | ||
| 1 | +q1,q2,mean,std,count,mean_bps,t_stat | |
| 2 | +1,1,0.0008151427739457642,0.033377056486195406,6957,8.151427739457642,2.037026369141118 | |
| 3 | +1,2,0.002411837974402523,0.02828823263093608,16889,24.11837974402523,11.080115355853012 | |
| 4 | +1,3,0.0035903372888018057,0.025505804176619695,31471,35.903372888018055,24.971894995225732 | |
| 5 | +2,1,0.0022108846597390075,0.03996305608120129,13706,22.108846597390077,6.476833870083081 | |
| 6 | +2,2,0.0023802914524478276,0.034764369060130494,21968,23.802914524478275,10.148247378651282 | |
| 7 | +2,3,0.0015624032033988058,0.03486427973013344,16925,15.624032033988058,5.830110175075233 | |
| 8 | +3,1,0.004176092660489417,0.059249718842900936,34653,41.760926604894166,13.120616803733691 | |
| 9 | +3,2,0.00027228795074543384,0.04917731278237744,13741,2.7228795074543384,0.6490419974337353 | |
| 10 | +3,3,-0.004782166489784315,0.05613027265750696,5247,-47.82166489784315,-6.171391132326184 | |
added
_verify/results/fevd_results.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +horizon,pct_rv_explained_by_iv,pct_rv_explained_by_rv | |
| 2 | +1,0.0,100.0 | |
| 3 | +2,28.007319977109773,71.99268002289023 | |
| 4 | +3,44.31703720059686,55.68296279940314 | |
| 5 | +4,51.2787348139848,48.7212651860152 | |
| 6 | +5,56.097204489827945,43.902795510172055 | |
| 7 | +6,58.76175896703148,41.23824103296852 | |
| 8 | +7,61.23547099982887,38.76452900017113 | |
| 9 | +8,63.28656618802056,36.71343381197944 | |
| 10 | +9,64.98337674753192,35.01662325246808 | |
| 11 | +10,66.40599563729681,33.59400436270319 | |
| 12 | +11,67.61238521557925,32.38761478442075 | |
| 13 | +12,68.66288974863929,31.337110251360713 | |
| 14 | +13,69.58433031188325,30.415669688116754 | |
| 15 | +14,70.39856183459655,29.601438165403447 | |
| 16 | +15,71.12371125728144,28.876288742718558 | |
| 17 | +16,71.77358399509686,28.226416004903143 | |
| 18 | +17,72.35964179157776,27.640358208422246 | |
| 19 | +18,72.89070607078271,27.109293929217294 | |
| 20 | +19,73.37402010639872,26.625979893601283 | |
| 21 | +20,73.81558160584333,26.184418394156662 | |
added
_verify/results/granger_causality.csv
+13 −0
@@ -0,0 +1,13 @@ | ||
| 1 | +test,x_causes_y,avg_f_stat,avg_p_value,pct_significant_5pct,n_tickers | |
| 2 | +ATM_IV → RV,iv_atm_30d → rv_daily,62.38106520233454,5.071267131906581e-06,1.0,69 | |
| 3 | +RV → ATM_IV,rv_daily → iv_atm_30d,17.93328431789443,0.1501452411701772,0.6086956521739131,69 | |
| 4 | +Skew → RV,iv_skew_25d → rv_daily,20.791857936401055,0.017692917026207,0.9420289855072463,69 | |
| 5 | +RV → Skew,rv_daily → iv_skew_25d,6.589389745339389,0.06276398502636327,0.7536231884057971,69 | |
| 6 | +ATM_IV → Return,iv_atm_30d → daily_return,1.7993928901045277,0.26877798412828896,0.2463768115942029,69 | |
| 7 | +Return → ATM_IV,daily_return → iv_atm_30d,3.97669158479031,0.17413499102184163,0.5797101449275363,69 | |
| 8 | +Skew → Return,iv_skew_25d → daily_return,1.4117792320379197,0.3816573851754093,0.13043478260869565,69 | |
| 9 | +Return → Skew,daily_return → iv_skew_25d,13.575983727116343,0.013298458114111802,0.9565217391304348,69 | |
| 10 | +PC_Ratio → Return,pc_volume_ratio → daily_return,1.0097282323014063,0.4998910943647584,0.057971014492753624,69 | |
| 11 | +Return → PC_Ratio,daily_return → pc_volume_ratio,2.818845690358881,0.163775811354732,0.463768115942029,69 | |
| 12 | +Impl_Skew → RV,implied_skewness → rv_daily,1.3428309373629477,0.38563328915245215,0.17391304347826086,69 | |
| 13 | +Impl_Kurt → RV,implied_kurtosis_proxy → rv_daily,5.619277955929179,0.08610874071907491,0.7536231884057971,69 | |
added
_verify/results/irf_results.csv
+401 −0
@@ -0,0 +1,401 @@ | ||
| 1 | +ticker,horizon,iv_to_iv,rv_to_iv,iv_to_rv,rv_to_rv | |
| 2 | +AAPL,0,1.0,0.0,0.0,1.0 | |
| 3 | +AAPL,1,0.9491628014472261,-0.09369294246277493,0.7302331195844844,0.22332755127331197 | |
| 4 | +AAPL,2,0.8999020259215128,-0.0972449446269237,0.7138167849600129,0.11953523883349865 | |
| 5 | +AAPL,3,0.8351874851785384,-0.10527848394071052,0.5068263379824429,0.09074680201696166 | |
| 6 | +AAPL,4,0.7725921496313757,-0.09368464087399613,0.45490554654957505,0.0839824664455832 | |
| 7 | +AAPL,5,0.7423383999903761,-0.08692095069551287,0.3910242176668831,0.04838956326745372 | |
| 8 | +AAPL,6,0.721343446974212,-0.0854114097093654,0.36953854030564726,0.02917585872501858 | |
| 9 | +AAPL,7,0.6988751221295173,-0.0836485913420387,0.3491022816886294,0.013474479683699137 | |
| 10 | +AAPL,8,0.676141848733351,-0.08156921444641121,0.3302083188511221,0.0023223231704330577 | |
| 11 | +AAPL,9,0.6531295569985458,-0.07929822693388366,0.3130894008679397,-0.006466735417599914 | |
| 12 | +AAPL,10,0.6307152116639085,-0.07690345233825852,0.2974946334125261,-0.012659948712419815 | |
| 13 | +AAPL,11,0.6092578278618626,-0.07450109847308342,0.2834724263594734,-0.016852458810394294 | |
| 14 | +AAPL,12,0.5886459348678125,-0.07213676794170272,0.271060587033282,-0.019773216568271777 | |
| 15 | +AAPL,13,0.5688004207686614,-0.06982462644236226,0.2598416565614958,-0.02176694440353128 | |
| 16 | +AAPL,14,0.5496493503767337,-0.06756939277194418,0.24954100651698596,-0.023044935980406477 | |
| 17 | +AAPL,15,0.531148939956928,-0.06536839573029841,0.23997398131053385,-0.023783563275686558 | |
| 18 | +AAPL,16,0.5132770560717088,-0.06322372599951294,0.23101416593532798,-0.024123963294458376 | |
| 19 | +AAPL,17,0.49601346843360206,-0.0611382675003366,0.22257535969659697,-0.024171660478459544 | |
| 20 | +AAPL,18,0.4793370303990735,-0.05911349747136216,0.2145878108815762,-0.024005934968086746 | |
| 21 | +AAPL,19,0.4632265477842629,-0.057149829804444996,0.20699564954590438,-0.02368624181534601 | |
| 22 | +ADBE,0,1.0,0.0,0.0,1.0 | |
| 23 | +ADBE,1,0.9302496119741623,-0.08979219663546506,0.5094952038997103,0.25361837830548456 | |
| 24 | +ADBE,2,0.9169295663782089,-0.10006818500764382,0.611697245226565,0.1323205425619738 | |
| 25 | +ADBE,3,0.8837742214333854,-0.09426635260718486,0.36111568626234153,0.10770909754174356 | |
| 26 | +ADBE,4,0.8559936445633116,-0.08776998273882314,0.30629451385852113,0.07298784397955238 | |
| 27 | +ADBE,5,0.8289432821267361,-0.0854047860215809,0.35041678985835173,0.05876178288987368 | |
| 28 | +ADBE,6,0.7962651714174057,-0.08389279762313741,0.3346855043939817,0.027295120847725625 | |
| 29 | +ADBE,7,0.7621711443890571,-0.0808285975646579,0.3188679956141088,0.009339614454755195 | |
| 30 | +ADBE,8,0.729505844099393,-0.07745732189707545,0.3023816922930513,-0.0006335076960076735 | |
| 31 | +ADBE,9,0.6987287180461957,-0.0742245485976183,0.2885025890618275,-0.007622538036408347 | |
| 32 | +ADBE,10,0.6691959579242421,-0.07118918494455959,0.27709675687953045,-0.012555965919189461 | |
| 33 | +ADBE,11,0.640749115734859,-0.06826982223461225,0.2654479105469651,-0.016141275107590156 | |
| 34 | +ADBE,12,0.6134696097414559,-0.06542293371204223,0.254017950636567,-0.018363169739889742 | |
| 35 | +ADBE,13,0.5873570052231396,-0.06267293468714506,0.24309825217734188,-0.019624433441351445 | |
| 36 | +ADBE,14,0.5623665757758222,-0.06003171167227898,0.2327231970998293,-0.02026538440671663 | |
| 37 | +ADBE,15,0.5384389256806844,-0.05749777590379905,0.22282294687110166,-0.020479148119742812 | |
| 38 | +ADBE,16,0.5155258217559292,-0.055066262960670534,0.2133333406874859,-0.02039183566820415 | |
| 39 | +ADBE,17,0.49358683562248845,-0.0527335019019671,0.20424368586227593,-0.020089627061530897 | |
| 40 | +ADBE,18,0.4725818317232248,-0.05049688952259167,0.19554379671802202,-0.01964228298960137 | |
| 41 | +ADBE,19,0.4524710029361621,-0.048353427746951824,0.18721774540906536,-0.019101146120183946 | |
| 42 | +AMD,0,1.0,0.0,0.0,1.0 | |
| 43 | +AMD,1,0.9216099428754457,-0.068392483049168,0.3544973844001665,0.27698720135317084 | |
| 44 | +AMD,2,0.8756798974918839,-0.07990994643807438,0.46562195442368665,0.12758476044312497 | |
| 45 | +AMD,3,0.792665328658153,-0.07090106062405793,0.39171527050447025,0.11389727263261942 | |
| 46 | +AMD,4,0.7591125327001758,-0.06635425921307404,0.37411644314252673,0.0786486104842114 | |
| 47 | +AMD,5,0.7174157370709233,-0.04365464713312587,0.2900504401120797,0.1304280666334478 | |
| 48 | +AMD,6,0.6923328039753085,-0.04359163622952793,0.297192000552184,0.07983353443323538 | |
| 49 | +AMD,7,0.6671532624520072,-0.04255126676640042,0.2977963144357789,0.05308898250757024 | |
| 50 | +AMD,8,0.6406210197576644,-0.040212255144189045,0.2857243099766993,0.04097213672765611 | |
| 51 | +AMD,9,0.6147539952879343,-0.037838562612982754,0.2744210802800511,0.029615639121882958 | |
| 52 | +AMD,10,0.5887679265229323,-0.03445270209934579,0.2591463430383607,0.02530505884566761 | |
| 53 | +AMD,11,0.5647401715208523,-0.032435388531244946,0.24893274388806136,0.017443583260344123 | |
| 54 | +AMD,12,0.5418971793839147,-0.03071359336676452,0.2394804112141589,0.011424012909105937 | |
| 55 | +AMD,13,0.5198969177548269,-0.029067525023764692,0.2296964925485772,0.007316261870554685 | |
| 56 | +AMD,14,0.4987610255712148,-0.027561197066470845,0.2203400007633781,0.003967373790777846 | |
| 57 | +AMD,15,0.47840661085583225,-0.02610869966127673,0.21112421578964233,0.001605030985135831 | |
| 58 | +AMD,16,0.45891689468262054,-0.02481873347533437,0.20249269961915908,-0.0004295261168750248 | |
| 59 | +AMD,17,0.4402362651684532,-0.023635207387615105,0.19426054193200853,-0.0020083108569677894 | |
| 60 | +AMD,18,0.4223119338728264,-0.022529162782160193,0.18632726829708823,-0.003169422946569987 | |
| 61 | +AMD,19,0.4051160451188908,-0.021496463866959158,0.1787227764187725,-0.004046274190395337 | |
| 62 | +AMZN,0,1.0,0.0,0.0,1.0 | |
| 63 | +AMZN,1,0.9630122461180566,-0.1472144359466316,0.6896034283250196,0.21632890279336062 | |
| 64 | +AMZN,2,0.9230827991186789,-0.1504497818270929,0.6708345432584872,0.07185614520517987 | |
| 65 | +AMZN,3,0.8482597311409522,-0.14834830194548104,0.426308702751436,0.0544559266749092 | |
| 66 | +AMZN,4,0.8518604579603981,-0.15218785059711148,0.46348056855285585,0.00790033725056713 | |
| 67 | +AMZN,5,0.8004860774792179,-0.14367541011672708,0.39573412661973484,0.019591093227248224 | |
| 68 | +AMZN,6,0.7709348067899594,-0.143658734487908,0.38455672655276935,-0.009911753732238904 | |
| 69 | +AMZN,7,0.7368112243373836,-0.1404243990825162,0.3594098942704663,-0.026245309856837103 | |
| 70 | +AMZN,8,0.7058794978690283,-0.13627514784900865,0.33554516438356513,-0.03416248772637725 | |
| 71 | +AMZN,9,0.6757665642555821,-0.1318424067321745,0.31698449195840844,-0.03986987000337053 | |
| 72 | +AMZN,10,0.6474322518249962,-0.12713289256836258,0.2998343965037628,-0.04222807483821369 | |
| 73 | +AMZN,11,0.6204161710950019,-0.12257944886751936,0.28498257526087384,-0.04419475907536469 | |
| 74 | +AMZN,12,0.5946742052203593,-0.11802850151624011,0.27151608975750113,-0.04515132891984174 | |
| 75 | +AMZN,13,0.5699930199917643,-0.11351159064438972,0.2588332817091119,-0.04520059716336484 | |
| 76 | +AMZN,14,0.5464358925407478,-0.1090957182241232,0.2471864229900117,-0.04474593401662019 | |
| 77 | +AMZN,15,0.5238802239627844,-0.10478935684634544,0.23626666973601296,-0.043894033146254945 | |
| 78 | +AMZN,16,0.5022931817376775,-0.10061718643582027,0.22602517799971505,-0.04282475961589046 | |
| 79 | +AMZN,17,0.48161533973067644,-0.09658187576320845,0.2163535725819328,-0.041605215189404444 | |
| 80 | +AMZN,18,0.46180476582407676,-0.0926863911324413,0.2071828062848682,-0.04028672224005786 | |
| 81 | +AMZN,19,0.4428207515357764,-0.08893245775244615,0.1984692991515842,-0.03891664700454971 | |
| 82 | +BA,0,1.0,0.0,0.0,1.0 | |
| 83 | +BA,1,0.9129241026443526,0.007304217645629973,0.8895119743268142,0.2643292066995809 | |
| 84 | +BA,2,0.9010853430049561,0.00900410941454996,0.9318869401780434,0.20606213665033138 | |
| 85 | +BA,3,0.8368322762141767,0.00998098030773872,0.6527571413304541,0.17532532992117747 | |
| 86 | +BA,4,0.8462684752718378,0.00838471482836589,0.6935844842550087,0.15866806361704655 | |
| 87 | +BA,5,0.8364570906677505,0.010251972436108654,0.5504694748912625,0.1671535669344901 | |
| 88 | +BA,6,0.8312343643829592,0.011068354401595688,0.5901428276746987,0.11201778944343335 | |
| 89 | +BA,7,0.8220914954012695,0.011653046625351665,0.562604534737232,0.09236117057596901 | |
| 90 | +BA,8,0.8144042697752396,0.01185837754960591,0.541966197610837,0.07701678959110697 | |
| 91 | +BA,9,0.8065530282377998,0.012033637219914366,0.5242506007731899,0.06561747895388242 | |
| 92 | +BA,10,0.7986747302771893,0.012267843124273464,0.5066120190064121,0.05591993773813971 | |
| 93 | +BA,11,0.7907896173087273,0.01241327356598392,0.49649921018557946,0.04576324498777648 | |
| 94 | +BA,12,0.7829791897058033,0.012493732255131743,0.4854039162764914,0.03861009627514326 | |
| 95 | +BA,13,0.7752147537119907,0.012525764042256545,0.47546199974431624,0.032850750450285994 | |
| 96 | +BA,14,0.7675061867058471,0.012531224301521988,0.4665608136881322,0.028189363735909807 | |
| 97 | +BA,15,0.7598393971723005,0.012517264506001852,0.4584798390112013,0.02431632262056875 | |
| 98 | +BA,16,0.7522353812513914,0.012481170446395608,0.4513073156699732,0.021071688481913094 | |
| 99 | +BA,17,0.7446938030781838,0.012427794553462355,0.4445837071389706,0.01847056346658693 | |
| 100 | +BA,18,0.7372170847293185,0.012361002736744817,0.4383273655876037,0.016345594679182 | |
| 101 | +BA,19,0.72980563243868,0.012284182988710115,0.432460785268394,0.014603676539292784 | |
| 102 | +BAC,0,1.0,0.0,0.0,1.0 | |
| 103 | +BAC,1,0.8574448053858897,0.00036693884833037934,0.8336970188965072,0.2676876910176578 | |
| 104 | +BAC,2,0.8761059942816535,-0.012277971855454612,0.85113977754041,0.16148254859657632 | |
| 105 | +BAC,3,0.8150113133035255,-0.0032491471686652397,0.7445448575440169,0.13086036045951577 | |
| 106 | +BAC,4,0.8053327726852691,0.011816062659833221,0.6610543515201951,0.11334714931946546 | |
| 107 | +BAC,5,0.7894467097018479,0.010705576451399405,0.5560247851777489,0.08396714384977548 | |
| 108 | +BAC,6,0.776061279212131,0.012148778056576824,0.5334235676600847,0.06075877171390737 | |
| 109 | +BAC,7,0.7598324744993913,0.012975533599329056,0.5029342054109297,0.04741126452040819 | |
| 110 | +BAC,8,0.7433583073241876,0.014056263801022645,0.479892546130664,0.03690802469598832 | |
| 111 | +BAC,9,0.7260910487566546,0.014399262826111347,0.4573195025295795,0.028579126270628533 | |
| 112 | +BAC,10,0.7095428424492365,0.01459326500173754,0.4390922406644753,0.02322247720685057 | |
| 113 | +BAC,11,0.6930572048842931,0.014638770150612816,0.4233661639788739,0.01918824346279447 | |
| 114 | +BAC,12,0.6768789067463891,0.014574680739087242,0.40955775546349205,0.016210483686735295 | |
| 115 | +BAC,13,0.6609158873181583,0.014419968881591404,0.3970691010682998,0.013961349150623355 | |
| 116 | +BAC,14,0.6452710617711583,0.014220708125575982,0.38565677847678026,0.012314796098120738 | |
| 117 | +BAC,15,0.6299363702503525,0.013984640667785488,0.37501760379315396,0.011074522029861299 | |
| 118 | +BAC,16,0.614930267682552,0.013725155039211547,0.3650274821504382,0.010126641724295823 | |
| 119 | +BAC,17,0.6002523228127555,0.013449837718752727,0.3555514281025141,0.009391601112161588 | |
| 120 | +BAC,18,0.5859053402089337,0.013166321356373566,0.34650652933777,0.008812798592730901 | |
| 121 | +BAC,19,0.5718862660139739,0.01287858895684642,0.33782113488674065,0.008346512092855727 | |
| 122 | +CAT,0,1.0,0.0,0.0,1.0 | |
| 123 | +CAT,1,0.9074584869596085,-0.014682054310053467,0.5592498451943293,0.20245826148689058 | |
| 124 | +CAT,2,0.8622457385692798,-0.01672706626314626,0.6611262341800161,0.10920134987851643 | |
| 125 | +CAT,3,0.7851999604426676,-0.0119762790643634,0.5229396666863377,0.1273125163650794 | |
| 126 | +CAT,4,0.7542344667733158,-0.0042228215806808436,0.4476653361192402,0.09235874476355771 | |
| 127 | +CAT,5,0.7449014413138277,-0.013251593729579817,0.37349251525252486,0.09409494747710333 | |
| 128 | +CAT,6,0.7298640875436997,-0.014498699630611525,0.38609599563914565,0.049556167617881355 | |
| 129 | +CAT,7,0.7107037613410444,-0.014667544958127398,0.3804841442851053,0.031150907278694875 | |
| 130 | +CAT,8,0.6908830925133047,-0.014413462504822429,0.3622813814492994,0.023916842556721996 | |
| 131 | +CAT,9,0.6720679046394443,-0.014097425790652221,0.3467637244442126,0.015601822640662292 | |
| 132 | +CAT,10,0.6549866105570362,-0.014338457847772018,0.3328219277021652,0.01071584921936422 | |
| 133 | +CAT,11,0.638232982643146,-0.014256720866039279,0.3231639081551008,0.005527386895111359 | |
| 134 | +CAT,12,0.6217609818277376,-0.014044847175694122,0.3138573945635509,0.0021125553264651426 | |
| 135 | +CAT,13,0.6056736113191661,-0.013796267229296888,0.3044973570659402,-2.570470337855124e-05 | |
| 136 | +CAT,14,0.5900252921333242,-0.013519405457700443,0.2957184798166723,-0.0016905927254385984 | |
| 137 | +CAT,15,0.5748387301774542,-0.013251393765036042,0.2873940044804348,-0.0028328862694103896 | |
| 138 | +CAT,16,0.5600497613551797,-0.01296508458865083,0.27956900481464275,-0.0036892340692859086 | |
| 139 | +CAT,17,0.5456398944245476,-0.012668826217734745,0.2720632082068455,-0.004274340799742163 | |
| 140 | +CAT,18,0.5316030802220126,-0.012370631672481848,0.2648106992972403,-0.004650351014816154 | |
| 141 | +CAT,19,0.5179308065537591,-0.012072635614856171,0.2578127444901084,-0.004894283651826221 | |
| 142 | +COST,0,1.0,0.0,0.0,1.0 | |
| 143 | +COST,1,0.8953710285140356,-0.03769943216849835,0.5211517642857706,0.26112028580835767 | |
| 144 | +COST,2,0.8866184479806728,-0.027515730127135478,0.5522555538921515,0.15073489840194695 | |
| 145 | +COST,3,0.793087042892158,-0.009605458605297146,0.44081412809397585,0.13862643709440658 | |
| 146 | +COST,4,0.8024067492147863,-0.008026697022750894,0.364888098495819,0.14667557577728432 | |
| 147 | +COST,5,0.7769576570265855,-0.018866328376254213,0.33535288646340905,0.12555185954505288 | |
| 148 | +COST,6,0.7566709511656388,-0.020542703032139564,0.34148961715996434,0.07624623427759514 | |
| 149 | +COST,7,0.7263753381799676,-0.01947596900786095,0.32260038672563346,0.05448686709669915 | |
| 150 | +COST,8,0.7029788370000304,-0.018326284743411535,0.3004005806246902,0.04349814348255955 | |
| 151 | +COST,9,0.6800194456323944,-0.018810350792612375,0.28217954313783467,0.03449014398801025 | |
| 152 | +COST,10,0.6587459110550167,-0.019107657884635677,0.270018664346719,0.02511353657051603 | |
| 153 | +COST,11,0.6371515491863065,-0.018914024647220952,0.2592049511597316,0.01708364159559648 | |
| 154 | +COST,12,0.616446654669925,-0.018472324141052612,0.24828727629604586,0.01172342381386522 | |
| 155 | +COST,13,0.5964454126120454,-0.018081608981412877,0.23792428224291118,0.007892272222823592 | |
| 156 | +COST,14,0.577257696179457,-0.017713578459929477,0.22863234188461903,0.004852171974516364 | |
| 157 | +COST,15,0.5586521830917716,-0.01731054041797937,0.22015711772454766,0.002387759281304167 | |
| 158 | +COST,16,0.5406486327763743,-0.016862115515076,0.21219728118543696,0.0005083172883495329 | |
| 159 | +COST,17,0.5232269639296516,-0.01640087815116612,0.20463023058179786,-0.0008671322963346058 | |
| 160 | +COST,18,0.5063884455099688,-0.0159410356707247,0.19746490953418303,-0.001885453951290206 | |
| 161 | +COST,19,0.4900994902563568,-0.015484126171822588,0.1906746206783663,-0.002648794775396668 | |
| 162 | +CRM,0,1.0,0.0,0.0,1.0 | |
| 163 | +CRM,1,0.936908128083517,-0.10206266498685718,0.5320634178913416,0.29601800378305004 | |
| 164 | +CRM,2,0.9285900305559033,-0.11084458721828364,0.5733308060598467,0.10059478694975574 | |
| 165 | +CRM,3,0.8867882008305938,-0.09938477746251403,0.5278476344969667,0.11092848484680258 | |
| 166 | +CRM,4,0.8647883767249775,-0.09093490368221319,0.5072110762431812,0.06022544698848097 | |
| 167 | +CRM,5,0.8245839556707615,-0.083930374565581,0.42605173070128743,0.04532667163783135 | |
| 168 | +CRM,6,0.7985062099615998,-0.08053975714595343,0.40072646982716836,0.02669568552396947 | |
| 169 | +CRM,7,0.7713095828552835,-0.07715822785955678,0.380049242799039,0.01008290699355225 | |
| 170 | +CRM,8,0.7448487844718191,-0.07369864174748629,0.3576690836158854,0.0008657060203450459 | |
| 171 | +CRM,9,0.7187383802977073,-0.07065977696090922,0.3391584315266772,-0.006580063322208073 | |
| 172 | +CRM,10,0.6936111982320885,-0.06782098682060335,0.3227957123891825,-0.011819643427069537 | |
| 173 | +CRM,11,0.6692865763140945,-0.06516287292130368,0.30802311476056465,-0.015290847233729709 | |
| 174 | +CRM,12,0.6457910294353926,-0.062673742828508,0.2947522453893531,-0.01772186489968134 | |
| 175 | +CRM,13,0.6230671626543774,-0.06031840978495143,0.2825127181561889,-0.01928429431777828 | |
| 176 | +CRM,14,0.6011251201465284,-0.05808299375807753,0.2711907096352719,-0.02022116877225478 | |
| 177 | +CRM,15,0.5799353595280659,-0.05595329635646483,0.2606173002691058,-0.020711479470513425 | |
| 178 | +CRM,16,0.5594784560326217,-0.053918292258800515,0.2506681042441776,-0.020870311745700882 | |
| 179 | +CRM,17,0.5397326464805813,-0.051970034372052554,0.24126170006515513,-0.020793523542471347 | |
| 180 | +CRM,18,0.520676144786746,-0.05010151731972022,0.23232884495780592,-0.0205487884328487 | |
| 181 | +CRM,19,0.5022867111970298,-0.04830709101451107,0.22381575459929653,-0.020185690409231932 | |
| 182 | +CSCO,0,1.0,0.0,0.0,1.0 | |
| 183 | +CSCO,1,0.9727875505290804,-0.11512341195869631,0.4821651723294598,0.2568679134767054 | |
| 184 | +CSCO,2,0.9499946785540817,-0.12459265222362195,0.4919969680414048,0.1000200916586662 | |
| 185 | +CSCO,3,0.9415791957856781,-0.11379886134019765,0.49736953025497277,0.10357014300219794 | |
| 186 | +CSCO,4,0.919411351403575,-0.10548204339160286,0.5467706563955569,0.07223325805308983 | |
| 187 | +CSCO,5,0.8608136308260489,-0.09487323322837322,0.4387915393829634,0.09170102753029567 | |
| 188 | +CSCO,6,0.8237078431343491,-0.09409260922183627,0.43126126391479436,0.04967156242421736 | |
| 189 | +CSCO,7,0.7853801634446919,-0.0899172486900253,0.4176348975331543,0.02591647552079527 | |
| 190 | +CSCO,8,0.7463497920105557,-0.08443255906271074,0.3934525972975147,0.01691054156909992 | |
| 191 | +CSCO,9,0.7090469346903763,-0.07972114234469013,0.37311662452947386,0.0077310392819563215 | |
| 192 | +CSCO,10,0.6734562830747352,-0.07535010881189061,0.35097864333533435,0.0016806305894068382 | |
| 193 | +CSCO,11,0.6399952942150196,-0.0715166873619078,0.3327277529136311,-0.004644057321254544 | |
| 194 | +CSCO,12,0.608120556074127,-0.06781681906591491,0.3156993614560774,-0.00933195233549173 | |
| 195 | +CSCO,13,0.5777424194701969,-0.06425968812107498,0.2991179371321853,-0.012362026468178008 | |
| 196 | +CSCO,14,0.5488920296765368,-0.060928897633068746,0.283621862551813,-0.014640615105364636 | |
| 197 | +CSCO,15,0.5214700561395584,-0.05779090181101147,0.2689200653061117,-0.0162265189541385 | |
| 198 | +CSCO,16,0.49542732733301903,-0.05483545574043211,0.2551141979644829,-0.017328881148538318 | |
| 199 | +CSCO,17,0.47068338759933037,-0.052039108766277306,0.2420891689739559,-0.01800465589432791 | |
| 200 | +CSCO,18,0.4471697632231574,-0.04939048878658083,0.22974800829318787,-0.018325242607441984 | |
| 201 | +CSCO,19,0.42482977474107597,-0.046884206296056496,0.2180730635587396,-0.01839346510691192 | |
| 202 | +CVX,0,1.0,0.0,0.0,1.0 | |
| 203 | +CVX,1,0.8865894058179166,0.005360067204719491,0.8389715259035977,0.23007821120365501 | |
| 204 | +CVX,2,0.902655968580065,-0.0019429241302657118,0.7635115482029529,0.18257908171509818 | |
| 205 | +CVX,3,0.8248082257210584,-9.824646574276268e-05,0.5792203052272715,0.1917315380590864 | |
| 206 | +CVX,4,0.7802599010390455,0.0022446575926687237,0.46809474636346604,0.16842992506815588 | |
| 207 | +CVX,5,0.7771308855586831,-0.0039150841313953695,0.44943612273387556,0.16440347608607672 | |
| 208 | +CVX,6,0.7649089375920864,-0.00405681077098236,0.48114740676656087,0.10657769029646653 | |
| 209 | +CVX,7,0.7566873503111087,-0.00532949194452554,0.4679315392334523,0.08777590246878544 | |
| 210 | +CVX,8,0.7447074897006525,-0.005692441748668105,0.4498358812761253,0.07504857008011719 | |
| 211 | +CVX,9,0.7327557691149039,-0.006011541370990598,0.4357684978067686,0.061659418363198486 | |
| 212 | +CVX,10,0.7213665405575549,-0.006668689161398044,0.4260399674266149,0.05037513665018101 | |
| 213 | +CVX,11,0.7099218519872706,-0.006941163894872922,0.4180767820822081,0.03943246657921934 | |
| 214 | +CVX,12,0.6988779126319121,-0.007204094094906145,0.40879048700306575,0.031811370571391454 | |
| 215 | +CVX,13,0.6880057366550774,-0.00737225508836859,0.4001672736349821,0.025604050467127326 | |
| 216 | +CVX,14,0.6773473628081876,-0.0074933347262740625,0.3923329730984199,0.020300570800317445 | |
| 217 | +CVX,15,0.6668666095996421,-0.007585542335243015,0.3850217456743962,0.01591771310416268 | |
| 218 | +CVX,16,0.6565401697195798,-0.007628538452470681,0.3780274494875729,0.012284609075356365 | |
| 219 | +CVX,17,0.6463847156830794,-0.007645441048906035,0.37124628379677554,0.009365549946847799 | |
| 220 | +CVX,18,0.6363934149510044,-0.007637874055027528,0.3647503434874211,0.0069682635646051445 | |
| 221 | +CVX,19,0.6265643858949715,-0.007611409684768701,0.358508343086463,0.004992729489688272 | |
| 222 | +DIA,0,1.0,0.0,0.0,1.0 | |
| 223 | +DIA,1,0.8259660693236538,0.021928224446557287,0.7098260281064747,0.3236127745626075 | |
| 224 | +DIA,2,0.8265850467230331,0.006706991412425076,0.7336921384676568,0.2291957973045861 | |
| 225 | +DIA,3,0.7614948874613876,0.009166897974562776,0.6861854098641283,0.2347189216626104 | |
| 226 | +DIA,4,0.7244137245884327,0.020162793818206935,0.6008767565083752,0.19122688232276355 | |
| 227 | +DIA,5,0.7327538779690129,-0.0013222647901705714,0.46412137504291473,0.18243420774679667 | |
| 228 | +DIA,6,0.7118901683748189,-0.0018260781460179981,0.47918649981741146,0.12509849300380016 | |
| 229 | +DIA,7,0.6977850186371726,-0.004905450329967819,0.4563596188330976,0.09821752863309723 | |
| 230 | +DIA,8,0.6791347217619764,-0.006771688895278252,0.43279582409146233,0.07948294617397232 | |
| 231 | +DIA,9,0.6614690753315557,-0.007584195666547585,0.4095711822158381,0.06163418438380901 | |
| 232 | +DIA,10,0.6482172326879551,-0.009838130891100328,0.3844574958334668,0.05060445658816521 | |
| 233 | +DIA,11,0.6337577605722291,-0.010724203007401067,0.37021113913325937,0.038349064178420975 | |
| 234 | +DIA,12,0.6202116783540182,-0.01155678499537779,0.35598626482979007,0.029351780868847807 | |
| 235 | +DIA,13,0.6067640900225502,-0.012132642671853057,0.3433218507605273,0.022310172644937072 | |
| 236 | +DIA,14,0.593669715092331,-0.012468580854969198,0.3318362274688246,0.016495226908897306 | |
| 237 | +DIA,15,0.5811849695521534,-0.012794253221105664,0.32098685594633886,0.012074811018328344 | |
| 238 | +DIA,16,0.5689505994164069,-0.012954449734738117,0.3115553123122285,0.008328817364988146 | |
| 239 | +DIA,17,0.5570687149614756,-0.013041154951465551,0.3028021703431015,0.00537130734414407 | |
| 240 | +DIA,18,0.5454665987154798,-0.013056767280747734,0.2946993561669307,0.003020578433256687 | |
| 241 | +DIA,19,0.5341394150816685,-0.013011989740589095,0.2871314802252068,0.001136958921146589 | |
| 242 | +DIS,0,1.0,0.0,0.0,1.0 | |
| 243 | +DIS,1,0.9421149368957911,-0.06510740217959302,0.7473336485853116,0.2551705364907913 | |
| 244 | +DIS,2,0.9128274884693733,-0.06779800573166761,0.8775613197146523,0.16238921174009577 | |
| 245 | +DIS,3,0.831636190554265,-0.07444630437795986,0.7435161128581331,0.12725687429016647 | |
| 246 | +DIS,4,0.8058052264042619,-0.0713670926995451,0.6777105166682327,0.08836312392718008 | |
| 247 | +DIS,5,0.7720284303440518,-0.06865434105572743,0.4922673861803021,0.09304709553430471 | |
| 248 | +DIS,6,0.7579656915964066,-0.07057942284810273,0.4777239955367343,0.05685363290786913 | |
| 249 | +DIS,7,0.7394396446544381,-0.07101237948525986,0.4501132519691761,0.03664235422688853 | |
| 250 | +DIS,8,0.7225098565983884,-0.0710051999159044,0.42498022724606266,0.02304642609859006 | |
| 251 | +DIS,9,0.7045660108916926,-0.07045688373497874,0.4000150960035553,0.010888898169623278 | |
| 252 | +DIS,10,0.6872919997211969,-0.06962916632681349,0.37569752328313666,0.0026015032889112576 | |
| 253 | +DIS,11,0.6709609725364836,-0.06876008562232108,0.35719913442562035,-0.004483809701512534 | |
| 254 | +DIS,12,0.6552969530341287,-0.06775753184460633,0.3413738445014862,-0.009823281082348726 | |
| 255 | +DIS,13,0.6401440970299501,-0.06666937313350886,0.3273732218065073,-0.013837540722454956 | |
| 256 | +DIS,14,0.6254396721417607,-0.06551966275304179,0.3151068604932884,-0.01696236405183349 | |
| 257 | +DIS,15,0.61114625203976,-0.06432407085676187,0.3040633483232553,-0.019277727957567495 | |
| 258 | +DIS,16,0.5972567794000447,-0.06310238658644232,0.2941369562416457,-0.02099004652182234 | |
| 259 | +DIS,17,0.5837398235527833,-0.061864146815238885,0.2850846870544498,-0.0222179932979757 | |
| 260 | +DIS,18,0.5705745352551057,-0.060619298757259805,0.27674959598881965,-0.023064015175668733 | |
| 261 | +DIS,19,0.5577421154629416,-0.05937530611100053,0.2690194929724586,-0.023615438485123035 | |
| 262 | +GLD,0,1.0,0.0,0.0,1.0 | |
| 263 | +GLD,1,0.9274853718598467,-0.005911254983984871,0.794532267824709,0.14255371841413747 | |
| 264 | +GLD,2,0.8704697133940932,-0.010520854319885382,0.5067076211161208,0.14615589704649715 | |
| 265 | +GLD,3,0.8022219014891998,-0.020155699737650364,0.6140714201940219,0.0700634703283935 | |
| 266 | +GLD,4,0.8104868111346258,-0.020422630591161284,0.5771142036850422,0.09077667562299138 | |
| 267 | +GLD,5,0.8006167729750112,-0.028177072835242224,0.4742443946904766,0.048221508571110114 | |
| 268 | +GLD,6,0.7834542797668189,-0.029047970026613298,0.45373252401037234,0.018843521716030473 | |
| 269 | +GLD,7,0.765626778730597,-0.03055644813295893,0.43847768360068623,0.007514476995721234 | |
| 270 | +GLD,8,0.75094500893166,-0.030672110039338684,0.43301502921811336,0.0006983066456408438 | |
| 271 | +GLD,9,0.7368448646786074,-0.031207323957093545,0.41347404854193665,-0.004897669186456857 | |
| 272 | +GLD,10,0.7235142897333129,-0.03121970665683907,0.4004118300141835,-0.008987277234574681 | |
| 273 | +GLD,11,0.7103156570035029,-0.0310489398901835,0.3908278038201324,-0.011616129246289613 | |
| 274 | +GLD,12,0.6975468850098848,-0.030718937822275867,0.3828375415715698,-0.013058167162487325 | |
| 275 | +GLD,13,0.6850142908544948,-0.030353259884072042,0.3747662747373592,-0.014060983640798812 | |
| 276 | +GLD,14,0.6728168501330737,-0.029935182994287976,0.3671140924982265,-0.01460286030405768 | |
| 277 | +GLD,15,0.66087094682883,-0.029487277862425065,0.3600176746533525,-0.014901942885746764 | |
| 278 | +GLD,16,0.6491657970750084,-0.029017698509800252,0.3533089645245358,-0.015003603937374103 | |
| 279 | +GLD,17,0.6376768151991418,-0.02854153177170518,0.3468182290135466,-0.014992135519503794 | |
| 280 | +GLD,18,0.626404432889649,-0.028061974950223594,0.3405177617602616,-0.014895771757393442 | |
| 281 | +GLD,19,0.6153400379971569,-0.027583477112240098,0.3343855280655078,-0.014746703731853406 | |
| 282 | +GOOG,0,1.0,0.0,0.0,1.0 | |
| 283 | +GOOG,1,0.9480202023821586,-0.11604163938363252,0.4399483803299463,0.21308731645748127 | |
| 284 | +GOOG,2,0.9289940924809301,-0.11510867852487251,0.5175094229170467,0.11564999244402836 | |
| 285 | +GOOG,3,0.8462322429309733,-0.12109299725587165,0.39317529392198763,0.11032422409850329 | |
| 286 | +GOOG,4,0.8348513427415326,-0.124038803352494,0.4151493619503577,0.05384784401311693 | |
| 287 | +GOOG,5,0.7916519293571124,-0.10712741945258704,0.3535389938398605,0.06565647298818447 | |
| 288 | +GOOG,6,0.7713850051149231,-0.10825338462782337,0.35644603181265866,0.0286185691738874 | |
| 289 | +GOOG,7,0.7458838362914036,-0.10603501854192475,0.346248778247566,0.010032639074854494 | |
| 290 | +GOOG,8,0.7220471376201874,-0.10378551031778353,0.33293424563059065,-0.0006494743001169007 | |
| 291 | +GOOG,9,0.6985211222000598,-0.10112349679772212,0.3220642300785213,-0.010611108699539053 | |
| 292 | +GOOG,10,0.6753786314632254,-0.09796269726492135,0.3102753405219325,-0.01673002675684373 | |
| 293 | +GOOG,11,0.6533006867929271,-0.09515783471635034,0.2999047418062187,-0.02196188543902075 | |
| 294 | +GOOG,12,0.6319749228991896,-0.09234910131694152,0.2899482874921518,-0.025635558967943166 | |
| 295 | +GOOG,13,0.6113170840317167,-0.08954216626150549,0.2801877124366957,-0.028049288683345205 | |
| 296 | +GOOG,14,0.5913466719712199,-0.08678607439494979,0.27088381756641167,-0.029722400765835585 | |
| 297 | +GOOG,15,0.5720155530259241,-0.08407126092982972,0.2618882687009683,-0.030727184529686178 | |
| 298 | +GOOG,16,0.553325099389853,-0.08142386972121675,0.2532314728031136,-0.03126234634200357 | |
| 299 | +GOOG,17,0.5352472388105111,-0.07884074936334395,0.24488308902945388,-0.03143184464097569 | |
| 300 | +GOOG,18,0.5177600241674282,-0.07632371606577568,0.23682025097597742,-0.03132150567585781 | |
| 301 | +GOOG,19,0.5008452018077063,-0.07387599726517838,0.22903709798491248,-0.03100900421028235 | |
| 302 | +GS,0,1.0,0.0,0.0,1.0 | |
| 303 | +GS,1,0.8840168464435636,-0.0069360779822121525,0.6554801329009211,0.26855599119654644 | |
| 304 | +GS,2,0.8947206809386878,-0.004479889732699041,0.7384475050501706,0.2048265669349141 | |
| 305 | +GS,3,0.7990586283883312,-0.009314643190070972,0.5896972059580395,0.15621027283475464 | |
| 306 | +GS,4,0.7794785720255618,0.00671720917020676,0.5212568633443473,0.11554823221885759 | |
| 307 | +GS,5,0.7631189100219481,-0.0010965763133341374,0.43649486026450174,0.12301436490404621 | |
| 308 | +GS,6,0.7510046074238189,0.00014825098847741532,0.4469355263721604,0.07954526285194388 | |
| 309 | +GS,7,0.7318175676923305,-0.0011136091320491396,0.4342494124570868,0.05865747056685519 | |
| 310 | +GS,8,0.7137425727959013,-0.0007789163280510283,0.41736325156695847,0.044981084405974404 | |
| 311 | +GS,9,0.6948489741598429,-0.00032742652616653354,0.4000873974035734,0.0333273140315811 | |
| 312 | +GS,10,0.6780655134122742,-0.0004353545132678126,0.38382284063496386,0.026926330470983237 | |
| 313 | +GS,11,0.6613524058203493,-0.00044409554255153433,0.37197192296093473,0.020013549329566106 | |
| 314 | +GS,12,0.6451419346027505,-0.00045645421839400277,0.360938318146644,0.015120634326571918 | |
| 315 | +GS,13,0.6291915932970114,-0.0004581793801135001,0.3503384582552814,0.011459017583840216 | |
| 316 | +GS,14,0.6136328236100489,-0.0004220077025649275,0.3403643214842103,0.008624247551476692 | |
| 317 | +GS,15,0.5984836477368428,-0.0004171500455857507,0.3308320951440191,0.006577871674818674 | |
| 318 | +GS,16,0.5837161329083953,-0.00040570531534548466,0.321906243745438,0.004951437795145131 | |
| 319 | +GS,17,0.5693108054300939,-0.00039728045037553273,0.3133856596763974,0.0037198993565196728 | |
| 320 | +GS,18,0.5552597783588163,-0.00038808709224524753,0.3052079994539242,0.0027867458547526304 | |
| 321 | +GS,19,0.5415528628909632,-0.0003777437805941282,0.297335567526641,0.0020738910684727887 | |
| 322 | +HD,0,1.0,0.0,0.0,1.0 | |
| 323 | +HD,1,0.8625233116495784,-0.010607965903704584,0.40326956787693824,0.23601558075520668 | |
| 324 | +HD,2,0.8644470190241299,0.0015274125888964565,0.6210175821227871,0.14626975821789664 | |
| 325 | +HD,3,0.8181919587256589,-0.0025482605846110897,0.5294863977482258,0.16738590320402413 | |
| 326 | +HD,4,0.7752357268473195,0.0036111166308239514,0.4775591143653344,0.13702915233448948 | |
| 327 | +HD,5,0.7600963059365626,-0.001384944512852971,0.39617999937746173,0.13610284688028815 | |
| 328 | +HD,6,0.7392497170152094,-0.001753432255550834,0.40328864585470997,0.08672962931298794 | |
| 329 | +HD,7,0.7185884776670051,-0.001265414078019251,0.39864837613724047,0.06496355237558751 | |
| 330 | +HD,8,0.6986296931570234,-0.0016114143982300178,0.38006072581267425,0.055214898773824544 | |
| 331 | +HD,9,0.6785153994390362,-0.0014389319911612738,0.36566635501514355,0.043481992277749765 | |
| 332 | +HD,10,0.6596432700932648,-0.001682605886860226,0.35090056201873443,0.03496476632622586 | |
| 333 | +HD,11,0.6411819135893703,-0.0017428976913510938,0.34010479377320474,0.02671339667092705 | |
| 334 | +HD,12,0.6231521856664014,-0.0017242759502027367,0.32955419247177375,0.020762458724847183 | |
| 335 | +HD,13,0.6056814779480127,-0.0017432727467348516,0.3188459596449083,0.016463206087463943 | |
| 336 | +HD,14,0.5886783273468501,-0.0017308439780765053,0.3089120498998906,0.012832894046540425 | |
| 337 | +HD,15,0.572176079713638,-0.001722993001605078,0.29943701912594284,0.009985598921365869 | |
| 338 | +HD,16,0.55613577332323,-0.0017038648954567593,0.29047908221563684,0.007700137666766099 | |
| 339 | +HD,17,0.5405409422472144,-0.0016759982433808586,0.28188332110323805,0.00591418464783592 | |
| 340 | +HD,18,0.5253872786761363,-0.0016469687936933076,0.2735913630648239,0.004524521409688292 | |
| 341 | +HD,19,0.5106586560784547,-0.0016144432947114802,0.2656229181435183,0.003418132932799255 | |
| 342 | +HON,0,1.0,0.0,0.0,1.0 | |
| 343 | +HON,1,0.8406507769938704,-0.001941914089985143,0.6102581105614545,0.19595794516449822 | |
| 344 | +HON,2,0.852845034019468,-0.005467773523937858,0.5548642805092595,0.10764609920350453 | |
| 345 | +HON,3,0.7448939420434644,0.00013196973634819098,0.566442798212998,0.16459734079058064 | |
| 346 | +HON,4,0.7115073513036825,0.0037143579356995037,0.437260265846068,0.12802948784289384 | |
| 347 | +HON,5,0.7017091319781283,0.003789433213048912,0.34251951844008816,0.1249866658880565 | |
| 348 | +HON,6,0.6930767768857857,0.004066577311606117,0.36604364937858436,0.07665080151358625 | |
| 349 | +HON,7,0.6835334503822205,0.004181451048997264,0.3557340780573739,0.05996824450615059 | |
| 350 | +HON,8,0.668588511991048,0.004687268611549928,0.3477523372545323,0.052898290573346475 | |
| 351 | +HON,9,0.6536314528410477,0.005033530104907137,0.3322600566446706,0.04144121310054381 | |
| 352 | +HON,10,0.6391567088471352,0.005169012687448744,0.317927237918484,0.03344309114534323 | |
| 353 | +HON,11,0.6254677580844819,0.005269274180054089,0.30903497506182814,0.026229536278274797 | |
| 354 | +HON,12,0.6122375360398554,0.00531776985469256,0.29977881472080636,0.02125661702532193 | |
| 355 | +HON,13,0.5992124497388336,0.005339987849952656,0.2914679480605475,0.017496030437506225 | |
| 356 | +HON,14,0.5864103851081058,0.005330784803334959,0.283654302301377,0.014226923729004089 | |
| 357 | +HON,15,0.5738451074599715,0.005296411711720753,0.27629119766837434,0.011703941561642322 | |
| 358 | +HON,16,0.5615401175890804,0.005247567350658714,0.26943971029502556,0.00970701403330475 | |
| 359 | +HON,17,0.5494977086871388,0.005185865329091916,0.2628727780316108,0.008142322349018771 | |
| 360 | +HON,18,0.5377105797244044,0.005114547450872899,0.25661854955403074,0.00690241219064217 | |
| 361 | +HON,19,0.5261730276303681,0.005036055491959967,0.25063565844914026,0.005904468002214414 | |
| 362 | +INTC,0,1.0,0.0,0.0,1.0 | |
| 363 | +INTC,1,0.9233743828964351,-0.0632661655836388,0.6971859776243237,0.2801747234728096 | |
| 364 | +INTC,2,0.9193187866322731,-0.06317372483696354,0.7800264493821069,0.09188218749296831 | |
| 365 | +INTC,3,0.8610078406911003,-0.061619029818594705,0.5019863012379545,0.08413242104222096 | |
| 366 | +INTC,4,0.8797610036342816,-0.06957425082161545,0.692763087533304,0.06715638270188648 | |
| 367 | +INTC,5,0.8435380180354688,-0.06865207103821415,0.4686304775058166,0.07484758066552251 | |
| 368 | +INTC,6,0.8358248885826949,-0.07153838206996639,0.4616004148033898,0.03678712258152142 | |
| 369 | +INTC,7,0.822121171453356,-0.07242092756442256,0.4380016592707967,0.012408064840056576 | |
| 370 | +INTC,8,0.8097266748194472,-0.07285775665555277,0.4233087635477434,-5.440075673900438e-05 | |
| 371 | +INTC,9,0.798279714825638,-0.07289375261183255,0.40493389188172463,-0.005789073305353533 | |
| 372 | +INTC,10,0.7869325031498844,-0.0727377411405741,0.3870540757342673,-0.011421609799466697 | |
| 373 | +INTC,11,0.7762637445892798,-0.07243523706881484,0.37474975865707494,-0.01697070350654482 | |
| 374 | +INTC,12,0.7658564061169453,-0.07197342845655218,0.365018319491931,-0.02109993541757369 | |
| 375 | +INTC,13,0.7557677639717671,-0.07140222371952068,0.3568206434292845,-0.02375041595556212 | |
| 376 | +INTC,14,0.7458921149484886,-0.0707512840593559,0.34913275712150793,-0.02547127614676334 | |
| 377 | +INTC,15,0.7362351821737132,-0.07005147541534931,0.34226648624480593,-0.026748695560773306 | |
| 378 | +INTC,16,0.7267678428150481,-0.06931503654679032,0.3361595935765456,-0.027689769955864144 | |
| 379 | +INTC,17,0.717470542160433,-0.06855215936028058,0.3306291928126082,-0.028311488609446954 | |
| 380 | +INTC,18,0.7083276733754923,-0.06777155167729729,0.3254844355216398,-0.028666404097347553 | |
| 381 | +INTC,19,0.6993275178624977,-0.06698055478502615,0.32062549888215147,-0.028833674839243022 | |
| 382 | +IWM,0,1.0,0.0,0.0,1.0 | |
| 383 | +IWM,1,0.8799338172912503,0.004295595321012999,0.8370296987436827,0.18264366269920934 | |
| 384 | +IWM,2,0.8532760564237615,0.000514213331000826,0.7479733586221401,0.15340656357232324 | |
| 385 | +IWM,3,0.7996068330255082,0.0018667161645757378,0.5868368469029058,0.17196791418346996 | |
| 386 | +IWM,4,0.7589544243525042,0.0030192962322183117,0.5228722533533118,0.148702744178342 | |
| 387 | +IWM,5,0.7580622599986527,-0.003895624351068411,0.43341531228478863,0.1252728419969977 | |
| 388 | +IWM,6,0.7441351621970477,-0.004047150923404326,0.4529868032026481,0.07638569554183863 | |
| 389 | +IWM,7,0.732016589454613,-0.004774397734323983,0.4291282144868215,0.06283833883051579 | |
| 390 | +IWM,8,0.7188190676788252,-0.0052906607889119245,0.4064953843704052,0.05159866673304102 | |
| 391 | +IWM,9,0.705360334706718,-0.005706258539520941,0.390720897805284,0.039529735579529705 | |
| 392 | +IWM,10,0.6932637753197183,-0.006272157441257982,0.3750286805580607,0.030235394948298955 | |
| 393 | +IWM,11,0.6810410528859451,-0.006477717692150353,0.3643369320337997,0.022389334168284755 | |
| 394 | +IWM,12,0.6692127139218927,-0.006651808488535065,0.3533060674168078,0.017082677207659033 | |
| 395 | +IWM,13,0.6576328859417129,-0.006768648645183915,0.3435529679592542,0.012763741098056836 | |
| 396 | +IWM,14,0.6462663036537836,-0.006831576525794466,0.3349675604945668,0.009239599109212846 | |
| 397 | +IWM,15,0.6351545212313899,-0.0068624465119904495,0.32700905687378107,0.006523731486133594 | |
| 398 | +IWM,16,0.6242401627276721,-0.006854190521678587,0.319742631526907,0.0043908175009113055 | |
| 399 | +IWM,17,0.6135370280756633,-0.006825115939169549,0.3129106252293267,0.002748047244558639 | |
| 400 | +IWM,18,0.6030329768233955,-0.006778231890960919,0.30649849438525084,0.0014579610643175502 | |
| 401 | +IWM,19,0.5927195139329573,-0.0067170518481892635,0.3004358674105592,0.00045082614402589894 | |
added
_verify/results/portfolio_sort_results.csv
+85 −0
@@ -0,0 +1,85 @@ | ||
| 1 | +sort_variable,return_horizon,quintile,mean_daily_bps,annualized_return_pct,annualized_vol_pct,sharpe_ratio,t_statistic,n_days,pct_positive,max_drawdown_pct | |
| 2 | +ATM IV (30d),1-Day,Q1,3.1655786125021326,7.977258103505375,12.965387404352487,0.6152734087087445,2.3819978650316136,3777,0.5411702409319565,-25.74126437728721 | |
| 3 | +ATM IV (30d),1-Day,Q2,3.6873736770561085,9.292181666181394,15.749604218738659,0.5899946142853346,2.284132373861591,3777,0.5401111993645751,-38.29442335918096 | |
| 4 | +ATM IV (30d),1-Day,Q3,4.499446829496948,11.338606010332311,18.096207541810696,0.6265736057753998,2.4257459693803773,3777,0.5390521577971935,-36.11907333248452 | |
| 5 | +ATM IV (30d),1-Day,Q4,6.017748072496828,15.164725142692006,21.28124300099886,0.7125864378307336,2.758740016288902,3777,0.5424940428911835,-46.12700743603197 | |
| 6 | +ATM IV (30d),1-Day,Q5,8.672541938636133,21.854805685363054,29.72560758006554,0.7352181322618023,2.846357402403459,3777,0.5459359279851734,-66.28459403796643 | |
| 7 | +ATM IV (30d),1-Day,L/S(5-1),5.506963326134,13.87754758185768,25.552488348717155,0.5430996540324963,2.102581060864931,3777,0.5316388668255229,-71.87583501606194 | |
| 8 | +ATM IV (30d),5-Day,Q1,29.29198398515538,15.231831672280796,11.823510817598113,1.288266396272902,10.979371980456447,3777,0.6078898596769923,-94.68900944307536 | |
| 9 | +ATM IV (30d),5-Day,Q2,27.470493545486523,14.284656643652994,15.048415907726007,0.9492465340700151,8.090043199811857,3777,0.6033889330156209,-156.8429628907121 | |
| 10 | +ATM IV (30d),5-Day,Q3,21.89562419449632,11.385724581138087,17.417083651355128,0.6537101623354852,5.571306571723571,3777,0.5740005295207837,-151.6474562308434 | |
| 11 | +ATM IV (30d),5-Day,Q4,17.873451256081033,9.294194653162137,20.848963351821702,0.445786895795471,3.799260903732077,3777,0.5766481334392375,-229.4826144504674 | |
| 12 | +ATM IV (30d),5-Day,Q5,25.900864265447343,13.468449418032618,29.530892070484306,0.4560800055035971,3.8869849029360624,3777,0.5745300503044745,-369.1346583743537 | |
| 13 | +ATM IV (30d),5-Day,L/S(5-1),-3.391119719708039,-1.7633822542481803,26.130106948087167,-0.06748469333675144,-0.5751446698251581,3777,0.5308445856499867,-487.63870160112435 | |
| 14 | +Volatility Skew (25d),1-Day,Q1,4.909633131749299,12.372275492008232,18.360220169441902,0.67386313332997,2.6091701623212233,3778,0.5457914240338804,-35.22680239456641 | |
| 15 | +Volatility Skew (25d),1-Day,Q2,4.352274787326383,10.967732464062486,17.21721535186998,0.6370212743416298,2.46652000913388,3778,0.5381154049761778,-30.714128697538435 | |
| 16 | +Volatility Skew (25d),1-Day,Q3,5.730771782809848,14.441544892680817,18.775848529688066,0.7691553790416493,2.9781377937493514,3778,0.5447326627845421,-47.57893487049204 | |
| 17 | +Volatility Skew (25d),1-Day,Q4,5.888756259614631,14.83966577422887,20.424694414069506,0.7265550942102027,2.8131912540279562,3778,0.5359978824775014,-43.28495925683635 | |
| 18 | +Volatility Skew (25d),1-Day,Q5,6.1331084770730335,15.455433362224044,24.215475558037,0.6382461217902641,2.4712625677608515,3778,0.5494970884065643,-48.31913497878628 | |
| 19 | +Volatility Skew (25d),1-Day,L/S(5-1),1.2234753453237353,3.0831578702158127,19.69935010184434,0.15651063889296296,0.6060027161114745,3778,0.5089994706193753,-53.80841684180327 | |
| 20 | +Volatility Skew (25d),5-Day,Q1,62.39954554166372,32.44776368166514,17.736835811578825,1.8293997884607374,15.593296234639942,3778,0.6357861302276336,-134.54539546706206 | |
| 21 | +Volatility Skew (25d),5-Day,Q2,33.23983991522568,17.284716755917355,16.367520260286877,1.0560375964742748,9.001371477470213,3778,0.6058761249338275,-126.10684493163396 | |
| 22 | +Volatility Skew (25d),5-Day,Q3,22.984227923524813,11.951798520232904,18.061757451424693,0.6617184707731837,5.64030465280697,3778,0.5878771836950768,-159.84984532784696 | |
| 23 | +Volatility Skew (25d),5-Day,Q4,14.247728659410713,7.408818902893572,19.624171785295665,0.37753536729865855,3.2180067246508957,3778,0.5629962943356274,-252.50178063194403 | |
| 24 | +Volatility Skew (25d),5-Day,Q5,-9.778719358916328,-5.084934066636491,23.98440533231165,-0.21201001218012677,-1.8071145221985416,3778,0.5381154049761778,-597.3410082690601 | |
| 25 | +Volatility Skew (25d),5-Day,L/S(5-1),-72.17826490058003,-37.53269774830162,20.0977643732778,-1.8675061091971745,-15.918103940098042,3778,0.3967707781895183,-2753.5424618269067 | |
| 26 | +Implied Skewness,1-Day,Q1,7.67159767951261,19.332426152371777,24.363037134621372,0.7935146199362482,3.07204911476073,3777,0.5501720942546995,-47.85742939112403 | |
| 27 | +Implied Skewness,1-Day,Q2,4.555788544784435,11.480587132856776,20.212741661664055,0.5679876250845832,2.198933500401454,3777,0.5382578766216574,-46.01684137621842 | |
| 28 | +Implied Skewness,1-Day,Q3,4.922931518400179,12.40578742636845,18.48883481617134,0.6709880611577359,2.5976941413634558,3777,0.5438178448504104,-30.613244548717546 | |
| 29 | +Implied Skewness,1-Day,Q4,4.98667692663672,12.566425855124535,17.74510782908165,0.7081628342956583,2.7416142734449043,3777,0.535875033095049,-41.07819814010891 | |
| 30 | +Implied Skewness,1-Day,Q5,4.366275404527225,11.003014019408607,16.83729750644633,0.6534905031639426,2.5299532879565887,3777,0.5371988350542759,-36.6462132864966 | |
| 31 | +Implied Skewness,1-Day,L/S(5-1),-3.3053222749853854,-8.32941213296317,17.912979278647555,-0.46499312054092046,-1.8001958230364172,3777,0.46783161239078636,-153.83813693142517 | |
| 32 | +Implied Skewness,5-Day,Q1,42.45414782733605,22.076156870214746,24.216489672781318,0.9116167193723269,7.76933955162476,3777,0.5890918718559703,-202.44565569404668 | |
| 33 | +Implied Skewness,5-Day,Q2,15.434643886945246,8.026014821211527,19.58127624429597,0.4098821098828789,3.493258976216541,3777,0.5724119671697114,-224.55899805684174 | |
| 34 | +Implied Skewness,5-Day,Q3,18.44374309726791,9.590746410579312,17.639855597990756,0.5436975579137808,4.633713764848223,3777,0.5729414879534022,-153.67406494643402 | |
| 35 | +Implied Skewness,5-Day,Q4,18.925246659198717,9.841128262783332,16.97817759382411,0.5796339570840092,4.939985119336399,3777,0.5830023828435266,-179.59261316136113 | |
| 36 | +Implied Skewness,5-Day,Q5,23.389756360504066,12.162673307462113,15.88062921219701,0.7658810708911115,6.5272937293340165,3777,0.6020651310563939,-170.44970329584598 | |
| 37 | +Implied Skewness,5-Day,L/S(5-1),-19.064391466831974,-9.913483562752628,18.806554155930858,-0.52712918488719,-4.4925082415991575,3777,0.45909451945988883,-842.0230994434794 | |
| 38 | +Implied Kurtosis,1-Day,Q1,7.900432619661885,19.90909020154795,24.262124609085216,0.8205831320350558,3.176843401522218,3777,0.5552025416997617,-59.02791584254232 | |
| 39 | +Implied Kurtosis,1-Day,Q2,4.792344174628643,12.07670732006418,20.674914482749358,0.584123689127744,2.261403403304437,3777,0.5374635954461212,-46.520367354683415 | |
| 40 | +Implied Kurtosis,1-Day,Q3,4.16291379082682,10.490542752883586,18.7680012135633,0.5589589766917885,2.163979574404729,3777,0.535875033095049,-36.38604107309538 | |
| 41 | +Implied Kurtosis,1-Day,Q4,4.225185779378482,10.647468164033777,17.33988379287723,0.6140449550421715,2.377241972822314,3777,0.5377283558379666,-36.35175776480487 | |
| 42 | +Implied Kurtosis,1-Day,Q5,4.786528964000653,12.062052989281646,15.651492460755495,0.7706647158107128,2.983586941566167,3777,0.5377283558379666,-30.81615130533013 | |
| 43 | +Implied Kurtosis,1-Day,L/S(5-1),-3.1139036556612303,-7.8470372122663,18.300397279621528,-0.4287905389356983,-1.6600394781144912,3777,0.47736298649722003,-141.74069567258002 | |
| 44 | +Implied Kurtosis,5-Day,Q1,-24.350520797928095,-12.66227081492261,23.877899960761322,-0.5302924811533084,-4.519467732656741,3777,0.5131056393963463,-1042.9516681141897 | |
| 45 | +Implied Kurtosis,5-Day,Q2,10.81847991424171,5.625609555405689,20.215173932435164,0.2782864779797626,2.3717227800946747,3777,0.5562615832671433,-246.3837774341045 | |
| 46 | +Implied Kurtosis,5-Day,Q3,30.120609919711082,15.662717158249762,17.930980819326898,0.8735003018556413,7.444488784975231,3777,0.5951813608684141,-179.31024429109038 | |
| 47 | +Implied Kurtosis,5-Day,Q4,47.43178183340775,24.664526553372028,16.32094339028247,1.5112194168908977,12.87951014645484,3777,0.6346306592533757,-150.28322025492517 | |
| 48 | +Implied Kurtosis,5-Day,Q5,60.333849623094444,31.37360180400911,15.148811114969106,2.0710273278810423,17.650525916287144,3777,0.6695790309769658,-125.21049120272671 | |
| 49 | +Implied Kurtosis,5-Day,L/S(5-1),84.68437042102255,44.03587261893173,18.913906695855363,2.3282272312668946,19.84253637373645,3777,0.6211278792692613,-109.38254764168884 | |
| 50 | +Put-Call Volume Ratio,1-Day,Q1,2.9870005407367515,7.527241362656614,18.093963120502405,0.4160084395290627,1.6623821112992205,4024,0.5362823061630219,-38.09054931426351 | |
| 51 | +Put-Call Volume Ratio,1-Day,Q2,6.0466735843228205,15.237617432493508,19.523630409214725,0.7804704920710694,3.118783325368585,4024,0.5519383697813122,-47.469613787493195 | |
| 52 | +Put-Call Volume Ratio,1-Day,Q3,6.22293388219269,15.681793383125578,19.740736934075123,0.794387435256114,3.1743958447227008,4024,0.5494532803180915,-40.704191957028634 | |
| 53 | +Put-Call Volume Ratio,1-Day,Q4,6.282523553715319,15.831959355362605,19.298697789629518,0.8203641265303495,3.278199476528625,4024,0.5410039761431411,-44.227671333276234 | |
| 54 | +Put-Call Volume Ratio,1-Day,Q5,5.461441718807346,13.762833131394512,18.533004229106705,0.7426120968439387,2.9675000507808798,4024,0.5407554671968191,-41.20683993124155 | |
| 55 | +Put-Call Volume Ratio,1-Day,L/S(5-1),2.474441178070595,6.235591768737899,12.035122043654784,0.5181162057285044,2.0704077853620584,4024,0.5233598409542743,-23.196483201892658 | |
| 56 | +Put-Call Volume Ratio,5-Day,Q1,58.1940319772822,30.260896628186746,17.47372970670458,1.7317937919444748,15.234334693620722,4024,0.6570576540755467,-139.78767640304602 | |
| 57 | +Put-Call Volume Ratio,5-Day,Q2,37.295684785904605,19.393756088670393,18.711691205346686,1.0364512686661276,9.117509020954989,4024,0.606858846918489,-176.86397714652261 | |
| 58 | +Put-Call Volume Ratio,5-Day,Q3,26.603897527586334,13.834026714344894,19.31702705201899,0.7161571331391274,6.299928727204474,4024,0.5889662027833003,-193.07693354468745 | |
| 59 | +Put-Call Volume Ratio,5-Day,Q4,12.213281578922274,6.350906421039582,18.660287277139563,0.3403434430947899,2.9939510968356258,4024,0.5683399602385686,-203.58338340194888 | |
| 60 | +Put-Call Volume Ratio,5-Day,Q5,-0.053222099651141656,-0.02767549181859366,17.675453469268167,-0.0015657585174101638,-0.013773746859798533,4024,0.5357852882703777,-219.36559674373748 | |
| 61 | +Put-Call Volume Ratio,5-Day,L/S(5-1),-58.247254076933345,-30.288572120005337,12.2244451508235,-2.4777052656631167,-21.79600796863729,4024,0.3605864811133201,-2343.484273590955 | |
| 62 | +Put-Call OI Ratio,1-Day,Q1,4.715482709165023,11.883016427095857,18.649484210952693,0.6371766796701572,2.546176984341454,4024,0.5370278330019881,-45.79279171007299 | |
| 63 | +Put-Call OI Ratio,1-Day,Q2,4.201105333984404,10.586785441640696,17.868212256930452,0.592492706568026,2.3676184973289107,4024,0.5472166998011928,-39.35198540699585 | |
| 64 | +Put-Call OI Ratio,1-Day,Q3,4.534873123829001,11.427880272049084,19.008390751057615,0.601201880880592,2.4024206172036573,4024,0.5283300198807157,-35.904134180717904 | |
| 65 | +Put-Call OI Ratio,1-Day,Q4,6.719476346910547,16.933080394214578,19.64310922888189,0.8620366662380177,3.444724186029366,4024,0.562375745526839,-45.9275340311692 | |
| 66 | +Put-Call OI Ratio,1-Day,Q5,6.751668685552591,17.01420508759253,20.12186468624968,0.8455580709286463,3.378875228511464,4024,0.5482107355864811,-39.18013119493553 | |
| 67 | +Put-Call OI Ratio,1-Day,L/S(5-1),2.0361859763875683,5.131188660496671,13.284148089423589,0.38626403635035955,1.5435225905367975,4024,0.5129224652087475,-37.86774876467454 | |
| 68 | +Put-Call OI Ratio,5-Day,Q1,24.256278852034058,12.61326500305771,18.302882508941224,0.6891409042753756,6.06227094451446,4024,0.5999005964214712,-209.6151740596394 | |
| 69 | +Put-Call OI Ratio,5-Day,Q2,18.545662380280827,9.643744437746031,17.37134436049582,0.5551524532365424,4.883594292767436,4024,0.5822564612326043,-178.77991802824528 | |
| 70 | +Put-Call OI Ratio,5-Day,Q3,25.6534913731121,13.33981551401829,17.533253734087737,0.7608294339620111,6.692904372131451,4024,0.5859840954274353,-156.26534941900178 | |
| 71 | +Put-Call OI Ratio,5-Day,Q4,31.82086588280227,16.54685025905718,19.014215244632798,0.8702357707730225,7.655335788813296,4024,0.5974155069582505,-205.4043521175057 | |
| 72 | +Put-Call OI Ratio,5-Day,Q5,34.382629546078704,17.878967363960925,19.444291868678288,0.9194969652127647,8.088679254411437,4024,0.5939363817097415,-181.53714063306882 | |
| 73 | +Put-Call OI Ratio,5-Day,L/S(5-1),10.126350694044644,5.265702360903215,13.266792032405183,0.3969084876013223,3.4915454547669516,4024,0.5270874751491054,-147.95316519525147 | |
| 74 | +IV Term Structure Slope,1-Day,Q1,7.721055136593458,19.457058944215515,25.807462137170116,0.7539315117774325,2.456827586180563,2676,0.5377428998505231,-44.12163770030708 | |
| 75 | +IV Term Structure Slope,1-Day,Q2,1.8529810708297083,4.669512298490865,19.880246680812654,0.23488200993992836,0.7654071921698744,2676,0.5302690582959642,-51.953388721385906 | |
| 76 | +IV Term Structure Slope,1-Day,Q3,2.4725302802839457,6.230776306315542,18.810495894862065,0.33123934324439736,1.0794056799570522,2676,0.5265321375186846,-49.228056922209475 | |
| 77 | +IV Term Structure Slope,1-Day,Q4,4.158928968234807,10.480500999951715,18.14171092701101,0.5777019070647522,1.8825502843351078,2676,0.5291479820627802,-46.493495598547355 | |
| 78 | +IV Term Structure Slope,1-Day,Q5,5.8060268593166775,14.631187685478029,20.14204854107331,0.7264001799837969,2.3671115650589236,2676,0.5497010463378177,-37.033136012323254 | |
| 79 | +IV Term Structure Slope,1-Day,L/S(5-1),-1.9150282772767782,-4.8258712587374815,20.460466759541166,-0.23586320465964303,-0.7686045996494033,2676,0.5067264573991032,-65.1469634930808 | |
| 80 | +IV Term Structure Slope,5-Day,Q1,20.448102589217843,10.633013346393279,25.987576385980738,0.4091575600766436,2.9351612339346556,2676,0.5717488789237668,-263.5019195444096 | |
| 81 | +IV Term Structure Slope,5-Day,Q2,9.712203656224531,5.0503459012367555,20.02027177695885,0.25226160551172705,1.8096414622509738,2676,0.5590433482810164,-188.92682208373196 | |
| 82 | +IV Term Structure Slope,5-Day,Q3,24.573632524402857,12.778288912689487,18.554064992791616,0.6887056242205651,4.9405467405424695,2676,0.5732436472346786,-116.34516620656599 | |
| 83 | +IV Term Structure Slope,5-Day,Q4,34.50630383909705,17.943277996330465,17.716844168728233,1.01278070888053,7.265354389702951,2676,0.5833333333333334,-99.28017256020922 | |
| 84 | +IV Term Structure Slope,5-Day,Q5,42.23436562508011,21.961870125041656,19.523690293003387,1.1248831442953195,8.069540245629742,2676,0.5881913303437967,-109.47715148251618 | |
| 85 | +IV Term Structure Slope,5-Day,L/S(5-1),21.786263035862277,11.328856778648385,20.29619648729625,0.5581763452940217,4.004172793726316,2676,0.5213004484304933,-167.57669850265913 | |
added
_verify/results/pre_post_covid.csv
+9 −0
@@ -0,0 +1,9 @@ | ||
| 1 | +label,n_obs,r2,adj_r2,n_significant,period,target | |
| 2 | +Pre-COVID|1D,60246,0.0019943591218688494,0.0018286737826345156,3,Pre-COVID,1D | |
| 3 | +Pre-COVID|5D,60246,0.07088392237210583,0.07072967383261419,10,Pre-COVID,5D | |
| 4 | +Pre-COVID|HAR-RV,163535,0.34630319026414835,0.34629119810101594,3,Pre-COVID,HAR-RV | |
| 5 | +Pre-COVID|HAR+IV,60251,0.3814415046616799,0.3813593615063612,6,Pre-COVID,HAR+IV | |
| 6 | +Post-COVID|1D,58835,0.0011772683140017781,0.0010074698080032585,4,Post-COVID,1D | |
| 7 | +Post-COVID|5D,58835,0.05177017194489808,0.05160897416371091,8,Post-COVID,5D | |
| 8 | +Post-COVID|HAR-RV,100810,0.462937696674553,0.46292171362880197,3,Post-COVID,HAR-RV | |
| 9 | +Post-COVID|HAR+IV,58842,0.5705808383715292,0.5705224467665961,8,Post-COVID,HAR+IV | |
added
_verify/results/robustness_double_clustered.csv
+23 −0
@@ -0,0 +1,23 @@ | ||
| 1 | +variable,coefficient,dc_se,dc_t_stat,dc_sig_5pct,target | |
| 2 | +const,0.00041763446448038873,0.00019097294713725055,2.186877621887662,True,1-Day | |
| 3 | +iv_atm_30d,0.000280103614679104,0.000306055404526584,0.9152055821800531,False,1-Day | |
| 4 | +iv_term_slope,8.13942413539805e-05,0.0001877556838205436,0.43351146392871337,False,1-Day | |
| 5 | +iv_skew_25d,0.0005589362280265609,0.0003104434494398839,1.8004445867194778,False,1-Day | |
| 6 | +implied_skewness,-0.00027431955853834326,0.00021556444911768747,-1.2725640042277029,False,1-Day | |
| 7 | +implied_kurtosis_proxy,3.198378790915095e-05,0.00016132035542532666,0.19826256782552082,False,1-Day | |
| 8 | +pc_volume_ratio,-1.4646140356719655e-06,7.97607527541261e-05,-0.018362590435760395,False,1-Day | |
| 9 | +pc_oi_ratio,-6.372110421016961e-05,7.55862653581354e-05,-0.8430249054937765,False,1-Day | |
| 10 | +net_gamma_exposure,5.053427056373319e-06,4.404763270659588e-05,0.11472641651447019,False,1-Day | |
| 11 | +rv_daily,-0.0003205381939735506,0.0003294080354297387,-0.9730733907428315,False,1-Day | |
| 12 | +rv_w,-4.7339039740472715e-05,0.0004013724834111097,-0.11794291262359717,False,1-Day | |
| 13 | +const,0.002249473137649632,0.0005731957527072351,3.924441392011798,True,5-Day | |
| 14 | +iv_atm_30d,0.0013216839369709678,0.0009426816020927821,1.4020470263096139,False,5-Day | |
| 15 | +iv_term_slope,0.001133720205572446,0.0005339741855356227,2.1231741838516514,True,5-Day | |
| 16 | +iv_skew_25d,-0.0003731283791251577,0.0009622817684762431,-0.3877537654236141,False,5-Day | |
| 17 | +implied_skewness,-0.004685263679195295,0.0009488560631168246,-4.937802329897151,True,5-Day | |
| 18 | +implied_kurtosis_proxy,0.006342337908904511,0.0007028305586618892,9.023992811268213,True,5-Day | |
| 19 | +pc_volume_ratio,-0.002132635195154358,0.0002679112104486311,-7.960231270588307,True,5-Day | |
| 20 | +pc_oi_ratio,0.0026340423531046745,0.0005715184402461653,4.608849282221123,True,5-Day | |
| 21 | +net_gamma_exposure,0.0030205764876359066,0.0005599042221712127,5.394809269204344,True,5-Day | |
| 22 | +rv_daily,-0.005554035996188907,0.0007643278728968248,-7.266562156288963,True,5-Day | |
| 23 | +rv_w,0.00348308295756233,0.0009874709384268788,3.527276421026793,True,5-Day | |
added
_verify/results/robustness_newey_west.csv
+23 −0
@@ -0,0 +1,23 @@ | ||
| 1 | +variable,coefficient,nw_se,nw_t_stat,nw_sig_5pct,target,method | |
| 2 | +const,0.00041763446448038873,4.316283685055031e-05,9.675788130572425,True,1-Day,Newey-West(5) | |
| 3 | +iv_atm_30d,0.000280103614679104,0.00010701580073313493,2.6174042782485714,True,1-Day,Newey-West(5) | |
| 4 | +iv_term_slope,8.13942413539805e-05,6.585570762361788e-05,1.23594817049373,False,1-Day,Newey-West(5) | |
| 5 | +iv_skew_25d,0.0005589362280265609,0.0001100640243183282,5.078282676726414,True,1-Day,Newey-West(5) | |
| 6 | +implied_skewness,-0.00027431955853834326,0.00010096100162072624,-2.717084360641172,True,1-Day,Newey-West(5) | |
| 7 | +implied_kurtosis_proxy,3.198378790915095e-05,6.549824600209482e-05,0.48831518187720657,False,1-Day,Newey-West(5) | |
| 8 | +pc_volume_ratio,-1.4646140356719655e-06,4.70930140424354e-05,-0.031100452274135725,False,1-Day,Newey-West(5) | |
| 9 | +pc_oi_ratio,-6.372110421016961e-05,5.3856385118161605e-05,-1.1831671225308695,False,1-Day,Newey-West(5) | |
| 10 | +net_gamma_exposure,5.053427056373319e-06,4.4514528629317784e-05,0.11352309486312462,False,1-Day,Newey-West(5) | |
| 11 | +rv_daily,-0.0003205381939735506,0.00011473836742861585,-2.793644368114027,True,1-Day,Newey-West(5) | |
| 12 | +rv_w,-4.7339039740472715e-05,0.0001143894557103154,-0.4138409388043253,False,1-Day,Newey-West(5) | |
| 13 | +const,0.002249473137649632,0.00017116879437253463,13.141841337935936,True,5-Day,Newey-West(5) | |
| 14 | +iv_atm_30d,0.0013216839369709678,0.0003975016333988216,3.3249773734763375,True,5-Day,Newey-West(5) | |
| 15 | +iv_term_slope,0.001133720205572446,0.00024696584090778213,4.590595207034243,True,5-Day,Newey-West(5) | |
| 16 | +iv_skew_25d,-0.0003731283791251577,0.00040241394563520085,-0.9272252693335055,False,5-Day,Newey-West(5) | |
| 17 | +implied_skewness,-0.004685263679195295,0.0003430886852751595,-13.65612997536681,True,5-Day,Newey-West(5) | |
| 18 | +implied_kurtosis_proxy,0.006342337908904511,0.0002473371856506241,25.642476250471187,True,5-Day,Newey-West(5) | |
| 19 | +pc_volume_ratio,-0.002132635195154358,0.0001277731092057328,-16.690798309685906,True,5-Day,Newey-West(5) | |
| 20 | +pc_oi_ratio,0.0026340423531046745,0.00020078707992520254,13.118584891447753,True,5-Day,Newey-West(5) | |
| 21 | +net_gamma_exposure,0.0030205764876359066,0.00016940745025374946,17.830245854662774,True,5-Day,Newey-West(5) | |
| 22 | +rv_daily,-0.005554035996188907,0.0003107847593015392,-17.871005028274563,True,5-Day,Newey-West(5) | |
| 23 | +rv_w,0.00348308295756233,0.0004380440891601615,7.95144380155947,True,5-Day,Newey-West(5) | |
added
_verify/results/robustness_quantile_regression.csv
+56 −0
@@ -0,0 +1,56 @@ | ||
| 1 | +target,tau,variable,coefficient | |
| 2 | +5-Day,0.1,const,-0.03644256919308925 | |
| 3 | +5-Day,0.1,iv_atm_30d,-0.010547011640209655 | |
| 4 | +5-Day,0.1,iv_term_slope,0.00019575372630210676 | |
| 5 | +5-Day,0.1,iv_skew_25d,-0.0012908960196656748 | |
| 6 | +5-Day,0.1,implied_skewness,-0.001947967109688327 | |
| 7 | +5-Day,0.1,implied_kurtosis_proxy,0.0045090050836815105 | |
| 8 | +5-Day,0.1,pc_volume_ratio,-0.0012226704525396188 | |
| 9 | +5-Day,0.1,pc_oi_ratio,0.001984764483567175 | |
| 10 | +5-Day,0.1,net_gamma_exposure,0.0029422991902574524 | |
| 11 | +5-Day,0.1,rv_daily,-0.007980650731533204 | |
| 12 | +5-Day,0.1,rv_w,-0.0034869989320195837 | |
| 13 | +5-Day,0.25,const,-0.01828573590465208 | |
| 14 | +5-Day,0.25,iv_atm_30d,-0.004896693349371038 | |
| 15 | +5-Day,0.25,iv_term_slope,0.0006762916815459343 | |
| 16 | +5-Day,0.25,iv_skew_25d,-0.0008104030746726128 | |
| 17 | +5-Day,0.25,implied_skewness,-0.002419173463078245 | |
| 18 | +5-Day,0.25,implied_kurtosis_proxy,0.004276947566478688 | |
| 19 | +5-Day,0.25,pc_volume_ratio,-0.0014957443052624636 | |
| 20 | +5-Day,0.25,pc_oi_ratio,0.0019506171091430186 | |
| 21 | +5-Day,0.25,net_gamma_exposure,0.0028080716840669976 | |
| 22 | +5-Day,0.25,rv_daily,-0.010143123118263795 | |
| 23 | +5-Day,0.25,rv_w,0.000952765932427168 | |
| 24 | +5-Day,0.5,const,0.0021606822183559563 | |
| 25 | +5-Day,0.5,iv_atm_30d,0.0019414313992837343 | |
| 26 | +5-Day,0.5,iv_term_slope,0.0013342851187313472 | |
| 27 | +5-Day,0.5,iv_skew_25d,-0.0004644472963037347 | |
| 28 | +5-Day,0.5,implied_skewness,-0.003373255512278814 | |
| 29 | +5-Day,0.5,implied_kurtosis_proxy,0.0048376998507626045 | |
| 30 | +5-Day,0.5,pc_volume_ratio,-0.001684639123642353 | |
| 31 | +5-Day,0.5,pc_oi_ratio,0.002010434168078036 | |
| 32 | +5-Day,0.5,net_gamma_exposure,0.002398880477297468 | |
| 33 | +5-Day,0.5,rv_daily,-0.007690087326290107 | |
| 34 | +5-Day,0.5,rv_w,0.004120597533240779 | |
| 35 | +5-Day,0.75,const,0.023322996819406444 | |
| 36 | +5-Day,0.75,iv_atm_30d,0.007600056589821959 | |
| 37 | +5-Day,0.75,iv_term_slope,0.0020570007168977163 | |
| 38 | +5-Day,0.75,iv_skew_25d,-0.0005621606391916226 | |
| 39 | +5-Day,0.75,implied_skewness,-0.0038645858987798 | |
| 40 | +5-Day,0.75,implied_kurtosis_proxy,0.005015186784675284 | |
| 41 | +5-Day,0.75,pc_volume_ratio,-0.0018773034092467674 | |
| 42 | +5-Day,0.75,pc_oi_ratio,0.002242678921069006 | |
| 43 | +5-Day,0.75,net_gamma_exposure,0.002155847382349168 | |
| 44 | +5-Day,0.75,rv_daily,-0.003220240624486815 | |
| 45 | +5-Day,0.75,rv_w,0.009847666418296744 | |
| 46 | +5-Day,0.9,const,0.040952186118840425 | |
| 47 | +5-Day,0.9,iv_atm_30d,0.013137307123713525 | |
| 48 | +5-Day,0.9,iv_term_slope,0.0032893526955145905 | |
| 49 | +5-Day,0.9,iv_skew_25d,0.00018913432774535108 | |
| 50 | +5-Day,0.9,implied_skewness,-0.005053484061727455 | |
| 51 | +5-Day,0.9,implied_kurtosis_proxy,0.0052325482325611345 | |
| 52 | +5-Day,0.9,pc_volume_ratio,-0.002134592044479843 | |
| 53 | +5-Day,0.9,pc_oi_ratio,0.002179555708667724 | |
| 54 | +5-Day,0.9,net_gamma_exposure,0.0020462142657435758 | |
| 55 | +5-Day,0.9,rv_daily,-0.0007943647391827855 | |
| 56 | +5-Day,0.9,rv_w,0.010162726223918813 | |
added
_verify/results/robustness_ticker_r2.csv
+70 −0
@@ -0,0 +1,70 @@ | ||
| 1 | +ticker,r2_5d,n_obs | |
| 2 | +AAPL,0.10930794149604595,2552 | |
| 3 | +ABBV,0.18858228467521654,1331 | |
| 4 | +ABT,0.10136835934967914,1182 | |
| 5 | +ADBE,0.08129109560792169,1385 | |
| 6 | +AMD,0.10874473792475259,1365 | |
| 7 | +AMZN,0.06822508014557305,2167 | |
| 8 | +AVGO,0.12670643882602517,1305 | |
| 9 | +BA,0.15469075804535382,2012 | |
| 10 | +BAC,0.14989153742732542,2123 | |
| 11 | +CAT,0.09951842066727523,1919 | |
| 12 | +COST,0.14117217994696174,1214 | |
| 13 | +CRM,0.051514692952278174,2005 | |
| 14 | +CSCO,0.10046073955144286,1910 | |
| 15 | +CVX,0.1348841537107086,1675 | |
| 16 | +DIA,0.2207335936640452,2422 | |
| 17 | +DIS,0.17021511761457242,1933 | |
| 18 | +GE,0.07566403218176165,1699 | |
| 19 | +GLD,0.14617795339397244,2925 | |
| 20 | +GOOG,0.11938910072232989,2117 | |
| 21 | +GOOGL,0.14973065168319155,1770 | |
| 22 | +GS,0.10145767885541701,1620 | |
| 23 | +HD,0.08495957550485367,1908 | |
| 24 | +HON,0.1595290118371573,871 | |
| 25 | +INTC,0.11532371671384323,2173 | |
| 26 | +IWM,0.243880344323123,2982 | |
| 27 | +JNJ,0.1471516773536603,1577 | |
| 28 | +JPM,0.15381013064488436,2180 | |
| 29 | +KO,0.11710918735419407,1722 | |
| 30 | +LLY,0.06767289173582025,1716 | |
| 31 | +LMT,0.15439869128002282,924 | |
| 32 | +LOW,0.10887091847615948,1126 | |
| 33 | +MA,0.09024798001355028,1475 | |
| 34 | +MCD,0.05462804499820717,1628 | |
| 35 | +META,0.2612893184089482,626 | |
| 36 | +MRK,0.14677511659690923,1898 | |
| 37 | +MSFT,0.053613440553136105,2367 | |
| 38 | +NDX,0.1980941865826138,2374 | |
| 39 | +NFLX,0.10795257771082156,2116 | |
| 40 | +NVDA,0.07916676778786702,1921 | |
| 41 | +PEP,0.13190136785475604,1137 | |
| 42 | +PFE,0.09253878036737706,1764 | |
| 43 | +PG,0.09156209684443828,1664 | |
| 44 | +QCOM,0.09797257878609322,1873 | |
| 45 | +QQQ,0.2503228869956333,2882 | |
| 46 | +RTX,0.12024800197416874,616 | |
| 47 | +RUT,0.22627548845282952,2937 | |
| 48 | +SPX,0.2684293782621828,3675 | |
| 49 | +SPY,0.28687437035402374,3151 | |
| 50 | +TLT,0.11012543114215845,2606 | |
| 51 | +TMO,0.09775674367943454,626 | |
| 52 | +TSLA,0.19128452637504367,1900 | |
| 53 | +TXN,0.12296111731873316,1442 | |
| 54 | +UNH,0.10016412178893697,1374 | |
| 55 | +UPS,0.12363139118064015,1190 | |
| 56 | +V,0.08925344356686127,1512 | |
| 57 | +WFC,0.13435219410360566,1909 | |
| 58 | +WMT,0.13323070179691499,1636 | |
| 59 | +XLB,0.19019353185125032,1062 | |
| 60 | +XLC,0.2129469407884068,556 | |
| 61 | +XLE,0.18408100021866758,2172 | |
| 62 | +XLF,0.17613964914347813,2098 | |
| 63 | +XLI,0.19078968595688595,1214 | |
| 64 | +XLK,0.16639055249550472,1214 | |
| 65 | +XLP,0.11038431874620036,1023 | |
| 66 | +XLRE,0.08266990779277739,289 | |
| 67 | +XLU,0.17927287171987716,1110 | |
| 68 | +XLV,0.22364513340253067,1277 | |
| 69 | +XLY,0.17822753558192672,1169 | |
| 70 | +XOM,0.16388457918602228,1788 | |
added
_verify/results/robustness_with_controls.csv
+33 −0
@@ -0,0 +1,33 @@ | ||
| 1 | +target,variable,coefficient,t_stat,r2 | |
| 2 | +1-Day,const,0.00041786971535009824,9.333060404615585,0.002292639930098761 | |
| 3 | +1-Day,iv_atm_30d,0.00041318111478102294,3.6272662732140084,0.002292639930098761 | |
| 4 | +1-Day,iv_term_slope,9.680422774074818e-05,1.3980605192721316,0.002292639930098761 | |
| 5 | +1-Day,iv_skew_25d,0.0005758991720821498,4.794816806573567,0.002292639930098761 | |
| 6 | +1-Day,implied_skewness,-0.0003325302575861558,-3.0306113012320495,0.002292639930098761 | |
| 7 | +1-Day,implied_kurtosis_proxy,8.449158003884458e-05,1.190317662389042,0.002292639930098761 | |
| 8 | +1-Day,pc_volume_ratio,-1.4520894824577135e-05,-0.3007213708100277,0.002292639930098761 | |
| 9 | +1-Day,pc_oi_ratio,-5.7655613005987106e-05,-0.9785002504192224,0.002292639930098761 | |
| 10 | +1-Day,net_gamma_exposure,2.7968023434491134e-05,0.5908739392586255,0.002292639930098761 | |
| 11 | +1-Day,rv_daily,-0.0001226302591835097,-0.9997251181259599,0.002292639930098761 | |
| 12 | +1-Day,rv_w,-9.895569143140739e-05,-0.8454003846587725,0.002292639930098761 | |
| 13 | +1-Day,log_volume,0.00015491238132302938,1.3753852843615524,0.002292639930098761 | |
| 14 | +1-Day,log_oi,-9.424369332255411e-05,-0.8479374944221798,0.002292639930098761 | |
| 15 | +1-Day,abs_return,-0.0005160303825767262,-6.35552910025913,0.002292639930098761 | |
| 16 | +1-Day,ret_lag1,0.0002717096989150732,3.898182458783993,0.002292639930098761 | |
| 17 | +1-Day,ret_lag5,-0.000407898133549298,-5.763568545631172,0.002292639930098761 | |
| 18 | +5-Day,const,0.002248732809448056,28.523667740277425,0.3801095743149804 | |
| 19 | +5-Day,iv_atm_30d,-0.0005619658321865007,-2.765555761641757,0.3801095743149804 | |
| 20 | +5-Day,iv_term_slope,0.00033970558389947146,2.7650232961996344,0.3801095743149804 | |
| 21 | +5-Day,iv_skew_25d,0.0008816791127037334,4.114773305685406,0.3801095743149804 | |
| 22 | +5-Day,implied_skewness,-0.0020034560377191414,-10.44165776277186,0.3801095743149804 | |
| 23 | +5-Day,implied_kurtosis_proxy,0.0027048693641364852,21.947650267472905,0.3801095743149804 | |
| 24 | +5-Day,pc_volume_ratio,-0.0017914279673155301,-22.14610695613231,0.3801095743149804 | |
| 25 | +5-Day,pc_oi_ratio,0.0011434977171620338,11.16111793595183,0.3801095743149804 | |
| 26 | +5-Day,net_gamma_exposure,0.0009664932669329856,11.626744800480498,0.3801095743149804 | |
| 27 | +5-Day,rv_daily,-0.003107999034948828,-12.49160129814713,0.3801095743149804 | |
| 28 | +5-Day,rv_w,0.0034325921908959136,14.189657517645005,0.3801095743149804 | |
| 29 | +5-Day,log_volume,0.0018369897488412163,9.350640453111886,0.3801095743149804 | |
| 30 | +5-Day,log_oi,-0.00171639628091866,-8.803768934482255,0.3801095743149804 | |
| 31 | +5-Day,abs_return,2.415834377888377e-05,0.14724009771674212,0.3801095743149804 | |
| 32 | +5-Day,ret_lag1,0.007346992376224504,59.03968065525922,0.3801095743149804 | |
| 33 | +5-Day,ret_lag5,0.016171759696382605,126.66401933285974,0.3801095743149804 | |
added
_verify/results/rolling_r2.csv
+121 −0
@@ -0,0 +1,121 @@ | ||
| 1 | +date,target,r2,n_obs | |
| 2 | +2011-01-03,5D_Return,0.021351965676438933,2315 | |
| 3 | +2011-01-03,1D_RV,0.2864740483018765,2315 | |
| 4 | +2011-04-04,5D_Return,0.02199931413894729,2459 | |
| 5 | +2011-04-04,1D_RV,0.30378421478832596,2459 | |
| 6 | +2011-07-05,5D_Return,0.039248193583349855,2591 | |
| 7 | +2011-07-05,1D_RV,0.35627908197911595,2591 | |
| 8 | +2011-10-03,5D_Return,0.07538739850541887,3031 | |
| 9 | +2011-10-03,1D_RV,0.43407488100049196,3031 | |
| 10 | +2012-01-03,5D_Return,0.05900390036556136,3280 | |
| 11 | +2012-01-03,1D_RV,0.4540219314901528,3281 | |
| 12 | +2012-04-03,5D_Return,0.047687200310321254,3345 | |
| 13 | +2012-04-03,1D_RV,0.47855565792266996,3346 | |
| 14 | +2012-07-03,5D_Return,0.04533878066895103,3359 | |
| 15 | +2012-07-03,1D_RV,0.45155559479733864,3360 | |
| 16 | +2012-10-02,5D_Return,0.036066690639001586,3078 | |
| 17 | +2012-10-02,1D_RV,0.42425334779910673,3079 | |
| 18 | +2013-01-04,5D_Return,0.042024392556716306,2985 | |
| 19 | +2013-01-04,1D_RV,0.3684172077868818,2985 | |
| 20 | +2013-04-08,5D_Return,0.041870237391314236,3077 | |
| 21 | +2013-04-08,1D_RV,0.40392126666754014,3077 | |
| 22 | +2013-07-08,5D_Return,0.05464755079654038,3324 | |
| 23 | +2013-07-08,1D_RV,0.3994316971578241,3324 | |
| 24 | +2013-10-04,5D_Return,0.0506322878986214,3898 | |
| 25 | +2013-10-04,1D_RV,0.40243916675586144,3898 | |
| 26 | +2014-01-06,5D_Return,0.03254597285933136,4818 | |
| 27 | +2014-01-06,1D_RV,0.4250799638364804,4818 | |
| 28 | +2014-04-07,5D_Return,0.034634149400380676,5531 | |
| 29 | +2014-04-07,1D_RV,0.4035451958102081,5531 | |
| 30 | +2014-07-08,5D_Return,0.027273047499392966,6140 | |
| 31 | +2014-07-08,1D_RV,0.3920868427943285,6140 | |
| 32 | +2014-10-06,5D_Return,0.03619255340250016,6592 | |
| 33 | +2014-10-06,1D_RV,0.40491950565501356,6592 | |
| 34 | +2015-01-06,5D_Return,0.09008809488023084,6686 | |
| 35 | +2015-01-06,1D_RV,0.3743804983306632,6686 | |
| 36 | +2015-04-08,5D_Return,0.08856876324807494,6757 | |
| 37 | +2015-04-08,1D_RV,0.33866563689412854,6757 | |
| 38 | +2015-07-08,5D_Return,0.08855394148092877,6880 | |
| 39 | +2015-07-08,1D_RV,0.3133509621139585,6880 | |
| 40 | +2015-10-06,5D_Return,0.1613671723971778,6872 | |
| 41 | +2015-10-06,1D_RV,0.2878358987062901,6872 | |
| 42 | +2016-01-06,5D_Return,0.11518406367935452,6975 | |
| 43 | +2016-01-06,1D_RV,0.2576791876064187,6975 | |
| 44 | +2016-04-07,5D_Return,0.13131863877949257,7128 | |
| 45 | +2016-04-07,1D_RV,0.318318122522638,7128 | |
| 46 | +2016-07-07,5D_Return,0.15004103410760783,7103 | |
| 47 | +2016-07-07,1D_RV,0.27488652682668135,7103 | |
| 48 | +2016-10-05,5D_Return,0.0813561144138053,7398 | |
| 49 | +2016-10-05,1D_RV,0.30954821841079294,7398 | |
| 50 | +2017-01-05,5D_Return,0.09056799958207484,7483 | |
| 51 | +2017-01-05,1D_RV,0.3359918139941088,7483 | |
| 52 | +2017-04-06,5D_Return,0.06620427550875507,7668 | |
| 53 | +2017-04-06,1D_RV,0.2655959604773547,7668 | |
| 54 | +2017-07-07,5D_Return,0.059186298128760195,7956 | |
| 55 | +2017-07-07,1D_RV,0.3316982724568045,7956 | |
| 56 | +2017-10-05,5D_Return,0.05480737204766317,7998 | |
| 57 | +2017-10-05,1D_RV,0.36203860891414497,7998 | |
| 58 | +2018-01-05,5D_Return,0.037096558497779375,8147 | |
| 59 | +2018-01-05,1D_RV,0.3066197493084043,8147 | |
| 60 | +2018-04-09,5D_Return,0.06525674770187628,8181 | |
| 61 | +2018-04-09,1D_RV,0.31857185451024295,8181 | |
| 62 | +2018-07-09,5D_Return,0.07173327925022444,8398 | |
| 63 | +2018-07-09,1D_RV,0.3246150293332297,8398 | |
| 64 | +2018-10-05,5D_Return,0.07164018971166897,8356 | |
| 65 | +2018-10-05,1D_RV,0.3149489798898225,8356 | |
| 66 | +2019-01-08,5D_Return,0.16831741729931038,8169 | |
| 67 | +2019-01-08,1D_RV,0.4343156491274691,8171 | |
| 68 | +2019-04-09,5D_Return,0.15212660842687864,8291 | |
| 69 | +2019-04-09,1D_RV,0.4472303551800254,8293 | |
| 70 | +2019-07-10,5D_Return,0.176588198297008,8109 | |
| 71 | +2019-07-10,1D_RV,0.46233863031404077,8111 | |
| 72 | +2019-10-08,5D_Return,0.17889265058239823,8076 | |
| 73 | +2019-10-08,1D_RV,0.4473240698476526,8078 | |
| 74 | +2020-01-08,5D_Return,0.08365574631367734,8376 | |
| 75 | +2020-01-08,1D_RV,0.3618574654714575,8378 | |
| 76 | +2020-04-08,5D_Return,0.17438089206684393,8397 | |
| 77 | +2020-04-08,1D_RV,0.7560253540697512,8399 | |
| 78 | +2020-07-09,5D_Return,0.1616524175298979,8556 | |
| 79 | +2020-07-09,1D_RV,0.7387867300637315,8558 | |
| 80 | +2020-10-07,5D_Return,0.14790255783658146,8820 | |
| 81 | +2020-10-07,1D_RV,0.7289648174455741,8822 | |
| 82 | +2021-01-07,5D_Return,0.14499418212878656,8906 | |
| 83 | +2021-01-07,1D_RV,0.72087580758492,8906 | |
| 84 | +2021-04-09,5D_Return,0.054316653565192,9002 | |
| 85 | +2021-04-09,1D_RV,0.4911865866388201,9002 | |
| 86 | +2021-07-09,5D_Return,0.040231000056973554,9280 | |
| 87 | +2021-07-09,1D_RV,0.4595323868789245,9280 | |
| 88 | +2021-10-07,5D_Return,0.04043000664786012,9515 | |
| 89 | +2021-10-07,1D_RV,0.4256409626305525,9518 | |
| 90 | +2022-01-06,5D_Return,0.03763780612931866,9802 | |
| 91 | +2022-01-06,1D_RV,0.44573326701660765,9805 | |
| 92 | +2022-04-07,5D_Return,0.061797653654088514,10068 | |
| 93 | +2022-04-07,1D_RV,0.47636588180970385,10071 | |
| 94 | +2022-07-11,5D_Return,0.11783330782021761,9839 | |
| 95 | +2022-07-11,1D_RV,0.525977781280833,9842 | |
| 96 | +2022-10-07,5D_Return,0.11217431591772808,10050 | |
| 97 | +2022-10-07,1D_RV,0.49080008175735634,10052 | |
| 98 | +2023-01-09,5D_Return,0.08392090026160703,9962 | |
| 99 | +2023-01-09,1D_RV,0.47016160268834595,9964 | |
| 100 | +2023-04-11,5D_Return,0.08226584330582853,9838 | |
| 101 | +2023-04-11,1D_RV,0.4473394336875208,9840 | |
| 102 | +2023-07-12,5D_Return,0.08859536228344689,9994 | |
| 103 | +2023-07-12,1D_RV,0.41327665031900584,9996 | |
| 104 | +2023-10-10,5D_Return,0.08832429425930266,9742 | |
| 105 | +2023-10-10,1D_RV,0.4334865166718763,9742 | |
| 106 | +2024-01-10,5D_Return,0.0975739372040173,9738 | |
| 107 | +2024-01-10,1D_RV,0.39378883009088395,9739 | |
| 108 | +2024-04-11,5D_Return,0.08596217222832447,10072 | |
| 109 | +2024-04-11,1D_RV,0.39163580025876676,10073 | |
| 110 | +2024-07-12,5D_Return,0.08626966456481489,10344 | |
| 111 | +2024-07-12,1D_RV,0.38716945093956245,10345 | |
| 112 | +2024-10-10,5D_Return,0.06966933278429732,10600 | |
| 113 | +2024-10-10,1D_RV,0.3775303805749274,10602 | |
| 114 | +2025-01-13,5D_Return,0.03852552912948948,10815 | |
| 115 | +2025-01-13,1D_RV,0.39310299563074236,10816 | |
| 116 | +2025-04-14,5D_Return,0.0542218319103438,10707 | |
| 117 | +2025-04-14,1D_RV,0.4072013812208505,10708 | |
| 118 | +2025-07-16,5D_Return,0.03995382505301126,10815 | |
| 119 | +2025-07-16,1D_RV,0.39895286667176677,10816 | |
| 120 | +2025-10-14,5D_Return,0.03940523037013821,10916 | |
| 121 | +2025-10-14,1D_RV,0.39656328003243335,10916 | |
added
_verify/results/rq1_meta.csv
+13 −0
@@ -0,0 +1,13 @@ | ||
| 1 | +label,target,n_obs,n_tickers,r_squared,adj_r_squared,n_periods | |
| 2 | +Stocks | 1-Day,ret_1d,79943.0,49,0.0007920872397515488,0.0006670799944981098, | |
| 3 | +Stocks | 1-Day,ret_1d,,49,,,2415.0 | |
| 4 | +Stocks | 5-Day,ret_5d,79943.0,49,0.047584162165434485,0.04746500890543415, | |
| 5 | +Stocks | 5-Day,ret_5d,,49,,,2415.0 | |
| 6 | +ETFs | 1-Day,ret_1d,30152.0,17,0.0013818787764086071,0.001050563252297354, | |
| 7 | +ETFs | 5-Day,ret_5d,30152.0,17,0.12417340136711796,0.12388282487707691, | |
| 8 | +Indices | 1-Day,ret_1d,8986.0,3,0.004265737828671234,0.0031562846117672017, | |
| 9 | +Indices | 5-Day,ret_5d,8986.0,3,0.19295348533980317,0.1920542691674798, | |
| 10 | +All | 1-Day,ret_1d,119081.0,69,0.0010269049901033833,0.0009430070229403675, | |
| 11 | +All | 1-Day,ret_1d,,69,,,2747.0 | |
| 12 | +All | 5-Day,ret_5d,119081.0,69,0.05291603110227727,0.05283649100242871, | |
| 13 | +All | 5-Day,ret_5d,,69,,,2747.0 | |
added
_verify/results/rq1_regression_results.csv
+133 −0
@@ -0,0 +1,133 @@ | ||
| 1 | +variable,coefficient,std_error,t_stat,p_value,significant_5pct,significant_1pct,group,horizon,method,fm_coefficient,fm_std_error,fm_t_stat,fm_significant_5pct,fm_significant_1pct | |
| 2 | +const,0.0004749326167634848,6.162181567921933e-05,7.707215562030996,1.9999999999998992,True,True,Stocks,1-Day,Pooled OLS,,,,, | |
| 3 | +iv_atm_30d,0.00035455189599640623,0.00014772580677565477,2.4000674204125345,1.955218186198448,True,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 4 | +iv_term_slope,0.00013370377245836584,9.031763495795387e-05,1.4803728255352322,1.7332766243587587,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 5 | +iv_skew_25d,0.0004687304268636115,0.0001620729700748604,2.89209500293052,1.9878192458998507,True,True,Stocks,1-Day,Pooled OLS,,,,, | |
| 6 | +implied_skewness,-0.00015858867442038389,0.000141434239949792,-1.1212891197823212,1.5744768805728309,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 7 | +implied_kurtosis_proxy,4.489798333191654e-05,9.232485242729861e-05,0.48630441480826136,1.291097546106194,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 8 | +pc_volume_ratio,0.00010182969163875525,6.138084275049604e-05,1.658981647623799,1.7984870045690196,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 9 | +pc_oi_ratio,-3.867687832575581e-05,6.788058646276205e-05,-0.5697781993526703,1.321665636345358,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 10 | +net_gamma_exposure,1.8752855129314963e-05,5.816636875875159e-05,0.3224003067321174,1.2425231715225622,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 11 | +rv_daily,-0.0002835799162649859,0.00014983861258386076,-1.8925690205938983,1.866906062290026,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 12 | +rv_w,-0.00010427602066402559,0.00014757901201771978,-0.7065775765696628,1.3783743948807277,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 13 | +const,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0005206125501497902,0.00020804551602204784,2.5023973604632643,True,False | |
| 14 | +iv_atm_30d,,,,,,,Stocks,1-Day,Fama-MacBeth,0.00032514126617007376,0.00038406230394470096,0.8465846890740131,False,False | |
| 15 | +iv_term_slope,,,,,,,Stocks,1-Day,Fama-MacBeth,0.00010238512746974861,0.00019899439635026934,0.5145126161720184,False,False | |
| 16 | +iv_skew_25d,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0004206714326659498,0.0003747705436733448,1.1224773124982117,False,False | |
| 17 | +implied_skewness,,,,,,,Stocks,1-Day,Fama-MacBeth,-0.00013551298475038712,0.0003824857007815966,-0.3542955579083634,False,False | |
| 18 | +implied_kurtosis_proxy,,,,,,,Stocks,1-Day,Fama-MacBeth,-0.0002259431004769811,0.00023799651381506938,-0.9493546642979227,False,False | |
| 19 | +pc_volume_ratio,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0001403392916797961,0.00017860227653546047,0.7857642937263039,False,False | |
| 20 | +pc_oi_ratio,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0001981586340207312,0.0002611521554982665,0.7587861323321398,False,False | |
| 21 | +net_gamma_exposure,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0003641413461242488,0.00020312703290579655,1.792677916450073,False,False | |
| 22 | +rv_daily,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0005762857353465232,0.0006180100527575115,0.9324860215059323,False,False | |
| 23 | +rv_w,,,,,,,Stocks,1-Day,Fama-MacBeth,-0.0013274298575131787,0.0007405214180403615,-1.7925610592411363,False,False | |
| 24 | +const,0.0027061188053751975,0.00013432330834326907,20.14630847581265,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 25 | +iv_atm_30d,0.0005912653544219735,0.0003195991501505124,1.850021672909713,1.855876030110968,False,False,Stocks,5-Day,Pooled OLS,,,,, | |
| 26 | +iv_term_slope,0.00027043383017297414,0.0001926520244083366,1.4037424781988002,1.7021120366838696,False,False,Stocks,5-Day,Pooled OLS,,,,, | |
| 27 | +iv_skew_25d,-0.0003691227931167267,0.000347016729296296,-1.0637031645859232,1.5468461397520696,False,False,Stocks,5-Day,Pooled OLS,,,,, | |
| 28 | +implied_skewness,-0.004823247690304919,0.00030760996421721635,-15.67975115038543,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 29 | +implied_kurtosis_proxy,0.006850306630371843,0.0002070096591497861,33.09172460119439,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 30 | +pc_volume_ratio,-0.0022401638478081664,0.00012729944249734382,-17.59759354684455,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 31 | +pc_oi_ratio,0.002006445950752048,0.00014790606790470687,13.565677048792644,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 32 | +net_gamma_exposure,0.002748993885189224,0.000132242482269842,20.787524840768466,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 33 | +rv_daily,-0.005391455115447303,0.00036083936844073626,-14.94142709190776,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 34 | +rv_w,0.003475700240165574,0.00038693176700024514,8.98272133898836,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 35 | +const,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0026507805795847224,0.0004504778016310442,5.884375589622942,True,True | |
| 36 | +iv_atm_30d,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0002123481497355067,0.0010326016107086034,0.20564382965642167,False,False | |
| 37 | +iv_term_slope,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0007620600421147822,0.0006597128843788298,1.1551389402259742,False,False | |
| 38 | +iv_skew_25d,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0010283112083582311,0.0007593869106955965,1.3541334382710133,False,False | |
| 39 | +implied_skewness,,,,,,,Stocks,5-Day,Fama-MacBeth,-0.00407654000675861,0.0007935119158065226,-5.137339371413509,True,True | |
| 40 | +implied_kurtosis_proxy,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0049704193437521485,0.00041118094828401005,12.0881557486924,True,True | |
| 41 | +pc_volume_ratio,,,,,,,Stocks,5-Day,Fama-MacBeth,-0.0013239231015417783,0.0003198796987179342,-4.138815644906545,True,True | |
| 42 | +pc_oi_ratio,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0015882860087037668,0.00043227802342823144,3.674223353081146,True,True | |
| 43 | +net_gamma_exposure,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0023464109242054064,0.0002865594322563351,8.188217382097822,True,True | |
| 44 | +rv_daily,,,,,,,Stocks,5-Day,Fama-MacBeth,-0.002665424305429559,0.00278461547794354,-0.9571965416919952,False,False | |
| 45 | +rv_w,,,,,,,Stocks,5-Day,Fama-MacBeth,0.00152208644380423,0.002348369736143162,0.6481459969348882,False,False | |
| 46 | +const,0.00020662881302969984,6.452265041421152e-05,3.2024228965056363,1.9952686634925514,True,True,ETFs,1-Day,Pooled OLS,,,,, | |
| 47 | +iv_atm_30d,-8.538059110035123e-05,0.00018727687437503163,-0.45590568181617647,1.2808723134893776,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 48 | +iv_term_slope,-0.00012595632511888864,0.00010708402144885772,-1.176238279200638,1.6005072243318237,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 49 | +iv_skew_25d,0.0007263652992749306,0.00021146693358568217,3.434888315437845,1.997812553117713,True,True,ETFs,1-Day,Pooled OLS,,,,, | |
| 50 | +implied_skewness,-0.00046394990275837523,0.00016117183699763965,-2.8786040501925267,1.9873357471624093,True,True,ETFs,1-Day,Pooled OLS,,,,, | |
| 51 | +implied_kurtosis_proxy,4.204684792508786e-05,9.43158352985044e-05,0.4458089968880826,1.2775912636884112,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 52 | +pc_volume_ratio,-0.0001036963979536446,7.007262267860165e-05,-1.4798418268039335,1.7330669146942494,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 53 | +pc_oi_ratio,-4.18273325808389e-05,8.252043710215951e-05,-0.5068724070021231,1.2983013012389195,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 54 | +net_gamma_exposure,-8.139665301044607e-05,7.84490449694536e-05,-1.0375735363271816,1.5342334678113891,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 55 | +rv_daily,-0.00020727578350894063,0.00017213762513450319,-1.204128285997797,1.6135503987332878,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 56 | +rv_w,-0.0001783890404219195,0.00019082977493507455,-0.9348071624703863,1.484554430123176,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 57 | +const,0.0010308927248672,0.00013159892884786692,7.833595105161904,1.9999999999999623,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 58 | +iv_atm_30d,-0.00036640376368045515,0.00038966390517105763,-0.9403071693787199,1.487205520601532,False,False,ETFs,5-Day,Pooled OLS,,,,, | |
| 59 | +iv_term_slope,0.004283241521837181,0.00022599190044486126,18.953075368655657,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 60 | +iv_skew_25d,0.0024807551917930444,0.000442045265897993,5.61199357435378,1.9999998843881401,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 61 | +implied_skewness,-0.004664820927670824,0.00033997442790154443,-13.72109354360541,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 62 | +implied_kurtosis_proxy,0.004101241095879393,0.00020577790096052304,19.930425360234313,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 63 | +pc_volume_ratio,-0.0013799828658628101,0.00014133249273191607,-9.76408778468519,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 64 | +pc_oi_ratio,0.0021617141052115312,0.00017049570355003464,12.678994603386837,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 65 | +net_gamma_exposure,0.003767604389154923,0.0001574148237487613,23.934241384840163,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 66 | +rv_daily,-0.006848528775634995,0.000372177942746307,-18.40122153693363,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 67 | +rv_w,0.006252444500217711,0.00043176267669398945,14.481206546366474,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 68 | +const,0.0005333294384410454,0.00011906230226928459,4.479414796085566,1.9999649371997115,True,True,Indices,1-Day,Pooled OLS,,,,, | |
| 69 | +iv_atm_30d,8.421668977903826e-05,0.0005925033526671261,0.14213706876077709,1.2101346774214155,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 70 | +iv_term_slope,-0.0002762448822661023,0.0002119170554288683,-1.3035519095291797,1.6588439026884434,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 71 | +iv_skew_25d,0.0005634362016035408,0.0005654644728853083,0.996413088038196,1.5143227030404751,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 72 | +implied_skewness,-4.5238126494314334e-05,0.00046521155961406395,-0.09724205162022102,1.2058789400818677,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 73 | +implied_kurtosis_proxy,-0.00027814493839385847,0.00029287232893186505,-0.9497139569596115,1.4917438126249243,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 74 | +pc_volume_ratio,-0.00023106890533833733,0.00013512828047038673,-1.7099966382609,1.8150806701885132,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 75 | +pc_oi_ratio,0.00010636959815468908,0.00014555432481376843,0.7307896779486641,1.3890976358224854,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 76 | +net_gamma_exposure,0.000178031349144972,0.00014282155049038473,1.2465300126885104,1.6331161217052539,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 77 | +rv_daily,-0.00047865392149876006,0.0003135866340013787,-1.526384959049803,1.751103187055206,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 78 | +rv_w,-7.94417985949312e-05,0.0003563591487986391,-0.22292622165797077,1.22169702515993,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 79 | +const,0.002555193205189299,0.00023190156044209262,11.01843903213988,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 80 | +iv_atm_30d,-0.0102696787340854,0.0011976008876859534,-8.575209687702248,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 81 | +iv_term_slope,0.005261942797308689,0.0004296967117880217,12.245713436840342,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 82 | +iv_skew_25d,0.011483100058852256,0.0011769604910730283,9.756572243460083,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 83 | +implied_skewness,-0.01873331880163512,0.0009511367161098303,-19.695716172386657,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 84 | +implied_kurtosis_proxy,0.01334706187045688,0.0005822158566772341,22.92459354616334,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 85 | +pc_volume_ratio,-0.0025103995907148425,0.0002570545123851268,-9.766020317720338,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 86 | +pc_oi_ratio,-0.0010797348280773156,0.00027217034442134167,-3.9671288595858147,1.999694892702129,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 87 | +net_gamma_exposure,0.00015745899104132314,0.0002439307407583486,0.6455069605077401,1.3521725964645113,False,False,Indices,5-Day,Pooled OLS,,,,, | |
| 88 | +rv_daily,-0.006898841239676331,0.0007235393546656865,-9.534852797141852,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 89 | +rv_w,0.008441113820457164,0.0007816760527470247,10.79873662598818,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 90 | +const,0.0004176344644803888,4.47995863539856e-05,9.322283942097915,2.0,True,True,All,1-Day,Pooled OLS,,,,, | |
| 91 | +iv_atm_30d,0.0002801047907919164,0.00011337197236012895,2.4706705278281342,1.9622925571593282,True,False,All,1-Day,Pooled OLS,,,,, | |
| 92 | +iv_term_slope,8.139458311611625e-05,6.934094708787371e-05,1.1738314305538302,1.5993758072647917,False,False,All,1-Day,Pooled OLS,,,,, | |
| 93 | +iv_skew_25d,0.0005589385749154352,0.00011991456612637133,4.66113995130834,1.9999847190587423,True,True,All,1-Day,Pooled OLS,,,,, | |
| 94 | +implied_skewness,-0.0002743207103647741,0.00010918059267334453,-2.5125409530016873,1.9660281273891784,True,False,All,1-Day,Pooled OLS,,,,, | |
| 95 | +implied_kurtosis_proxy,3.1983922204249944e-05,7.05171069893689e-05,0.45356259735771365,1.2801056886264497,False,False,All,1-Day,Pooled OLS,,,,, | |
| 96 | +pc_volume_ratio,-1.4646201853655517e-06,4.8066439691048555e-05,-0.030470744136231683,1.2024857576757708,False,False,All,1-Day,Pooled OLS,,,,, | |
| 97 | +pc_oi_ratio,-6.372137176547066e-05,5.574728819572049e-05,-1.1430398469205236,1.5848275896789732,False,False,All,1-Day,Pooled OLS,,,,, | |
| 98 | +net_gamma_exposure,5.053448274950581e-06,4.575733672819504e-05,0.1104401749815285,1.2069665437522432,False,False,All,1-Day,Pooled OLS,,,,, | |
| 99 | +rv_daily,-0.0003205395398650557,0.00011649992773262164,-2.751414066116198,1.9818834797185378,True,True,All,1-Day,Pooled OLS,,,,, | |
| 100 | +rv_w,-4.7339238509956883e-05,0.00011700280574635605,-0.4045991735666666,1.2648212398634207,False,False,All,1-Day,Pooled OLS,,,,, | |
| 101 | +const,,,,,,,All,1-Day,Fama-MacBeth,0.0004413041094819202,0.0001808697891170869,2.4398995080170076,True,False | |
| 102 | +iv_atm_30d,,,,,,,All,1-Day,Fama-MacBeth,0.0006181471672673013,0.00028381610833631984,2.1779847905419163,True,False | |
| 103 | +iv_term_slope,,,,,,,All,1-Day,Fama-MacBeth,-4.0813365249167494e-07,0.00014294855969493761,-0.002855108532486519,False,False | |
| 104 | +iv_skew_25d,,,,,,,All,1-Day,Fama-MacBeth,-0.0013001812251786512,0.001307565927863853,-0.9943523286070431,False,False | |
| 105 | +implied_skewness,,,,,,,All,1-Day,Fama-MacBeth,0.0004697753320749388,0.0005765573956340026,0.8147936972664405,False,False | |
| 106 | +implied_kurtosis_proxy,,,,,,,All,1-Day,Fama-MacBeth,0.0008231521592019987,0.0007074854043171674,1.163489952130486,False,False | |
| 107 | +pc_volume_ratio,,,,,,,All,1-Day,Fama-MacBeth,9.181748761086899e-05,0.00018024556909146253,0.5094021898772878,False,False | |
| 108 | +pc_oi_ratio,,,,,,,All,1-Day,Fama-MacBeth,-0.00041127183127987767,0.00047747866755173355,-0.8613407451031673,False,False | |
| 109 | +net_gamma_exposure,,,,,,,All,1-Day,Fama-MacBeth,-1.327059291579112e-05,0.0001377236426700772,-0.0963566796412827,False,False | |
| 110 | +rv_daily,,,,,,,All,1-Day,Fama-MacBeth,0.0005739521885656262,0.000870886727558829,0.6590434443460448,False,False | |
| 111 | +rv_w,,,,,,,All,1-Day,Fama-MacBeth,0.00016385563561728916,0.000339584297555851,0.4825182930913937,False,False | |
| 112 | +const,0.002249473137649632,9.744195685448008e-05,23.085262347604505,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 113 | +iv_atm_30d,0.001321689486522399,0.0002448598635187868,5.397738394234597,1.9999996239641074,True,True,All,5-Day,Pooled OLS,,,,, | |
| 114 | +iv_term_slope,0.0011337249658925116,0.00014940411420353143,7.588311553107913,1.99999999999975,True,True,All,5-Day,Pooled OLS,,,,, | |
| 115 | +iv_skew_25d,-0.0003731299458349166,0.0002595318279233911,-1.4377039949992474,1.7161438664739022,False,False,All,5-Day,Pooled OLS,,,,, | |
| 116 | +implied_skewness,-0.004685283351910465,0.0002373842080273201,-19.737131592895366,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 117 | +implied_kurtosis_proxy,0.006342364539424326,0.0001582948425536675,40.06677941685966,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 118 | +pc_volume_ratio,-0.0021326441497677238,9.927152874459023e-05,-21.48293852968333,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 119 | +pc_oi_ratio,0.0026340534130510304,0.00012007776063765926,21.936230314949164,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 120 | +net_gamma_exposure,0.003020589170580747,0.00010150654768395594,29.757579579845956,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 121 | +rv_daily,-0.0055540593167479335,0.0002847807380142027,-19.502931818622294,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 122 | +rv_w,0.0034830975825020493,0.0003031050099749578,11.491389016597974,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 123 | +const,,,,,,,All,5-Day,Fama-MacBeth,0.002323011347847268,0.0003975497484822125,5.843322393527326,True,True | |
| 124 | +iv_atm_30d,,,,,,,All,5-Day,Fama-MacBeth,0.0019895227580187195,0.0008178968950928024,2.4324860137694726,True,False | |
| 125 | +iv_term_slope,,,,,,,All,5-Day,Fama-MacBeth,-0.00017906197873352099,0.0004063020112272963,-0.4407115243969316,False,False | |
| 126 | +iv_skew_25d,,,,,,,All,5-Day,Fama-MacBeth,-0.005148340935834503,0.004263900455576926,-1.2074252177019709,False,False | |
| 127 | +implied_skewness,,,,,,,All,5-Day,Fama-MacBeth,-0.00044319883202484605,0.001834544753947494,-0.2415851840469904,False,False | |
| 128 | +implied_kurtosis_proxy,,,,,,,All,5-Day,Fama-MacBeth,0.006308505476169659,0.0022892217150185133,2.755742458138722,True,True | |
| 129 | +pc_volume_ratio,,,,,,,All,5-Day,Fama-MacBeth,-0.0006773779408863298,0.0005625090923136969,-1.2042079855103454,False,False | |
| 130 | +pc_oi_ratio,,,,,,,All,5-Day,Fama-MacBeth,0.0005499456194883337,0.0015395657076609115,0.3572082807195514,False,False | |
| 131 | +net_gamma_exposure,,,,,,,All,5-Day,Fama-MacBeth,0.0017513420089170294,0.0003664082298004829,4.7797562021755695,True,True | |
| 132 | +rv_daily,,,,,,,All,5-Day,Fama-MacBeth,0.002703563259829668,0.0028078360685473446,0.9628636408351209,False,False | |
| 133 | +rv_w,,,,,,,All,5-Day,Fama-MacBeth,0.0003930840057773764,0.0010368414426902908,0.37911679606231974,False,False | |
added
_verify/results/rq2_diebold_mariano.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +ticker,target,mse_har,mse_har_iv,mse_improvement_pct,dm_statistic,dm_significant_5pct | |
| 2 | +AAPL,1-Day RV,1.7950043241009343e-07,1.6098906658129432e-07,10.312713780269535,2.5430368095648705,True | |
| 3 | +ADBE,1-Day RV,5.0580415716854e-07,5.113743147230092e-07,-1.1012478793473333,-0.3070480944289019,False | |
| 4 | +AMD,1-Day RV,6.382801960919755e-07,5.635915584653417e-07,11.70154394322949,3.128996219564092,True | |
| 5 | +AMZN,1-Day RV,4.18787981858695e-07,3.9416193831898606e-07,5.880312856737638,0.2623425547306376,False | |
| 6 | +BA,1-Day RV,3.3021759735206715e-07,4.5906911839460536e-07,-39.020186106302795,-6.393673579939354,True | |
| 7 | +BAC,1-Day RV,1.262583125268149e-07,1.2544601895937938e-07,0.6433584856149621,0.056823404052450156,False | |
| 8 | +CAT,1-Day RV,3.3984981393802655e-07,2.2865488041076957e-07,32.71884490351199,4.265490241030385,True | |
| 9 | +COST,1-Day RV,5.3490853258687894e-08,4.0459715223583066e-08,24.361432359444244,2.9356654663276274,True | |
| 10 | +CRM,1-Day RV,4.419190919691863e-07,4.0221932089177135e-07,8.983493087052025,1.611933472504344,False | |
| 11 | +CSCO,1-Day RV,1.597641169260778e-07,2.147281038401949e-07,-34.40321141670925,-3.7655435756176963,True | |
| 12 | +AAPL,5-Day RV,6.932414484979054e-07,6.662165548668995e-07,3.8983378286977364,1.6977469113853043,False | |
| 13 | +ADBE,5-Day RV,1.3473370106673582e-06,1.3406643512878357e-06,0.4952479837407169,0.18932941274101325,False | |
| 14 | +AMD,5-Day RV,2.4977672031108e-06,2.354382114882187e-06,5.740530504605745,1.676823780518025,False | |
| 15 | +AMZN,5-Day RV,1.4805343348789202e-06,1.838307752978227e-06,-24.16515508426664,-7.506642917459933,True | |
| 16 | +BA,5-Day RV,8.837292833948637e-07,1.1298098649006916e-06,-27.845697333973636,-5.064795983807893,True | |
| 17 | +BAC,5-Day RV,2.9663685327167365e-07,3.014497204224349e-07,-1.6224778201626229,-0.44173668015957357,False | |
| 18 | +CAT,5-Day RV,9.781952519109973e-07,9.976767482154728e-07,-1.9915754310212155,-0.33515314685794323,False | |
| 19 | +COST,5-Day RV,1.19091179632095e-07,1.0552693312305664e-07,11.389799438499146,2.3181752890324865,True | |
| 20 | +CRM,5-Day RV,9.623117337437025e-07,1.0087392939978598e-06,-4.82458631918984,-1.884617805428785,False | |
| 21 | +CSCO,5-Day RV,3.5611192586989074e-07,4.028011471819401e-07,-13.110827782023721,-2.535627132268582,True | |
added
_verify/results/rq2_insample.csv
+11 −0
@@ -0,0 +1,11 @@ | ||
| 1 | +target,model,r2,adj_r2,n_obs,n_features | |
| 2 | +1-Day RV,HAR-RV,0.3585199062249016,0.3585126260818995,264345,3 | |
| 3 | +1-Day RV,GARCH_proxy,0.3258294941832206,0.32582439411395725,264380,2 | |
| 4 | +1-Day RV,IV_only,0.3904191647845503,0.3903988918821112,120280,4 | |
| 5 | +1-Day RV,IV_surface,0.3908328083987763,0.39080211626746275,119093,6 | |
| 6 | +1-Day RV,HAR-RV + IV_surface,0.4420190479004076,0.44197687707359856,119093,9 | |
| 7 | +5-Day RV,HAR-RV,0.8881115552871761,0.8881102854677605,264345,3 | |
| 8 | +5-Day RV,GARCH_proxy,0.6480986274956818,0.6480959653375,264376,2 | |
| 9 | +5-Day RV,IV_only,0.495379967560757,0.4953631853522369,120280,4 | |
| 10 | +5-Day RV,IV_surface,0.4957706353949066,0.4957452304254927,119093,6 | |
| 11 | +5-Day RV,HAR-RV + IV_surface,0.8961652931746857,0.896157445603148,119093,9 | |
added
_verify/results/rq2_oos_results.csv
+301 −0
@@ -0,0 +1,301 @@ | ||
| 1 | +ticker,model,target,avg_mse,avg_mae,avg_r2_oos,avg_qlike,n_windows | |
| 2 | +AAPL,HAR-RV,1-Day RV,1.820838610866292e-07,0.0002213306899747562,0.04338132821959285,0.33746037308231047,14 | |
| 3 | +AAPL,GARCH_proxy,1-Day RV,1.9137838933094953e-07,0.0002237248992393853,0.02763412805204393,0.34348011473497203,14 | |
| 4 | +AAPL,IV_only,1-Day RV,1.4344480026757476e-07,0.00019447717422126342,0.07047285600090712,46525.12085572757,9 | |
| 5 | +AAPL,IV_surface,1-Day RV,1.4562314942334666e-07,0.00019506572232304533,0.04510826248754876,112302.47643624288,9 | |
| 6 | +AAPL,HAR-RV + IV_surface,1-Day RV,1.3791191066669795e-07,0.00018664036117828678,0.08870983785580074,75479.50388494255,9 | |
| 7 | +ADBE,HAR-RV,1-Day RV,3.9028645490386254e-07,0.000334052612645611,0.04297533011030395,0.3859645232556237,14 | |
| 8 | +ADBE,GARCH_proxy,1-Day RV,4.095169965517809e-07,0.0003467466647712206,0.0003063919590393808,0.3975730445386746,14 | |
| 9 | +ADBE,IV_only,1-Day RV,5.220835762137961e-07,0.000403203880838532,0.028505511561893793,2333.592189925587,4 | |
| 10 | +ADBE,IV_surface,1-Day RV,5.404288134156765e-07,0.0004191907134674548,0.039472754572796226,18463.52975178049,4 | |
| 11 | +ADBE,HAR-RV + IV_surface,1-Day RV,5.108315464974183e-07,0.00040127452958342455,0.08305954111361447,35872.76489000161,4 | |
| 12 | +AMD,HAR-RV,1-Day RV,1.537918008011768e-06,0.0007511295334867978,0.09790104489005873,0.2173401455787804,14 | |
| 13 | +AMD,GARCH_proxy,1-Day RV,1.5680982014621238e-06,0.0007770919062253606,0.039471047929052615,0.2276877958577572,14 | |
| 14 | +AMD,IV_only,1-Day RV,5.97106154084616e-07,0.0005187733605628209,0.0012089614386141811,371998.3655094763,4 | |
| 15 | +AMD,IV_surface,1-Day RV,5.444511745390544e-07,0.0004932022907278475,0.06398588042853234,381099.4560284309,4 | |
| 16 | +AMD,HAR-RV + IV_surface,1-Day RV,5.605817678315924e-07,0.0004783512844438938,0.021442286281761896,127581.56418480266,4 | |
| 17 | +AMZN,HAR-RV,1-Day RV,4.796715775967195e-07,0.00035128233272762276,0.00788533594746353,0.39868187078305145,14 | |
| 18 | +AMZN,GARCH_proxy,1-Day RV,4.660988063784013e-07,0.0003532807493839547,0.022766244658606622,0.4040887063664475,14 | |
| 19 | +AMZN,IV_only,1-Day RV,3.686278694496987e-07,0.00031245781509513964,0.06898791917236634,136012.98734901246,7 | |
| 20 | +AMZN,IV_surface,1-Day RV,3.902587261414626e-07,0.000329310270769632,0.040807476678130415,98352.72704039492,7 | |
| 21 | +AMZN,HAR-RV + IV_surface,1-Day RV,3.6014294875435706e-07,0.00030286428751663715,0.08610633953868663,92349.83791990338,7 | |
| 22 | +BA,HAR-RV,1-Day RV,3.384517867326112e-07,0.0002901759270822965,0.01467367346769259,0.31036640460980774,14 | |
| 23 | +BA,GARCH_proxy,1-Day RV,3.4954814756927497e-07,0.00030932878556593553,-0.15321643075040198,0.34532710754466883,14 | |
| 24 | +BA,IV_only,1-Day RV,3.4395435672539084e-07,0.00035621115783414137,0.15414706515376023,20355.41840541059,6 | |
| 25 | +BA,IV_surface,1-Day RV,3.4080529528835355e-07,0.00035464198835656423,0.16522082458083268,22367.476682657103,6 | |
| 26 | +BA,HAR-RV + IV_surface,1-Day RV,3.686817787917612e-07,0.00034957870668559976,0.14745373094808237,20843.206961514985,6 | |
| 27 | +BAC,HAR-RV,1-Day RV,2.0846021436081818e-07,0.00023371678657195963,0.004388351949147551,0.2532056965493739,14 | |
| 28 | +BAC,GARCH_proxy,1-Day RV,1.8617550787046166e-07,0.00023279783702724615,-0.010313707334885134,0.2400406656318022,14 | |
| 29 | +BAC,IV_only,1-Day RV,1.4814183722110132e-07,0.00020570640716168235,0.23674814898245528,1445.954476192857,7 | |
| 30 | +BAC,IV_surface,1-Day RV,1.5111016973840405e-07,0.00021076247167838065,0.20501768661222539,51139.406563612094,7 | |
| 31 | +BAC,HAR-RV + IV_surface,1-Day RV,1.4564657205458012e-07,0.00020224668564180866,0.24030697046164623,48691.534655435724,7 | |
| 32 | +CAT,HAR-RV,1-Day RV,3.4258450661293393e-07,0.0002790976396535241,-0.2891866415394476,0.34667251791477527,14 | |
| 33 | +CAT,GARCH_proxy,1-Day RV,2.3986792912866716e-07,0.0002578212885043373,-0.07614973791632386,0.3463060961819076,14 | |
| 34 | +CAT,IV_only,1-Day RV,2.4509124426627957e-07,0.0002620387202975887,0.04128611921264582,48289.298974305064,6 | |
| 35 | +CAT,IV_surface,1-Day RV,2.592694161547027e-07,0.00026847651558851196,-0.030155904050576183,54289.71372397832,6 | |
| 36 | +CAT,HAR-RV + IV_surface,1-Day RV,2.583942585763219e-07,0.00026938442536584574,-0.019472410437262982,90574.71605127689,6 | |
| 37 | +COST,HAR-RV,1-Day RV,6.998817892011683e-08,0.00014732789197019865,0.0797201322519849,0.32695946109966073,14 | |
| 38 | +COST,GARCH_proxy,1-Day RV,7.786116278835056e-08,0.00015947837723085805,-0.00861505679100397,0.35414622936865164,14 | |
| 39 | +COST,IV_only,1-Day RV,4.510466852819232e-08,0.00012323805230780619,0.31212228121960234,0.2321026098604381,3 | |
| 40 | +COST,IV_surface,1-Day RV,4.485815224384762e-08,0.00012387261869348845,0.3042277491851632,0.20859174860007987,3 | |
| 41 | +COST,HAR-RV + IV_surface,1-Day RV,3.9710591638082025e-08,0.00012045012387607006,0.3477034913760472,0.20649163645340665,3 | |
| 42 | +CRM,HAR-RV,1-Day RV,3.838703764836172e-07,0.0003531707196871963,0.04513557400707272,0.3022120872619042,14 | |
| 43 | +CRM,GARCH_proxy,1-Day RV,4.055993548224333e-07,0.00036728169920096905,-0.01709858417110776,0.3230349300662949,14 | |
| 44 | +CRM,IV_only,1-Day RV,4.4688714732828427e-07,0.000405906485538477,0.10589306570306234,97966.83912509364,6 | |
| 45 | +CRM,IV_surface,1-Day RV,4.44534646897287e-07,0.00041311775124601473,0.08696366696059803,174687.05595359695,6 | |
| 46 | +CRM,HAR-RV + IV_surface,1-Day RV,4.2135441241828484e-07,0.000383449636199654,0.1366381150235204,121641.09622909594,6 | |
| 47 | +CSCO,HAR-RV,1-Day RV,2.052280835930492e-07,0.0002428631960561622,-0.0021950473689538253,0.33928957783839164,14 | |
| 48 | +CSCO,GARCH_proxy,1-Day RV,2.1177658780376247e-07,0.00025235855811181626,-0.017315024546385425,0.344315801765943,14 | |
| 49 | +CSCO,IV_only,1-Day RV,1.5998267568921744e-07,0.00020979644562862574,0.10666762706818021,69858.62214758746,6 | |
| 50 | +CSCO,IV_surface,1-Day RV,1.5334419541645594e-07,0.00021010502776290461,0.1287147081529725,56657.218984423525,6 | |
| 51 | +CSCO,HAR-RV + IV_surface,1-Day RV,1.539315891890509e-07,0.00021017842436628397,0.12890216042583302,59174.73893019191,6 | |
| 52 | +CVX,HAR-RV,1-Day RV,1.3937369218609524e-07,0.00019303580815779788,-0.02308204207193158,0.2901158317426339,14 | |
| 53 | +CVX,GARCH_proxy,1-Day RV,1.3230240118497777e-07,0.00020241240612375858,-0.13650831460345128,0.3225449284142211,14 | |
| 54 | +CVX,IV_only,1-Day RV,1.0082066915965043e-07,0.0001881662267479361,0.22398365492754885,46464.02544854707,5 | |
| 55 | +CVX,IV_surface,1-Day RV,1.0522068244717341e-07,0.0002019782374504487,0.10596772615917709,42462.20234316886,5 | |
| 56 | +CVX,HAR-RV + IV_surface,1-Day RV,9.79433795604125e-08,0.00019123702336238665,0.12916088222655692,27217.47642852749,5 | |
| 57 | +DIA,HAR-RV,1-Day RV,1.4419335675398693e-08,5.5832203535299526e-05,-0.03475768312743005,0.30215798649277126,14 | |
| 58 | +DIA,GARCH_proxy,1-Day RV,1.1895141805131128e-08,5.5544951060356177e-05,-0.1511504404954589,0.30768127691808467,14 | |
| 59 | +DIA,IV_only,1-Day RV,1.6824214111509705e-08,5.919635243235803e-05,0.09868923641381189,11228.33869215635,8 | |
| 60 | +DIA,IV_surface,1-Day RV,1.5070769254984617e-08,5.9881801369573623e-05,0.06951369726234882,27767.172607879,8 | |
| 61 | +DIA,HAR-RV + IV_surface,1-Day RV,1.494099415712185e-08,5.8858451931486284e-05,0.13908803796155408,23056.934642731954,8 | |
| 62 | +DIS,HAR-RV,1-Day RV,1.9045826313567175e-07,0.0002131938639409255,-0.029512999803938338,0.34504597239300205,14 | |
| 63 | +DIS,GARCH_proxy,1-Day RV,1.8088588093637024e-07,0.00021107655376056183,-0.0218924364708776,0.3347856552499839,14 | |
| 64 | +DIS,IV_only,1-Day RV,1.286840974850831e-07,0.00018030120262423587,0.102230322372163,22449.445169433293,6 | |
| 65 | +DIS,IV_surface,1-Day RV,1.25134578384368e-07,0.00018283779020702835,0.09362512457225748,95104.38265009275,6 | |
| 66 | +DIS,HAR-RV + IV_surface,1-Day RV,1.1835691693820848e-07,0.00017835075925694778,0.09431922170404938,89583.37110292843,6 | |
| 67 | +GLD,HAR-RV,1-Day RV,7.134594849651761e-09,5.168676549624091e-05,0.000686774420593458,0.2201198582275407,14 | |
| 68 | +GLD,GARCH_proxy,1-Day RV,8.119871075799431e-09,5.52922338318641e-05,-0.09810176207811518,0.2448307367330045,14 | |
| 69 | +GLD,IV_only,1-Day RV,7.696978059077632e-09,5.164309019953696e-05,0.12125523054534046,1104.5276360574362,10 | |
| 70 | +GLD,IV_surface,1-Day RV,7.85176123743336e-09,5.224770860149686e-05,0.11096515169546536,2579.326429249388,10 | |
| 71 | +GLD,HAR-RV + IV_surface,1-Day RV,7.878858594214198e-09,5.191581780534791e-05,0.11624547770651275,3490.105173795991,10 | |
| 72 | +GOOG,HAR-RV,1-Day RV,2.1387164631728468e-07,0.00023323210854955372,0.034862145834651914,0.35759248872138766,14 | |
| 73 | +GOOG,GARCH_proxy,1-Day RV,2.1714088328576996e-07,0.0002425054829560453,0.0245782100298913,0.36778350406702404,14 | |
| 74 | +GOOG,IV_only,1-Day RV,2.11819831872378e-07,0.0002453813873403458,0.1556383467078785,32163.64706030875,7 | |
| 75 | +GOOG,IV_surface,1-Day RV,2.0850345573360733e-07,0.0002458348894563184,0.191198528157507,8306.414184498022,7 | |
| 76 | +GOOG,HAR-RV + IV_surface,1-Day RV,1.9666424408077696e-07,0.00023414437947998556,0.22030810167260378,21263.184521685198,7 | |
| 77 | +GS,HAR-RV,1-Day RV,1.1845103959899045e-07,0.00018628111731273014,0.03968745651275117,0.24192609458638561,14 | |
| 78 | +GS,GARCH_proxy,1-Day RV,1.1659658711683101e-07,0.00019653770044855714,-0.039233529823255696,0.25168283664212565,14 | |
| 79 | +GS,IV_only,1-Day RV,9.455563377608979e-08,0.00019987846778391963,0.2656614876698861,7323.788869415973,5 | |
| 80 | +GS,IV_surface,1-Day RV,1.0891315675261387e-07,0.00020472998833252987,0.25341970146262377,3836.3979230199047,5 | |
| 81 | +GS,HAR-RV + IV_surface,1-Day RV,1.0432199724791937e-07,0.0001993932456823386,0.26925952259900543,3836.4266898850183,5 | |
| 82 | +HD,HAR-RV,1-Day RV,1.0541747078309012e-07,0.00016532584593530902,0.006535539095566478,0.3095642524273844,14 | |
| 83 | +HD,GARCH_proxy,1-Day RV,1.0960182610467351e-07,0.00017457610300387313,-0.05076255793150286,0.33006740893353903,14 | |
| 84 | +HD,IV_only,1-Day RV,1.2864396503993657e-07,0.00022398362234533217,0.11147415959739704,20725.581259495597,6 | |
| 85 | +HD,IV_surface,1-Day RV,1.552690419670832e-07,0.0002457921979440682,-0.06712404382397859,26276.514241169993,6 | |
| 86 | +HD,HAR-RV + IV_surface,1-Day RV,1.4257224613374103e-07,0.00023037685423607588,0.024031535188821673,17917.93462989779,6 | |
| 87 | +HON,HAR-RV,1-Day RV,1.4959769502559884e-07,0.0001930132162859047,-0.08430083159973514,0.4662911793044847,14 | |
| 88 | +HON,GARCH_proxy,1-Day RV,1.4434201620739063e-07,0.00019772785646555933,-0.10417532849099498,0.48187053022099385,14 | |
| 89 | +HON,IV_only,1-Day RV,1.1102679576255229e-07,0.000174521128976988,0.07050071244326844,0.3835767625137789,2 | |
| 90 | +HON,IV_surface,1-Day RV,1.1064998773134223e-07,0.00017924574159836534,0.07962854617490467,0.37619594896231423,2 | |
| 91 | +HON,HAR-RV + IV_surface,1-Day RV,1.1611699159744365e-07,0.0001844524927592492,0.03642371506259323,0.3838840729161014,2 | |
| 92 | +INTC,HAR-RV,1-Day RV,4.96142341347655e-07,0.0003428204810161347,-0.01929878733309425,24288.069411020457,14 | |
| 93 | +INTC,GARCH_proxy,1-Day RV,5.228069849140048e-07,0.0003511977949719122,-0.07467441008434947,0.3451375347589706,14 | |
| 94 | +INTC,IV_only,1-Day RV,6.917060674270706e-07,0.0005046638881867871,-0.03828594957366046,49574.41833741307,7 | |
| 95 | +INTC,IV_surface,1-Day RV,7.226287307437893e-07,0.0005259059280322088,-0.049233633272710735,68096.01441053815,7 | |
| 96 | +INTC,HAR-RV + IV_surface,1-Day RV,7.12409809482567e-07,0.0004984979253778045,-0.006382266876380359,43525.3058303453,7 | |
| 97 | +IWM,HAR-RV,1-Day RV,8.41577619057804e-08,0.00013560883210903606,-0.07756461051963215,0.31436063036039824,14 | |
| 98 | +IWM,GARCH_proxy,1-Day RV,7.458033545060633e-08,0.00013736377144206707,-0.09170006410140322,0.33349367180177675,14 | |
| 99 | +IWM,IV_only,1-Day RV,6.150878427214598e-08,0.00011133901441857537,0.20755105955581432,16100.244079225778,10 | |
| 100 | +IWM,IV_surface,1-Day RV,6.12334874587727e-08,0.00011086772132235265,0.1995292923091257,29036.370450237144,10 | |
| 101 | +IWM,HAR-RV + IV_surface,1-Day RV,6.392424010791899e-08,0.00011410537308474675,0.157637891717531,57909.18493960261,10 | |
| 102 | +JPM,HAR-RV,1-Day RV,1.460673169064423e-07,0.0001982372347017853,-0.04500701553868074,0.30086458048836323,14 | |
| 103 | +JPM,GARCH_proxy,1-Day RV,1.5170846138695377e-07,0.00020922176662487114,-0.06767370821679837,0.30820021355760335,14 | |
| 104 | +JPM,IV_only,1-Day RV,1.5641615956550163e-07,0.00019788436195122805,0.1885703586483857,13750.47896765612,7 | |
| 105 | +JPM,IV_surface,1-Day RV,1.5100933319797642e-07,0.00019784264354374474,0.187795346201391,1536.224456824251,7 | |
| 106 | +JPM,HAR-RV + IV_surface,1-Day RV,1.573718573270098e-07,0.0002031884262835932,0.16038360254355538,57035.28471244515,7 | |
| 107 | +KO,HAR-RV,1-Day RV,4.3845917779846e-08,0.0001074739924491253,-0.04620914940595717,0.31272105981876974,14 | |
| 108 | +KO,GARCH_proxy,1-Day RV,4.096270052052129e-08,0.00010938957956782583,-0.06736823781538205,0.3065750297220548,14 | |
| 109 | +KO,IV_only,1-Day RV,4.308199321780887e-08,0.00011626055870540014,0.14472318167997994,2523.542009681356,5 | |
| 110 | +KO,IV_surface,1-Day RV,4.511419429753283e-08,0.00012072268119266152,0.10727665963621043,0.4043496845207423,5 | |
| 111 | +KO,HAR-RV + IV_surface,1-Day RV,4.5152130448512106e-08,0.00011837028250882497,0.12197868982224017,12522.611784881363,5 | |
| 112 | +LLY,HAR-RV,1-Day RV,2.7756775102793796e-07,0.00026960198087381003,-0.029042903922437628,0.4608932236384467,14 | |
| 113 | +LLY,GARCH_proxy,1-Day RV,2.980575709781624e-07,0.00027307637407766774,-0.04941753714817426,0.4853493459780906,14 | |
| 114 | +LLY,IV_only,1-Day RV,0.006660775267994809,0.006486080766264768,-18453.04046899215,19769.86676987401,5 | |
| 115 | +LLY,IV_surface,1-Day RV,0.006353499081859523,0.006516398202450474,-17220.042149447363,20868.174152399522,5 | |
| 116 | +LLY,HAR-RV + IV_surface,1-Day RV,0.005967066961633335,0.006321314446129975,-16172.624273099296,20868.175494898875,5 | |
| 117 | +LMT,HAR-RV,1-Day RV,1.0822208956442964e-07,0.0001679423088867463,-0.06176692860417567,0.4000032994159706,14 | |
| 118 | +LMT,GARCH_proxy,1-Day RV,9.299039095248325e-08,0.0001613717053805515,-0.0551518436538331,0.4006699673308169,14 | |
| 119 | +LMT,IV_only,1-Day RV,8.865045191673294e-08,0.00016738322240700008,0.1743824435412647,13551.90709892795,2 | |
| 120 | +LMT,IV_surface,1-Day RV,9.932604653694495e-08,0.00016788888775978017,0.18805604687553568,61221.93953261501,2 | |
| 121 | +LMT,HAR-RV + IV_surface,1-Day RV,9.81250704303821e-08,0.00016548785448269697,0.19669105396119296,47421.975446375305,2 | |
| 122 | +LOW,HAR-RV,1-Day RV,3.166465944934105e-07,0.0002753711693798239,-0.0336938504825028,0.4311620983034447,14 | |
| 123 | +LOW,GARCH_proxy,1-Day RV,3.211452725436486e-07,0.0002902811073241536,-0.0998875487630028,0.4526516313815344,14 | |
| 124 | +LOW,IV_only,1-Day RV,4.0205787467473475e-07,0.00027509892140567576,0.042754408069376214,810155.5425076933,3 | |
| 125 | +LOW,IV_surface,1-Day RV,4.012372415714857e-07,0.0002798624440896168,0.06359189598884325,810155.6580800116,3 | |
| 126 | +LOW,HAR-RV + IV_surface,1-Day RV,4.0101699611478634e-07,0.00028150105253643844,0.09765927477920693,829520.3292195671,3 | |
| 127 | +MA,HAR-RV,1-Day RV,1.355927299879869e-07,0.00019495247614699122,-0.02263261797409722,0.34187497981366743,14 | |
| 128 | +MA,GARCH_proxy,1-Day RV,1.302504995533665e-07,0.00020137619357697998,-0.030547539280745162,0.3602755882730887,14 | |
| 129 | +MA,IV_only,1-Day RV,1.4825744293019791e-07,0.00019747428416346102,0.04211184720623015,70724.25344315225,4 | |
| 130 | +MA,IV_surface,1-Day RV,1.413800044006711e-07,0.00019447506614756325,0.052380627226578075,96888.40003585926,4 | |
| 131 | +MA,HAR-RV + IV_surface,1-Day RV,1.2431898112384522e-07,0.00019088668037231193,0.00028863533629469584,50990.19715462989,4 | |
| 132 | +MCD,HAR-RV,1-Day RV,5.340997638848089e-08,0.00011754359397211929,-0.049282321368911676,0.35375008148376547,14 | |
| 133 | +MCD,GARCH_proxy,1-Day RV,5.307431393440568e-08,0.00012109642633912197,-0.0596448565383677,0.34660915580872403,14 | |
| 134 | +MCD,IV_only,1-Day RV,5.0822838506836225e-08,0.00012674465063460626,0.058619845086397594,1384.3277597398358,5 | |
| 135 | +MCD,IV_surface,1-Day RV,5.1636957045732735e-08,0.00013231112183047694,-0.11935337485930728,25109.039605593673,5 | |
| 136 | +MCD,HAR-RV + IV_surface,1-Day RV,4.9894076565082216e-08,0.00012644366668331195,-0.12309377835085308,24526.515224463998,5 | |
| 137 | +MRK,HAR-RV,1-Day RV,1.2501923376179956e-07,0.00018677032956567683,-0.07627670568131695,0.34902735005394836,14 | |
| 138 | +MRK,GARCH_proxy,1-Day RV,1.19863457331909e-07,0.00018644946266969923,-0.07744830124133258,0.3427042307632349,14 | |
| 139 | +MRK,IV_only,1-Day RV,1.2065352123390365e-07,0.00021914242687884737,-0.03755351116311915,38115.06750770544,6 | |
| 140 | +MRK,IV_surface,1-Day RV,1.2794236863105162e-07,0.00022363223162061245,-0.12215308524081282,24181.47275702038,6 | |
| 141 | +MRK,HAR-RV + IV_surface,1-Day RV,1.180977495978499e-07,0.00020817162029206773,-0.06387755529108224,42287.67618753774,6 | |
| 142 | +MSFT,HAR-RV,1-Day RV,1.4132786532247266e-07,0.00020846035696246124,0.009199262134636923,0.31169019152433997,14 | |
| 143 | +MSFT,GARCH_proxy,1-Day RV,1.4666868621876002e-07,0.00021430043958874296,-0.015575421506940856,0.3114778881892067,14 | |
| 144 | +MSFT,IV_only,1-Day RV,1.63741692958953e-07,0.0002236807334001212,0.18062824281127898,10299.793857013183,8 | |
| 145 | +MSFT,IV_surface,1-Day RV,1.6678840726668384e-07,0.00022911027066434985,0.172572142684595,41076.21897728862,8 | |
| 146 | +MSFT,HAR-RV + IV_surface,1-Day RV,1.6512158842417078e-07,0.00022588504446784634,0.163555187590203,50039.258601985006,8 | |
| 147 | +NVDA,HAR-RV,1-Day RV,9.495097896936875e-07,0.0005470776715678033,0.0800086050613741,0.3133222178113166,14 | |
| 148 | +NVDA,GARCH_proxy,1-Day RV,1.0030811271843449e-06,0.0005822609393084007,0.019302504949521664,0.33426486484752826,14 | |
| 149 | +NVDA,IV_only,1-Day RV,9.193281144615079e-07,0.0005896936126841679,-0.010643445258591048,19059.13695614064,6 | |
| 150 | +NVDA,IV_surface,1-Day RV,9.238859327136376e-07,0.0005912063723040804,-0.002856724325426182,128997.15241599099,6 | |
| 151 | +NVDA,HAR-RV + IV_surface,1-Day RV,8.210873899816422e-07,0.0005507260377725242,0.10674159885100125,112984.82611891835,6 | |
| 152 | +AAPL,HAR-RV,5-Day RV,7.352626368473692e-07,0.0003564313290833214,0.7900387662546071,0.056281736345006265,14 | |
| 153 | +AAPL,GARCH_proxy,5-Day RV,2.191506499281e-06,0.0007760029263791714,0.322303143580919,0.14739545264478385,14 | |
| 154 | +AAPL,IV_only,5-Day RV,2.9726517914625516e-06,0.0008846392944043785,0.0137214386695811,220369.5076441046,9 | |
| 155 | +AAPL,IV_surface,5-Day RV,2.9889926076159586e-06,0.0009046715521333458,-0.1674841028863448,423047.901216318,9 | |
| 156 | +AAPL,HAR-RV + IV_surface,5-Day RV,6.786810950421798e-07,0.00034382204588564763,0.7859917819890364,31041.99526706563,9 | |
| 157 | +ADBE,HAR-RV,5-Day RV,9.965221246099087e-07,0.00047723556380063016,0.7933280357994195,0.05320466224355665,14 | |
| 158 | +ADBE,GARCH_proxy,5-Day RV,2.9209793039692353e-06,0.0010816235164020026,0.37633952240827323,0.16006698061908683,14 | |
| 159 | +ADBE,IV_only,5-Day RV,6.854816193939477e-06,0.0018253716335380513,0.03171648469602892,0.2558906189454764,4 | |
| 160 | +ADBE,IV_surface,5-Day RV,7.470956202697633e-06,0.0018434461269157404,-0.010984175192181922,0.2578633009352733,4 | |
| 161 | +ADBE,HAR-RV + IV_surface,5-Day RV,1.257247346225968e-06,0.0006112927003489501,0.8223537611944223,0.05171866751265464,4 | |
| 162 | +AMD,HAR-RV,5-Day RV,5.7161088671772834e-06,0.0011404404383289991,0.8268119063620464,0.027221439771585598,14 | |
| 163 | +AMD,GARCH_proxy,5-Day RV,1.8785020174153964e-05,0.0025593090639989915,0.33356336843617024,0.0973504444963841,14 | |
| 164 | +AMD,IV_only,5-Day RV,1.3003657762364741e-05,0.0022546813063475317,-0.08468411839081405,2276481.478737907,4 | |
| 165 | +AMD,IV_surface,5-Day RV,1.2446787280973787e-05,0.002075549668453191,0.06864013003123254,2592651.9743583687,4 | |
| 166 | +AMD,HAR-RV + IV_surface,5-Day RV,2.7552424490037833e-06,0.0007817700650705274,0.8308996021169284,0.05438953050333879,4 | |
| 167 | +AMZN,HAR-RV,5-Day RV,2.1386474733261842e-06,0.0005787548528873836,0.778148504428241,0.06933803651177627,14 | |
| 168 | +AMZN,GARCH_proxy,5-Day RV,5.5181380247156145e-06,0.001282769332299068,0.32010970751890694,0.19942835583075888,14 | |
| 169 | +AMZN,IV_only,5-Day RV,7.482631284389636e-06,0.0016177730974560995,0.09109592397463431,206334.25539451273,7 | |
| 170 | +AMZN,IV_surface,5-Day RV,8.021909155933475e-06,0.0017384434365917687,-0.050896668553036,52930.83085214325,7 | |
| 171 | +AMZN,HAR-RV + IV_surface,5-Day RV,1.4922328079300115e-06,0.0005337621739155679,0.7310547954003166,275489.67197767727,7 | |
| 172 | +BA,HAR-RV,5-Day RV,8.694156161868649e-07,0.0004127408864338957,0.7887075035902813,0.03930286554838724,14 | |
| 173 | +BA,GARCH_proxy,5-Day RV,3.2173123351111613e-06,0.0009482941795367185,-0.011150520157321955,0.1339894265320223,14 | |
| 174 | +BA,IV_only,5-Day RV,7.210471024778659e-06,0.0016984550695910872,0.21117198470772328,44543.12970590831,6 | |
| 175 | +BA,IV_surface,5-Day RV,1.0392407805679308e-05,0.001916164002516549,0.1276194777712747,97327.83336713957,6 | |
| 176 | +BA,HAR-RV + IV_surface,5-Day RV,9.148023855715508e-07,0.0005305190243399624,0.8532167482801558,0.052190225398156015,6 | |
| 177 | +BAC,HAR-RV,5-Day RV,5.517674093489787e-07,0.0003152468299329301,0.7869746442462217,0.026897097734646602,14 | |
| 178 | +BAC,GARCH_proxy,5-Day RV,1.97755836764179e-06,0.0007418424564124993,0.23065198577754506,0.09543233262514576,14 | |
| 179 | +BAC,IV_only,5-Day RV,2.2091165087761146e-06,0.0008785232484337065,0.3225218173817336,9888.739001296519,7 | |
| 180 | +BAC,IV_surface,5-Day RV,2.081563800431387e-06,0.0009026940345946818,0.22727046666483744,287276.49898405955,7 | |
| 181 | +BAC,HAR-RV + IV_surface,5-Day RV,3.250890568360123e-07,0.0003142988684858539,0.8636085728879078,12391.959849590741,7 | |
| 182 | +CAT,HAR-RV,5-Day RV,8.93882045549218e-07,0.00038164775954198767,0.7388418692055926,0.04926763002929456,14 | |
| 183 | +CAT,GARCH_proxy,5-Day RV,2.5955296731705623e-06,0.0008813255744195447,0.1706329843582363,0.16037047412412156,14 | |
| 184 | +CAT,IV_only,5-Day RV,2.836450174054561e-05,0.0012485358159739213,-6.0525799763594526,80018.24010844145,6 | |
| 185 | +CAT,IV_surface,5-Day RV,1.8708014990974077e-05,0.0012579027695625335,-3.332905186776738,89961.31752878259,6 | |
| 186 | +CAT,HAR-RV + IV_surface,5-Day RV,1.8139216425046917e-06,0.0005583430317203295,0.6400231100902217,208744.91535686745,6 | |
| 187 | +COST,HAR-RV,5-Day RV,1.9746021266783987e-07,0.0002108831742773476,0.8033880706616198,0.04180614007858926,14 | |
| 188 | +COST,GARCH_proxy,5-Day RV,6.648199376640112e-07,0.000490356781612754,0.3313456023063182,0.1293341454053712,14 | |
| 189 | +COST,IV_only,5-Day RV,8.832041978229892e-07,0.0005772068902119518,0.361345795062377,0.14327632273117377,3 | |
| 190 | +COST,IV_surface,5-Day RV,8.458790324002409e-07,0.0005652837211161179,0.3766471653782368,0.13507928290945015,3 | |
| 191 | +COST,HAR-RV + IV_surface,5-Day RV,1.0886598793646205e-07,0.00019348806088449568,0.8932107515547747,0.02481155390341813,3 | |
| 192 | +CRM,HAR-RV,5-Day RV,9.891252507561125e-07,0.0005051645513362558,0.8083120888548716,0.03879243954076612,14 | |
| 193 | +CRM,GARCH_proxy,5-Day RV,2.995034557354952e-06,0.0011056056652523566,0.38017466719452536,0.12003509239976859,14 | |
| 194 | +CRM,IV_only,5-Day RV,3.895437520076425e-06,0.0013779045744771944,0.23615347521995259,576703.3106982671,6 | |
| 195 | +CRM,IV_surface,5-Day RV,3.7639683924928893e-06,0.0013898230542158238,0.2513924043600679,707129.3033452727,6 | |
| 196 | +CRM,HAR-RV + IV_surface,5-Day RV,9.785058599661425e-07,0.0005724579517323731,0.7687558917552336,68027.0651965925,6 | |
| 197 | +CSCO,HAR-RV,5-Day RV,5.804121233101254e-07,0.0003508366559034911,0.7755298531474265,0.045188560897467644,14 | |
| 198 | +CSCO,GARCH_proxy,5-Day RV,1.7305695126036043e-06,0.0007812532709563023,0.351583127443191,0.13080738354950677,14 | |
| 199 | +CSCO,IV_only,5-Day RV,2.116819267385079e-06,0.0009236873650458906,0.0650998410647245,358221.0374903252,6 | |
| 200 | +CSCO,IV_surface,5-Day RV,2.171230135098417e-06,0.0009596834958276169,0.09178672370043539,318516.8673852713,6 | |
| 201 | +CSCO,HAR-RV + IV_surface,5-Day RV,3.605326863057771e-07,0.00032168762996141704,0.7944321610443755,0.05514701365710034,6 | |
| 202 | +CVX,HAR-RV,5-Day RV,4.0306004012469235e-07,0.00026714463746531385,0.7905947293720968,0.03739111199575506,14 | |
| 203 | +CVX,GARCH_proxy,5-Day RV,1.3581979225843827e-06,0.0006359512403075414,0.0037191735657860886,0.13864249530844358,14 | |
| 204 | +CVX,IV_only,5-Day RV,1.3155735643838975e-06,0.0007020543937024201,0.3273903463582047,360740.44261346606,5 | |
| 205 | +CVX,IV_surface,5-Day RV,1.3520563917793453e-06,0.0007281797946263774,0.2080571915760238,311531.6938047524,5 | |
| 206 | +CVX,HAR-RV + IV_surface,5-Day RV,3.5682092536459835e-07,0.00027327212855682704,0.7518014856953363,21952.441541708344,5 | |
| 207 | +DIA,HAR-RV,5-Day RV,5.4815925654618645e-08,8.073726599411082e-05,0.8253637793694955,0.03556646442806364,14 | |
| 208 | +DIA,GARCH_proxy,5-Day RV,1.7955217703915119e-07,0.0001838146020174865,0.19065604269167144,0.13522876463901592,14 | |
| 209 | +DIA,IV_only,5-Day RV,6.44308742566095e-07,0.00030123026615214843,0.10016009776823895,681397.1885474472,8 | |
| 210 | +DIA,IV_surface,5-Day RV,6.234930817434078e-07,0.0003056132244935965,-0.09642398784726552,155499.96386893681,8 | |
| 211 | +DIA,HAR-RV + IV_surface,5-Day RV,8.460087428824393e-08,0.00010516298050953806,0.8377034823827366,16701.80736298935,8 | |
| 212 | +DIS,HAR-RV,5-Day RV,4.701631287787773e-07,0.0002969416283096307,0.7794168081504058,0.039056759751171524,14 | |
| 213 | +DIS,GARCH_proxy,5-Day RV,1.4122229635310422e-06,0.0006534035136326283,0.2678663139999959,0.1326544239534634,14 | |
| 214 | +DIS,IV_only,5-Day RV,1.7791424684309163e-06,0.0007653358590641004,0.2649568632168746,137094.87604065597,6 | |
| 215 | +DIS,IV_surface,5-Day RV,1.8523661460842512e-06,0.0008035534714930956,0.21353408453403447,242658.3891827373,6 | |
| 216 | +DIS,HAR-RV + IV_surface,5-Day RV,4.202330092865012e-07,0.00032116233882361554,0.8030797357746272,1718.083916099992,6 | |
| 217 | +GLD,HAR-RV,5-Day RV,2.1450574493092668e-08,7.33993531309103e-05,0.8021986493717597,0.024313730407334234,14 | |
| 218 | +GLD,GARCH_proxy,5-Day RV,8.094211561580827e-08,0.00016953156392039576,0.18932763493331053,0.08851947449441935,14 | |
| 219 | +GLD,IV_only,5-Day RV,1.1721792500449562e-07,0.00019534509958113919,0.2673471347095372,56263.83055438049,10 | |
| 220 | +GLD,IV_surface,5-Day RV,1.1787220954062558e-07,0.0002011308895191654,0.24329800648313143,37228.26682577601,10 | |
| 221 | +GLD,HAR-RV + IV_surface,5-Day RV,2.461804063049052e-08,8.130025646585165e-05,0.8267721276886437,5783.892138511379,10 | |
| 222 | +GOOG,HAR-RV,5-Day RV,6.652788257074674e-07,0.0003595981963384278,0.786858194202835,0.05294556283775225,14 | |
| 223 | +GOOG,GARCH_proxy,5-Day RV,1.8198139696112773e-06,0.0007852635160526028,0.3529278551306884,0.15789691215155668,14 | |
| 224 | +GOOG,IV_only,5-Day RV,2.973550849931065e-06,0.0010450304848481293,0.16294828773048473,1793.404545087964,7 | |
| 225 | +GOOG,IV_surface,5-Day RV,3.009047434210299e-06,0.001080054897840492,0.18200971583688158,22292.761122859953,7 | |
| 226 | +GOOG,HAR-RV + IV_surface,5-Day RV,5.73881049950793e-07,0.0003708630534488664,0.8229349428297835,23695.682352432534,7 | |
| 227 | +GS,HAR-RV,5-Day RV,5.37527834068559e-07,0.0002814940716901893,0.7645236460976138,0.033432591969508985,14 | |
| 228 | +GS,GARCH_proxy,5-Day RV,1.697423523212738e-06,0.0006445294170048625,0.15127076897639086,0.11041790184606935,14 | |
| 229 | +GS,IV_only,5-Day RV,2.323436966130772e-06,0.000892482072391807,0.23620045332112535,17704.180020184,5 | |
| 230 | +GS,IV_surface,5-Day RV,2.0506552141680196e-06,0.0008277144324777299,0.3412965967184088,0.13663030949642313,5 | |
| 231 | +GS,HAR-RV + IV_surface,5-Day RV,4.834214817233577e-07,0.0003698274530683807,0.7238055583823623,15063.088025176348,5 | |
| 232 | +HD,HAR-RV,5-Day RV,3.9083961919710183e-07,0.0002459338415295459,0.7737687141976376,0.043837148125783966,14 | |
| 233 | +HD,GARCH_proxy,5-Day RV,1.2982904451263334e-06,0.0005900850068558137,0.21272145121273528,0.14362552415566912,14 | |
| 234 | +HD,IV_only,5-Day RV,2.4575376742838867e-06,0.0010577553468774732,-0.0059047608104575615,44546.49143167363,6 | |
| 235 | +HD,IV_surface,5-Day RV,3.0102858772228003e-06,0.0011525851309065714,-0.24120993737987836,109743.95698525968,6 | |
| 236 | +HD,HAR-RV + IV_surface,5-Day RV,4.817689767286735e-07,0.000359539100314228,0.7962104789813101,0.0601012938860453,6 | |
| 237 | +HON,HAR-RV,5-Day RV,4.26124602046493e-07,0.00027791097721633327,0.7332229459551198,0.06460452126754306,14 | |
| 238 | +HON,GARCH_proxy,5-Day RV,1.2510610479693706e-06,0.0006287010970507017,0.12099221258832153,0.2035529675256679,14 | |
| 239 | +HON,IV_only,5-Day RV,1.6903367414920526e-06,0.0007037403574007149,0.057531194618750114,0.2709251070216403,2 | |
| 240 | +HON,IV_surface,5-Day RV,1.6391397531641586e-06,0.0007908866682888223,-0.0038016794704906487,0.25863749276175096,2 | |
| 241 | +HON,HAR-RV + IV_surface,5-Day RV,4.878574983852293e-07,0.00029414397081133764,0.746666610368292,0.05141137809338429,2 | |
| 242 | +INTC,HAR-RV,5-Day RV,1.2984675100457858e-06,0.0005193666571668955,0.7730940665414208,0.04248066501512127,14 | |
| 243 | +INTC,GARCH_proxy,5-Day RV,3.863072130157009e-06,0.0010904093157446603,0.2727363476595529,0.13237679013941592,14 | |
| 244 | +INTC,IV_only,5-Day RV,9.43872603860038e-06,0.002200428014950838,-0.09492450023149025,146047.54879924786,7 | |
| 245 | +INTC,IV_surface,5-Day RV,9.962308359704103e-06,0.002299543303516994,-0.09520326603628086,258001.4194027479,7 | |
| 246 | +INTC,HAR-RV + IV_surface,5-Day RV,1.6818777640123825e-06,0.0006879762146118431,0.8273087047030023,58429.80996430493,7 | |
| 247 | +IWM,HAR-RV,5-Day RV,2.0526722988067028e-07,0.00017659488203972319,0.7722282304894674,0.043393235956421604,14 | |
| 248 | +IWM,GARCH_proxy,5-Day RV,7.338339203590719e-07,0.0004362867145657071,0.04332239908178844,0.15176103075049774,14 | |
| 249 | +IWM,IV_only,5-Day RV,1.0706175840975185e-06,0.00048085982831423885,0.31749938519343773,105771.21928506873,10 | |
| 250 | +IWM,IV_surface,5-Day RV,1.0277973853948466e-06,0.00048594188142234184,0.29624678760435863,149677.07540513074,10 | |
| 251 | +IWM,HAR-RV + IV_surface,5-Day RV,2.638604937679359e-07,0.00020504349581577014,0.8037796517785081,33643.15336786203,10 | |
| 252 | +JPM,HAR-RV,5-Day RV,6.435705776301346e-07,0.00030562616951928444,0.7868655427373518,11921.299509583565,14 | |
| 253 | +JPM,GARCH_proxy,5-Day RV,2.0727105950617475e-06,0.000717192213105519,0.07870157395428967,0.17055927945201194,14 | |
| 254 | +JPM,IV_only,5-Day RV,3.7952326145075396e-06,0.0010280355150913806,0.2150904097828641,110231.78157590092,7 | |
| 255 | +JPM,IV_surface,5-Day RV,4.025172707877116e-06,0.0010310532631230415,0.19359769830956178,129992.17162408424,7 | |
| 256 | +JPM,HAR-RV + IV_surface,5-Day RV,9.857401516008432e-07,0.0004038359979097262,0.7905749227431967,169980.78343948355,7 | |
| 257 | +KO,HAR-RV,5-Day RV,1.4613633149405641e-07,0.00015761053890852949,0.7675647758365739,0.07332369031364541,14 | |
| 258 | +KO,GARCH_proxy,5-Day RV,5.001629312061652e-07,0.00036260153375111437,0.1841295022057439,0.14160511144756152,14 | |
| 259 | +KO,IV_only,5-Day RV,8.048970796935207e-07,0.0005218591602740009,0.06505706117567682,80800.1010241088,5 | |
| 260 | +KO,IV_surface,5-Day RV,8.944156650414251e-07,0.000552567187438781,-0.031193527289350476,0.3348685090193367,5 | |
| 261 | +KO,HAR-RV + IV_surface,5-Day RV,2.071284798208762e-07,0.00019396987655871954,0.6874076117386909,48409.458600496655,5 | |
| 262 | +LLY,HAR-RV,5-Day RV,1.2790385703839034e-06,0.00045421568796134425,0.7273709031190819,0.07022249948553463,14 | |
| 263 | +LLY,GARCH_proxy,5-Day RV,3.947455077357539e-06,0.0009882536180285345,0.1396885759409384,0.2045421364661351,14 | |
| 264 | +LLY,IV_only,5-Day RV,0.1595993172670636,0.03184255036241791,-14055.218408351338,137578.48746503002,5 | |
| 265 | +LLY,IV_surface,5-Day RV,0.1567006741014449,0.03242830088328866,-13206.747982235824,145221.7208367806,5 | |
| 266 | +LLY,HAR-RV + IV_surface,5-Day RV,0.07809850236818863,0.02240658617804465,-6581.52998480009,145221.55528035003,5 | |
| 267 | +LMT,HAR-RV,5-Day RV,2.6188220669350835e-07,0.0002344100384163618,0.7755119239183511,0.056419890910285264,14 | |
| 268 | +LMT,GARCH_proxy,5-Day RV,8.30074981125846e-07,0.0005034107500327826,0.2077907903462444,0.1612363263006504,14 | |
| 269 | +LMT,IV_only,5-Day RV,1.1909105137537882e-06,0.0007733798528024262,0.3111306945019626,0.19559490660048695,2 | |
| 270 | +LMT,IV_surface,5-Day RV,1.3406629533244893e-06,0.0007531527625302948,0.33444486383229816,36543.31044376663,2 | |
| 271 | +LMT,HAR-RV + IV_surface,5-Day RV,3.721441499521546e-07,0.0003112724627440945,0.8176316132294219,0.054760990277678986,2 | |
| 272 | +LOW,HAR-RV,5-Day RV,1.6175012702558306e-06,0.00045820161723751537,0.7438068447738484,0.07291442196019385,14 | |
| 273 | +LOW,GARCH_proxy,5-Day RV,4.937381256122117e-06,0.001054812473128872,0.06343500134506494,0.2270777289124491,14 | |
| 274 | +LOW,IV_only,5-Day RV,1.3722460830014233e-05,0.0016881782033060886,-0.03479932037647434,3414702.4339133594,3 | |
| 275 | +LOW,IV_surface,5-Day RV,1.1811053076210262e-05,0.0017269694991037781,0.031070660532576455,1220750.1888956977,3 | |
| 276 | +LOW,HAR-RV + IV_surface,5-Day RV,3.3636803284528237e-06,0.000654915465495951,0.819333563965305,0.059609987283065824,3 | |
| 277 | +MA,HAR-RV,5-Day RV,5.254138821945239e-07,0.0002927037575008739,0.7775281066169161,0.049575943111711054,14 | |
| 278 | +MA,GARCH_proxy,5-Day RV,1.7210693007836422e-06,0.0006869148441160237,0.1563400706325635,0.1581242574366093,14 | |
| 279 | +MA,IV_only,5-Day RV,2.613743499950327e-06,0.000798896473331624,0.36471427651913385,293782.35389877285,4 | |
| 280 | +MA,IV_surface,5-Day RV,2.644335223541565e-06,0.000815780640866003,0.33494584927621396,474060.3778988852,4 | |
| 281 | +MA,HAR-RV + IV_surface,5-Day RV,6.53686047570655e-07,0.0003075215382943301,0.8397256416669238,6146.247946147566,4 | |
| 282 | +MCD,HAR-RV,5-Day RV,2.870037671493787e-07,0.00019274100007430698,0.7629636059650683,0.05191726245140487,14 | |
| 283 | +MCD,GARCH_proxy,5-Day RV,9.201484126225755e-07,0.00043797106717262727,0.20217235573492554,0.15876709097474342,14 | |
| 284 | +MCD,IV_only,5-Day RV,1.9916100158128574e-06,0.0006904291580859775,-0.6331170344829784,31368.677081914902,5 | |
| 285 | +MCD,IV_surface,5-Day RV,1.9443629629575865e-06,0.000696610846117194,-1.1547191264211718,57062.824030950454,5 | |
| 286 | +MCD,HAR-RV + IV_surface,5-Day RV,3.351348811132137e-07,0.0002288844275686028,0.6101250006838551,14632.308782504813,5 | |
| 287 | +MRK,HAR-RV,5-Day RV,4.3945120433113134e-07,0.000282364775350239,0.7425902640649039,0.042192070298999775,14 | |
| 288 | +MRK,GARCH_proxy,5-Day RV,1.3140974668919862e-06,0.0006123220936928956,0.1388933522979153,0.1362848979741486,14 | |
| 289 | +MRK,IV_only,5-Day RV,2.1117804293897786e-06,0.0009234962846928901,-0.08500173819119267,235250.52718629665,6 | |
| 290 | +MRK,IV_surface,5-Day RV,2.478640271226872e-06,0.000972845723007148,-0.5114198820686465,59366.277461397105,6 | |
| 291 | +MRK,HAR-RV + IV_surface,5-Day RV,4.48004673959951e-07,0.000324809593178164,0.768291967172653,45254.6829713934,6 | |
| 292 | +MSFT,HAR-RV,5-Day RV,4.249237014598957e-07,0.00030474786834290053,0.7916253074404861,0.043015151394330604,14 | |
| 293 | +MSFT,GARCH_proxy,5-Day RV,1.2796514986318383e-06,0.0006681866389437705,0.26472012146109575,0.12453346124134308,14 | |
| 294 | +MSFT,IV_only,5-Day RV,1.8211337578797021e-06,0.000858183585870027,0.28447085486398277,1585.8844445077311,8 | |
| 295 | +MSFT,IV_surface,5-Day RV,1.8759395488036975e-06,0.0009006994341787058,0.24735208101832645,0.21156961264507199,8 | |
| 296 | +MSFT,HAR-RV + IV_surface,5-Day RV,4.962412557760098e-07,0.0003513193425391956,0.7505468226094891,37859.32694451409,8 | |
| 297 | +NVDA,HAR-RV,5-Day RV,2.5434838856007663e-06,0.000782448794765708,0.8090715031993199,0.04070421723074847,14 | |
| 298 | +NVDA,GARCH_proxy,5-Day RV,8.239755158319784e-06,0.001821382891425607,0.3299415748181421,0.13587518552748415,14 | |
| 299 | +NVDA,IV_only,5-Day RV,1.5405809041755867e-05,0.002632543132311821,-0.44484636129728655,8861.379699332558,6 | |
| 300 | +NVDA,IV_surface,5-Day RV,1.4570855048055494e-05,0.0025336913786701853,-0.29475399603646635,180094.53474446616,6 | |
| 301 | +NVDA,HAR-RV + IV_surface,5-Day RV,2.115124005310177e-06,0.0007937287981989242,0.8495957804910274,0.03545141938295826,6 | |
added
_verify/results/rq3_crisis_analysis.csv
+10 −0
@@ -0,0 +1,10 @@ | ||
| 1 | +crisis,pre_impl_corr,pre_real_corr,pre_divergence,post_impl_corr,post_real_corr,post_divergence,divergence_change,pre_vix,post_vix | |
| 2 | +Flash Crash (2010-05-06),0.22274111823476653,,,0.40397480335090574,,,,17.73,28.119999999999997 | |
| 3 | +Euro Crisis (2011-08-05),0.31293397535822115,,,0.46846842965311036,,,,20.291999999999998,40.282000000000004 | |
| 4 | +China Deval (2015-08-24),0.23087948366373237,,,0.4890957081112426,,,,14.306000000000001,30.64375 | |
| 5 | +Volmageddon (2018-02-05),0.1083633365548244,0.2567523415953064,-0.148389005040482,0.4358218572107293,0.637937595963062,-0.20211573875233266,-0.05372673371185066,11.880526315789474,28.423750000000002 | |
| 6 | +COVID Crash (2020-03-16),0.4727631016226523,0.6110824551214713,-0.13831935349881896,0.6477989549594869,0.7878468351540882,-0.14004788019460124,-0.0017285266957822731,36.54263157894737,70.0375 | |
| 7 | +Meme Stocks (2021-01-27),0.22745918696370868,0.15975554962271596,0.06770363734099269,0.32597068609412533,0.348543166049957,-0.022572479955831656,-0.09027611729682435,23.154,27.7325 | |
| 8 | +Rate Shock (2022-06-13),0.4167670557527853,0.5528973786248663,-0.136130322872081,0.4471984750633315,0.61018100703949,-0.16298253197615856,-0.026852209104077568,26.90052631578947,31.364285714285717 | |
| 9 | +SVB Crisis (2023-03-10),0.32789031448814016,0.32730777484729134,0.000582539640848871,0.37294088094818356,0.370926888173291,0.0020139927748925126,0.0014314531340436417,20.32095238095238,24.948333333333334 | |
| 10 | +Aug VIX Spike (2024-08-05),0.1381696258025622,0.09255988497489984,0.04560974082766236,0.3160409800406513,0.2599876813373995,0.056053298703251805,0.010443557875589447,15.574999999999998,24.16375 | |
added
_verify/results/rq3_stress_prediction.csv
+22 −0
@@ -0,0 +1,22 @@ | ||
| 1 | +horizon,variable,coefficient,t_stat,significant | |
| 2 | +5d,const,0.35639581657280767,42.153869884264445,True | |
| 3 | +5d,corr_divergence,0.004908223399681062,2.0159560633699026e-08,False | |
| 4 | +5d,corr_ratio,0.06035655562155624,4.070756876354409,True | |
| 5 | +5d,implied_corr,0.05217631820038219,2.1536246715529316e-07,False | |
| 6 | +5d,realized_corr,0.03171409434806082,8.359120683517641e-08,False | |
| 7 | +5d,spx_iv_atm,-0.13133409436416257,-2.2299955930854307,True | |
| 8 | +5d,vix_close,0.2779692995961027,5.270712827203933,True | |
| 9 | +10d,const,0.49294639258363493,53.36597415904336,True | |
| 10 | +10d,corr_divergence,-0.019748186701119025,-2.9733188399029058e-08,False | |
| 11 | +10d,corr_ratio,0.1036663101102914,8.218813932692742,True | |
| 12 | +10d,implied_corr,0.024992479187586507,4.35303042903076e-08,False | |
| 13 | +10d,realized_corr,0.03170980489219231,4.109504097880124e-08,False | |
| 14 | +10d,spx_iv_atm,-0.23265706461827107,-4.066182728131818,True | |
| 15 | +10d,vix_close,0.3521955352125294,6.686486816330278,True | |
| 16 | +20d,const,0.6928369081343593,78.08179646066122,True | |
| 17 | +20d,corr_divergence,0.005557692583213421,5.661575762660134e-09,False | |
| 18 | +20d,corr_ratio,0.04382202623839856,3.7287596515579384,True | |
| 19 | +20d,implied_corr,0.013266439474072255,1.5689381633563996e-08,False | |
| 20 | +20d,realized_corr,0.004849095978245246,3.568932314952937e-09,False | |
| 21 | +20d,spx_iv_atm,-0.3619018814049132,-7.298945452616384,True | |
| 22 | +20d,vix_close,0.4487314357401727,9.555520074781148,True | |
added
_verify/results/rq4_price_magnet.csv
+6 −0
@@ -0,0 +1,6 @@ | ||
| 1 | +oi_conc_quintile,pct_moved_toward,avg_dist_open,avg_dist_close,n_obs | |
| 2 | +Q1_Low,0.4728,0.0407,0.0424,2096 | |
| 3 | +Q2,0.4804,0.0398,0.0416,2096 | |
| 4 | +Q3,0.458,0.0413,0.0434,2096 | |
| 5 | +Q4,0.4614,0.0372,0.0387,2096 | |
| 6 | +Q5_High,0.4781,0.0333,0.0341,2096 | |
added
_verify/results/subperiod_results.csv
+37 −0
@@ -0,0 +1,37 @@ | ||
| 1 | +label,n_obs,r2,adj_r2,n_significant,subperiod,horizon,model | |
| 2 | +Pre-GFC Recovery (2010-2012)|1D,8565,0.004552905202339419,0.0033891840253489347,2,Pre-GFC Recovery (2010-2012),1D, | |
| 3 | +Pre-GFC Recovery (2010-2012)|5D,8565,0.030907361593650817,0.02977444992845757,7,Pre-GFC Recovery (2010-2012),5D, | |
| 4 | +Bull Market (2013-2016)|1D,25950,0.0045850351632718,0.004201282911898585,3,Bull Market (2013-2016),1D, | |
| 5 | +Bull Market (2013-2016)|5D,25950,0.07544053819778151,0.0750841021509785,10,Bull Market (2013-2016),5D, | |
| 6 | +Low Vol Era (2017-2018)|1D,16271,0.0015128231993405405,0.0008987474448506338,0,Low Vol Era (2017-2018),1D, | |
| 7 | +Low Vol Era (2017-2018)|5D,16271,0.13619124336696764,0.13565999566916143,9,Low Vol Era (2017-2018),5D, | |
| 8 | +Pre-COVID (2019)|1D,8374,0.003227085308238342,0.0020352009190337528,0,Pre-COVID (2019),1D, | |
| 9 | +Pre-COVID (2019)|5D,8374,0.07974443561365019,0.07864404632226385,6,Pre-COVID (2019),5D, | |
| 10 | +COVID Period (2020)|1D,8892,0.01785829262057248,0.016752401721597754,5,COVID Period (2020),1D, | |
| 11 | +COVID Period (2020)|5D,8892,0.14443680510427104,0.14347344152483654,9,COVID Period (2020),5D, | |
| 12 | +Post-COVID Bull (2021)|1D,9734,0.007536697510129753,0.006515959772302016,3,Post-COVID Bull (2021),1D, | |
| 13 | +Post-COVID Bull (2021)|5D,9734,0.035705411752916194,0.0347136452320409,8,Post-COVID Bull (2021),5D, | |
| 14 | +Rate Hiking (2022)|1D,10068,0.010037764943731542,0.009053413511837083,7,Rate Hiking (2022),1D, | |
| 15 | +Rate Hiking (2022)|5D,10068,0.0842917499691005,0.08338123167335532,10,Rate Hiking (2022),5D, | |
| 16 | +Recovery (2023-2024)|1D,20396,0.005715442722233122,0.005227689689474846,4,Recovery (2023-2024),1D, | |
| 17 | +Recovery (2023-2024)|5D,20396,0.051809404910611034,0.051344263583611105,8,Recovery (2023-2024),5D, | |
| 18 | +Recent (2025)|1D,10831,0.007011355136322672,0.006093620714082704,5,Recent (2025),1D, | |
| 19 | +Recent (2025)|5D,10831,0.03748861736517284,0.03659905046809819,7,Recent (2025),5D, | |
| 20 | +Pre-GFC Recovery (2010-2012)|HAR-RV,46284,0.3437582713844408,0.34371573194654437,3,Pre-GFC Recovery (2010-2012),,HAR-RV | |
| 21 | +Pre-GFC Recovery (2010-2012)|HAR+IV,8566,0.39209536492927854,0.39152703057371396,5,Pre-GFC Recovery (2010-2012),,HAR+IV | |
| 22 | +Bull Market (2013-2016)|HAR-RV,64469,0.3416382129845429,0.34160757488074944,3,Bull Market (2013-2016),,HAR-RV | |
| 23 | +Bull Market (2013-2016)|HAR+IV,25950,0.33604997367760214,0.3358452167210245,5,Bull Market (2013-2016),,HAR+IV | |
| 24 | +Low Vol Era (2017-2018)|HAR-RV,33220,0.3094019493581207,0.3093395759792694,3,Low Vol Era (2017-2018),,HAR-RV | |
| 25 | +Low Vol Era (2017-2018)|HAR+IV,16273,0.4191842780751921,0.41889858416376824,6,Low Vol Era (2017-2018),,HAR+IV | |
| 26 | +Pre-COVID (2019)|HAR-RV,16882,0.2795077235062906,0.279379658757536,3,Pre-COVID (2019),,HAR-RV | |
| 27 | +Pre-COVID (2019)|HAR+IV,8376,0.3632548270691244,0.3626460113187423,4,Pre-COVID (2019),,HAR+IV | |
| 28 | +COVID Period (2020)|HAR-RV,17125,0.6038433566127657,0.6037739406948777,3,COVID Period (2020),,HAR-RV | |
| 29 | +COVID Period (2020)|HAR+IV,8892,0.7209268159687201,0.7206754835953946,8,COVID Period (2020),,HAR+IV | |
| 30 | +Post-COVID Bull (2021)|HAR-RV,17254,0.37617226183833463,0.3760637700577847,3,Post-COVID Bull (2021),,HAR-RV | |
| 31 | +Post-COVID Bull (2021)|HAR+IV,9737,0.4396241154785341,0.4391632800471842,5,Post-COVID Bull (2021),,HAR+IV | |
| 32 | +Rate Hiking (2022)|HAR-RV,17229,0.3865626087872044,0.3864557691835099,3,Rate Hiking (2022),,HAR-RV | |
| 33 | +Rate Hiking (2022)|HAR+IV,10070,0.4708060118276648,0.47038522344625355,6,Rate Hiking (2022),,HAR+IV | |
| 34 | +Recovery (2023-2024)|HAR-RV,34632,0.29036963810700855,0.2903081592146186,3,Recovery (2023-2024),,HAR-RV | |
| 35 | +Recovery (2023-2024)|HAR+IV,20398,0.3901717390276379,0.38993246166789597,7,Recovery (2023-2024),,HAR+IV | |
| 36 | +Recent (2025)|HAR-RV,17250,0.3208273099604191,0.3207091655750475,3,Recent (2025),,HAR-RV | |
| 37 | +Recent (2025)|HAR+IV,10831,0.4019013811251535,0.40145924575729186,5,Recent (2025),,HAR+IV | |
added
_verify/results/transaction_cost_analysis.csv
+8 −0
@@ -0,0 +1,8 @@ | ||
| 1 | +tc_bps,net_daily_bps,net_ann_ret_pct,net_sharpe | |
| 2 | +0,-19.064391466831974,-9.913483562752628,-0.52712918488719 | |
| 3 | +5,-21.064391466831974,-10.953483562752627,-0.5824290548887353 | |
| 4 | +10,-23.064391466831978,-11.993483562752628,-0.6377289248902807 | |
| 5 | +15,-25.064391466831978,-13.033483562752629,-0.6930287948918262 | |
| 6 | +20,-27.064391466831974,-14.073483562752626,-0.7483286648933715 | |
| 7 | +30,-31.064391466831974,-16.153483562752626,-0.8589284048964624 | |
| 8 | +50,-39.06439146683198,-20.31348356275263,-1.080127884902644 | |
added
_verify/results/var_results.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +ticker,r2_iv_eq,r2_rv_eq,n_obs | |
| 2 | +AAPL,0.9196697728623443,0.35191523639253475,3791 | |
| 3 | +ADBE,0.9199919322527133,0.2796434984309628,3376 | |
| 4 | +AMD,0.8993426594070298,0.32790010831716765,3121 | |
| 5 | +AMZN,0.9266448716789508,0.29023317507392565,3773 | |
| 6 | +BA,0.9752839777543116,0.5379390149229806,3702 | |
| 7 | +BAC,0.9439422732095171,0.5419728354375741,3589 | |
| 8 | +CAT,0.9322674755937141,0.3391903996354383,3693 | |
| 9 | +COST,0.9236283123223755,0.3303127801972262,3548 | |
| 10 | +CRM,0.9275025960540634,0.341386776524949,3714 | |
| 11 | +CSCO,0.9188095514942977,0.3446222492742932,3565 | |
| 12 | +CVX,0.95744357083379,0.5152052411228472,3494 | |
| 13 | +DIA,0.9363978123307808,0.6159261384057868,3831 | |
| 14 | +DIS,0.945656936116281,0.41559322669554644,3685 | |
| 15 | +GLD,0.9500296482231443,0.40124370857044056,3867 | |
| 16 | +GOOG,0.9298779671849265,0.28195713606770234,3792 | |
| 17 | +GS,0.9371875423392613,0.487147325272134,3737 | |
| 18 | +HD,0.9297070407254776,0.387656965645227,3629 | |
| 19 | +HON,0.935625284277047,0.3623313109259485,3071 | |
| 20 | +INTC,0.966863691181009,0.34895373467106183,3609 | |
| 21 | +IWM,0.950535736607303,0.45305306825768055,3872 | |
added
data/processed/correlation_divergence.parquet
+0 −0
Binary file not shown.
added
data/processed/merged_options_rv.parquet
+0 −0
Binary file not shown.
added
data/processed/options_features.parquet
+0 −0
Binary file not shown.
added
data/processed/price_magnet_data.parquet
+0 −0
Binary file not shown.
added
data/processed/realized_vol.parquet
+0 −0
Binary file not shown.
added
data/raw/README.md
+34 −0
@@ -0,0 +1,34 @@ | ||
| 1 | +<!-- | |
| 2 | +Author: Simon-Pierre Boucher | |
| 3 | +Contact: contact@spboucher.ai | |
| 4 | +--> | |
| 5 | + | |
| 6 | +# Raw data (external — not shipped) | |
| 7 | + | |
| 8 | +The extraction step (`scripts/01_extract_data.py`) and a few raw-dependent | |
| 9 | +analysis sections read four DuckDB stores that are **too large to live in | |
| 10 | +this repository** (~3.83 billion option records and ~11.5 billion intraday | |
| 11 | +OHLCV bars): | |
| 12 | + | |
| 13 | +| File | Contents | | |
| 14 | +|---|---| | |
| 15 | +| `options.duckdb` | End-of-day option chains (`option_chain` table): 11,077 underlyings, 2010–2025, quotes, IVs, Greeks, volume, OI | | |
| 16 | +| `stock_5min.duckdb` | 5-minute OHLCV bars, US equities (`ohlcv` table) | | |
| 17 | +| `etf_5min.duckdb` | 5-minute OHLCV bars, ETFs (`ohlcv` table) | | |
| 18 | +| `index_5min.duckdb` | 5-minute OHLCV bars, indices incl. SPX/VIX (`ohlcv` table) | | |
| 19 | + | |
| 20 | +Place them in this directory — or point the `WP7_RAW_DATA_DIR` environment | |
| 21 | +variable at the directory that contains them: | |
| 22 | + | |
| 23 | +```bash | |
| 24 | +export WP7_RAW_DATA_DIR=/path/to/duckdb/stores | |
| 25 | +``` | |
| 26 | + | |
| 27 | +**Without the raw stores** the pipeline still reproduces every analysis that | |
| 28 | +feeds the paper's tables from the derived datasets in `data/processed/` | |
| 29 | +(shipped with the repository). Raw-dependent steps detect the missing stores | |
| 30 | +and skip themselves with an explanatory message. See `AUDIT.md` §6.1 for the | |
| 31 | +exact reproducibility map. | |
| 32 | + | |
| 33 | +> ⚠️ As of 2026-08-05 the original stores no longer exist on the author's | |
| 34 | +> machine; `data/processed/` is the authoritative surviving copy of the data. | |
added
figures/fig_irf.pdf
+0 −0
Binary file not shown.
added
figures/fig_irf.png
+0 −0
Binary file not shown.
added
figures/fig_portfolio_sorts.pdf
+0 −0
Binary file not shown.
added
figures/fig_portfolio_sorts.png
+0 −0
Binary file not shown.
added
figures/fig_rolling_r2.pdf
+0 −0
Binary file not shown.
added
figures/fig_rolling_r2.png
+0 −0
Binary file not shown.
added
figures/fig_subperiod.pdf
+0 −0
Binary file not shown.
added
figures/fig_subperiod.png
+0 −0
Binary file not shown.
added
paper/.latexmkrc
+3 −0
@@ -0,0 +1,3 @@ | ||
| 1 | +$pdf_mode = 1; | |
| 2 | +$bibtex_use = 2; | |
| 3 | +$pdflatex = "pdflatex -interaction=nonstopmode -halt-on-error %O %S"; | |
added
paper/Makefile
+19 −0
@@ -0,0 +1,19 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +TEX = main | |
| 6 | +PDF = $(TEX).pdf | |
| 7 | + | |
| 8 | +.PHONY: all clean distclean | |
| 9 | + | |
| 10 | +all: $(PDF) | |
| 11 | + | |
| 12 | +$(PDF): $(TEX).tex preamble.tex references.bib sections/*.tex appendix/*.tex | |
| 13 | + latexmk $(TEX).tex | |
| 14 | + | |
| 15 | +clean: | |
| 16 | + latexmk -c $(TEX).tex | |
| 17 | + | |
| 18 | +distclean: | |
| 19 | + latexmk -C $(TEX).tex | |
added
paper/appendix/appendix.tex
+100 −0
@@ -0,0 +1,100 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% Appendix | |
| 6 | +% ============================================================================= | |
| 7 | + | |
| 8 | +\section{Implied Correlation Around Crises}\label{app:crises} | |
| 9 | + | |
| 10 | +Table~\ref{tab:app_crises} details the behavior of the implied-correlation index around the nine major market events of the sample period. Implied correlation rises after every event, with the largest jumps around Volmageddon ($+0.328$) and the August 2015 China devaluation ($+0.258$). | |
| 11 | + | |
| 12 | +\begin{table}[H] | |
| 13 | +\centering | |
| 14 | +\caption{Implied correlation around major market events.} | |
| 15 | +\label{tab:app_crises} | |
| 16 | +\begin{threeparttable} | |
| 17 | +\small | |
| 18 | +\begin{tabular}{@{}ld{1.3}d{1.3}d{1.3}@{}} | |
| 19 | +\toprule | |
| 20 | +Crisis & \multicolumn{1}{c}{Pre IC} & \multicolumn{1}{c}{Post IC} & \multicolumn{1}{c}{$\Delta$IC} \\ | |
| 21 | +\midrule | |
| 22 | +Flash Crash (May 2010) & 0.223 & 0.404 & +0.181 \\ | |
| 23 | +Euro Crisis (Aug 2011) & 0.313 & 0.469 & +0.156 \\ | |
| 24 | +China Deval.\ (Aug 2015) & 0.231 & 0.489 & +0.258 \\ | |
| 25 | +Volmageddon (Feb 2018) & 0.108 & 0.436 & +0.328 \\ | |
| 26 | +COVID-19 (Mar 2020) & 0.473 & 0.648 & +0.175 \\ | |
| 27 | +Meme Stocks (Jan 2021) & 0.228 & 0.326 & +0.098 \\ | |
| 28 | +Rate Shock (Jun 2022) & 0.417 & 0.447 & +0.030 \\ | |
| 29 | +SVB Crisis (Mar 2023) & 0.328 & 0.373 & +0.045 \\ | |
| 30 | +VIX Spike (Aug 2024) & 0.138 & 0.316 & +0.178 \\ | |
| 31 | +\bottomrule | |
| 32 | +\end{tabular} | |
| 33 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 34 | +\item \textit{Notes.} IC = Implied Correlation. Pre = 30-day window before the event; Post = 10-day window after. | |
| 35 | +\end{tablenotes} | |
| 36 | +\end{threeparttable} | |
| 37 | +\end{table} | |
| 38 | + | |
| 39 | + | |
| 40 | +\section{SPX Options Surface Features (RQ5)}\label{app:features} | |
| 41 | + | |
| 42 | +The 21 SPX surface features used in Section~\ref{sec:results} are: $IV_{ATM}$ at six tenors (1w, 2w, 1m, 2m, 3m, 6m); 25$\delta$ skew (1m, 3m); 10$\delta$ deep OTM skew (1m); butterfly ratio (1m); term-structure slopes (3m$-$1m, 6m$-$1m); total gamma\,$\times$\,OI; net gamma; total vega\,$\times$\,OI; average $\Theta$; put-call volume ratio; put-call OI ratio; total option volume; total OI; and the average bid-ask spread percentage. | |
| 43 | + | |
| 44 | +\section{Random Forest Feature Importance (RQ5)}\label{app:importance} | |
| 45 | + | |
| 46 | +Table~\ref{tab:app_importance} reports the full Random Forest importance ranking underlying the RQ5 discussion; the two shortest ATM tenors jointly account for two thirds of total importance. | |
| 47 | + | |
| 48 | +\begin{table}[H] | |
| 49 | +\centering | |
| 50 | +\caption{Random Forest feature importance (1-day RV target, 2010--2019 training).} | |
| 51 | +\label{tab:app_importance} | |
| 52 | +\begin{threeparttable} | |
| 53 | +\begin{tabular}{@{}lr@{}} | |
| 54 | +\toprule | |
| 55 | +Feature & Importance \\ | |
| 56 | +\midrule | |
| 57 | +$IV_{ATM,2w}$ & 0.508 \\ | |
| 58 | +$IV_{ATM,1w}$ & 0.151 \\ | |
| 59 | +Total option volume & 0.083 \\ | |
| 60 | +PC vol.\ ratio & 0.067 \\ | |
| 61 | +Net gamma exposure & 0.037 \\ | |
| 62 | +$IV_{ATM,1m}$ & 0.023 \\ | |
| 63 | +$RV_{weekly}$ & 0.022 \\ | |
| 64 | +Skew (25$\delta$, 3m)& 0.013 \\ | |
| 65 | +Avg.\ $\Theta$ & 0.012 \\ | |
| 66 | +$IV_{ATM,2m}$ & 0.011 \\ | |
| 67 | +\midrule | |
| 68 | +\textit{All others (14 features)} & \textit{0.073} \\ | |
| 69 | +\bottomrule | |
| 70 | +\end{tabular} | |
| 71 | +\end{threeparttable} | |
| 72 | +\end{table} | |
| 73 | + | |
| 74 | + | |
| 75 | +\section{Forecast Error Variance Decomposition}\label{app:fevd} | |
| 76 | + | |
| 77 | +Table~\ref{tab:app_fevd} reports the full horizon profile of the forecast error variance decomposition summarized in Section~\ref{sec:results}: the share of realized-variance forecast error variance attributable to implied-volatility shocks rises monotonically from zero on impact to 73.8\% at 20 days. | |
| 78 | + | |
| 79 | +\begin{table}[H] | |
| 80 | +\centering | |
| 81 | +\caption{FEVD: share of RV forecast error variance explained by IV shocks (\%).} | |
| 82 | +\label{tab:app_fevd} | |
| 83 | +\begin{threeparttable} | |
| 84 | +\begin{tabular}{@{}rcc@{}} | |
| 85 | +\toprule | |
| 86 | +Horizon (days) & IV shocks (\%) & RV shocks (\%) \\ | |
| 87 | +\midrule | |
| 88 | + 1 & 0.0 & 100.0 \\ | |
| 89 | + 2 & 28.0 & 72.0 \\ | |
| 90 | + 5 & 56.1 & 43.9 \\ | |
| 91 | +10 & 66.4 & 33.6 \\ | |
| 92 | +15 & 71.1 & 28.9 \\ | |
| 93 | +20 & 73.8 & 26.2 \\ | |
| 94 | +\bottomrule | |
| 95 | +\end{tabular} | |
| 96 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 97 | +\item \textit{Notes.} From the bivariate VAR(5) in standardized ATM IV and RV, averaged across 20 tickers. | |
| 98 | +\end{tablenotes} | |
| 99 | +\end{threeparttable} | |
| 100 | +\end{table} | |
added
paper/main.pdf
+0 −0
Binary file not shown.
added
paper/main.tex
+82 −0
@@ -0,0 +1,82 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% UQO Working Paper No. 7 | |
| 6 | +% The Options-Implied Information Content for Cross-Asset Return | |
| 7 | +% and Volatility Prediction: Evidence from 3.8 Billion Option Contracts | |
| 8 | +% | |
| 9 | +% Build: latexmk (see Makefile) — pdflatex + bibtex, references in | |
| 10 | +% references.bib, one file per section under sections/. | |
| 11 | +% ============================================================================= | |
| 12 | +\documentclass[12pt,letterpaper]{article} | |
| 13 | + | |
| 14 | +\input{preamble} | |
| 15 | + | |
| 16 | +% ============================================================================ | |
| 17 | +% METADATA | |
| 18 | +% ============================================================================ | |
| 19 | +\newcommand{\WPnumber}{7} | |
| 20 | +\newcommand{\WPtitle}{The Options-Implied Information Content for Cross-Asset Return and Volatility Prediction: Evidence from 3.8~Billion Option Contracts} | |
| 21 | +\newcommand{\WPsubtitle}{} | |
| 22 | +\newcommand{\WPdate}{May 2026} | |
| 23 | +\newcommand{\WPversion}{1.1} | |
| 24 | +\newcommand{\WPabstract}{% | |
| 25 | +This paper investigates the information content embedded in equity option markets for predicting returns and realized volatility across multiple asset classes and market regimes. Using 3.83~billion option contracts on 11,077 underlyings (2010--2025) merged with 11.5~billion intraday OHLCV observations across stocks, ETFs, indices, futures, FX, and cryptocurrencies, I address five research questions. | |
| 26 | +Option-implied moments---particularly implied kurtosis, skewness, and put-call ratios---significantly predict 5-day stock returns; quintile long-short portfolios sorted on implied kurtosis deliver annualized Sharpe ratios of~2.33 ($t = 19.84$). | |
| 27 | +Augmenting the HAR-RV model with implied volatility surface features improves 1-day realized variance forecasting by 23.3\% in~$R^2$ (0.359 to 0.442), an improvement robust across all subperiods including COVID-19 ($+19.4\%$). | |
| 28 | +The ratio of implied to realized correlation among S\&P~500 constituents predicts market stress at 5, 10, and 20-day horizons ($t$-statistics: 3.91--8.30). | |
| 29 | +Granger causality confirms that ATM implied volatility leads realized volatility in 100\% of individual tickers ($F=62.4$), and variance decomposition shows IV shocks explain 73.8\% of RV forecast error variance at the 20-day horizon. | |
| 30 | +All findings survive Newey-West HAC (up to 22 lags), double-clustered standard errors, subperiod and leave-one-year-out analysis, VIX-regime conditioning, quantile regressions, winsorization sensitivity, rank-based information coefficients, decile sorts, and a within-ticker permutation placebo.% | |
| 31 | +} | |
| 32 | +\newcommand{\WPkeywords}{Option-implied information, realized volatility, HAR-RV, implied correlation, volatility surface, portfolio sorts, Granger causality, high-frequency data} | |
| 33 | +\newcommand{\WPjel}{G12, G13, G14, G17, C53, C58} | |
| 34 | + | |
| 35 | +% --- Author --- | |
| 36 | +\newcommand{\WPauthor}{Simon-Pierre Boucher} | |
| 37 | +\newcommand{\WPaffiliation}{% | |
| 38 | + D\'epartement des sciences administratives\\ | |
| 39 | + Universit\'e du Qu\'ebec en Outaouais% | |
| 40 | +} | |
| 41 | +\newcommand{\WPemail}{simon-pierre.boucher@uqo.ca} | |
| 42 | +\newcommand{\WPaddress}{% | |
| 43 | + Gatineau -- Pavillon Alexandre-Tach\'e\\ | |
| 44 | + 283, boulevard Alexandre-Tach\'e\\ | |
| 45 | + Gatineau, Qu\'ebec, Canada J9A 1L8% | |
| 46 | +} | |
| 47 | + | |
| 48 | +% ============================================================================ | |
| 49 | +% DOCUMENT | |
| 50 | +% ============================================================================ | |
| 51 | +\begin{document} | |
| 52 | + | |
| 53 | +% --- Title Page --- | |
| 54 | +\input{sections/titlepage} | |
| 55 | + | |
| 56 | +% --- Table of Contents --- | |
| 57 | +\setcounter{page}{1} | |
| 58 | +\tableofcontents | |
| 59 | +\newpage | |
| 60 | + | |
| 61 | +% --- Main Body --- | |
| 62 | +\input{sections/introduction} | |
| 63 | +\input{sections/literature} | |
| 64 | +\input{sections/data} | |
| 65 | +\input{sections/methodology} | |
| 66 | +\input{sections/results} | |
| 67 | +\input{sections/robustness} | |
| 68 | +\input{sections/discussion} | |
| 69 | +\input{sections/conclusion} | |
| 70 | + | |
| 71 | +% --- References --- | |
| 72 | +\newpage | |
| 73 | +\bibliography{references} | |
| 74 | + | |
| 75 | +% --- Appendix --- | |
| 76 | +\newpage | |
| 77 | +\appendix | |
| 78 | +\begin{appendices} | |
| 79 | +\input{appendix/appendix} | |
| 80 | +\end{appendices} | |
| 81 | + | |
| 82 | +\end{document} | |
added
paper/preamble.tex
+124 −0
@@ -0,0 +1,124 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% Preamble — packages, layout, typography, table/figure setup, custom macros. | |
| 6 | +% Loaded by main.tex before the metadata block. | |
| 7 | +% ============================================================================= | |
| 8 | + | |
| 9 | +% --- Encoding & Language --- | |
| 10 | +\usepackage[utf8]{inputenc} | |
| 11 | +\usepackage[T1]{fontenc} | |
| 12 | +\usepackage[english]{babel} | |
| 13 | + | |
| 14 | +% --- Page Layout --- | |
| 15 | +\usepackage[ | |
| 16 | + letterpaper, | |
| 17 | + top=1in, bottom=1in, left=1in, right=1in, | |
| 18 | + headheight=15pt | |
| 19 | +]{geometry} | |
| 20 | +\usepackage{setspace} | |
| 21 | +\onehalfspacing | |
| 22 | + | |
| 23 | +% --- Typography --- | |
| 24 | +\usepackage{newtxtext,newtxmath} | |
| 25 | +\usepackage{microtype} | |
| 26 | + | |
| 27 | +% --- Math --- | |
| 28 | +\usepackage{amsmath} | |
| 29 | +\let\Bbbk\relax | |
| 30 | +\usepackage{amssymb,amsfonts} | |
| 31 | +\usepackage{mathtools} | |
| 32 | + | |
| 33 | +% --- Tables --- | |
| 34 | +\usepackage{booktabs} | |
| 35 | +\usepackage{tabularx} | |
| 36 | +\usepackage{multirow} | |
| 37 | +\usepackage{threeparttable} | |
| 38 | +\usepackage{array} | |
| 39 | +\usepackage{dcolumn} | |
| 40 | +\newcolumntype{d}[1]{D{.}{.}{#1}} | |
| 41 | + | |
| 42 | +% --- Figures --- | |
| 43 | +\usepackage{graphicx} | |
| 44 | +\usepackage{float} | |
| 45 | +\usepackage[ | |
| 46 | + font = small, | |
| 47 | + labelfont = bf, | |
| 48 | + labelsep = period, | |
| 49 | + skip = 6pt, | |
| 50 | + justification = justified, | |
| 51 | + singlelinecheck = false | |
| 52 | +]{caption} | |
| 53 | +\usepackage{subcaption} | |
| 54 | + | |
| 55 | +% --- Lists --- | |
| 56 | +\usepackage{enumitem} | |
| 57 | +\setlist{nosep,leftmargin=*} | |
| 58 | + | |
| 59 | +% --- Colors & Links --- | |
| 60 | +\usepackage[dvipsnames,table]{xcolor} | |
| 61 | +\usepackage[bookmarks, bookmarksnumbered]{hyperref} | |
| 62 | +\hypersetup{ | |
| 63 | + colorlinks = true, | |
| 64 | + linkcolor = NavyBlue, | |
| 65 | + citecolor = NavyBlue, | |
| 66 | + urlcolor = NavyBlue, | |
| 67 | + pdfauthor = {Simon-Pierre Boucher}, | |
| 68 | + pdftitle = {Options-Implied Information Content}, | |
| 69 | + pdfsubject = {Working Paper WP7}, | |
| 70 | + pdfkeywords = {option-implied information, realized volatility, HAR-RV, implied correlation, portfolio sorts, Granger causality} | |
| 71 | +} | |
| 72 | +\usepackage{cleveref} | |
| 73 | + | |
| 74 | +% --- Landscape & Rotation --- | |
| 75 | +\usepackage{pdflscape} | |
| 76 | + | |
| 77 | +% --- Bibliography (BibTeX via natbib) --- | |
| 78 | +\usepackage{natbib} | |
| 79 | +\setcitestyle{authoryear,round,semicolon} | |
| 80 | +\bibliographystyle{apalike} | |
| 81 | + | |
| 82 | +% --- Headers & Footers --- | |
| 83 | +\usepackage{fancyhdr} | |
| 84 | +\pagestyle{fancy} | |
| 85 | +\fancyhf{} | |
| 86 | +\fancyhead[L]{\small\itshape Options-Implied Information Content} | |
| 87 | +\fancyhead[R]{\small\thepage} | |
| 88 | +\renewcommand{\headrulewidth}{0.4pt} | |
| 89 | +\renewcommand{\footrulewidth}{0pt} | |
| 90 | +\fancypagestyle{plain}{% | |
| 91 | + \fancyhf{} | |
| 92 | + \fancyfoot[C]{\small\thepage} | |
| 93 | + \renewcommand{\headrulewidth}{0pt} | |
| 94 | +} | |
| 95 | + | |
| 96 | +% --- Section Formatting --- | |
| 97 | +\usepackage{titlesec} | |
| 98 | +\titleformat{\section}{\large\bfseries}{\thesection.}{0.5em}{} | |
| 99 | +\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{0.5em}{} | |
| 100 | +\titleformat{\subsubsection}{\normalsize\itshape}{\thesubsubsection.}{0.5em}{} | |
| 101 | +\titlespacing*{\section}{0pt}{18pt}{8pt} | |
| 102 | +\titlespacing*{\subsection}{0pt}{12pt}{4pt} | |
| 103 | +\titlespacing*{\subsubsection}{0pt}{10pt}{3pt} | |
| 104 | + | |
| 105 | +% --- Footnotes --- | |
| 106 | +\usepackage[bottom,hang]{footmisc} | |
| 107 | +\setlength{\footnotemargin}{0.5em} | |
| 108 | + | |
| 109 | +% --- Appendix --- | |
| 110 | +\usepackage[title]{appendix} | |
| 111 | +\usepackage{apptools} | |
| 112 | +\AtAppendix{% | |
| 113 | + \renewcommand{\thetable}{A\arabic{table}}% | |
| 114 | + \setcounter{table}{0}% | |
| 115 | + \renewcommand{\thefigure}{A\arabic{figure}}% | |
| 116 | + \setcounter{figure}{0}% | |
| 117 | + \renewcommand{\theequation}{A.\arabic{equation}}% | |
| 118 | + \setcounter{equation}{0}% | |
| 119 | +} | |
| 120 | + | |
| 121 | +% --- Custom Commands --- | |
| 122 | +\newcommand{\sym}[1]{\ensuremath{^{#1}}} | |
| 123 | +\newcommand{\ie}{\textit{i.e.}} | |
| 124 | +\newcommand{\eg}{\textit{e.g.}} | |
added
paper/references.bib
+457 −0
@@ -0,0 +1,457 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact [at] spboucher.ai | |
| 4 | +% (the at-sign is spelled out because BibTeX treats a literal one, even in | |
| 5 | +% a comment line, as the start of a new entry) | |
| 6 | +% ============================================================================= | |
| 7 | +% Converted from the manual thebibliography of the original draft (37 entries, | |
| 8 | +% all cited). Metadata reproduced faithfully from the author's entries. | |
| 9 | + | |
| 10 | +@article{acharya2017measuring, | |
| 11 | + author = {Acharya, Viral V. and Pedersen, Lasse H. and Philippon, Thomas and Richardson, Matthew}, | |
| 12 | + year = {2017}, | |
| 13 | + title = {Measuring systemic risk}, | |
| 14 | + journal = {Review of Financial Studies}, | |
| 15 | + volume = {30}, | |
| 16 | + number = {1}, | |
| 17 | + pages = {2--47}, | |
| 18 | +} | |
| 19 | + | |
| 20 | +@article{an2014joint, | |
| 21 | + author = {An, Byeong-Je and Ang, Andrew and Bali, Turan G. and Cakici, Nusret}, | |
| 22 | + year = {2014}, | |
| 23 | + title = {The joint cross section of stocks and options}, | |
| 24 | + journal = {Journal of Finance}, | |
| 25 | + volume = {69}, | |
| 26 | + number = {5}, | |
| 27 | + pages = {2279--2337}, | |
| 28 | +} | |
| 29 | + | |
| 30 | +@article{andersen2003modeling, | |
| 31 | + author = {Andersen, Torben G. and Bollerslev, Tim and Diebold, Francis X. and Labys, Paul}, | |
| 32 | + year = {2003}, | |
| 33 | + title = {Modeling and forecasting realized volatility}, | |
| 34 | + journal = {Econometrica}, | |
| 35 | + volume = {71}, | |
| 36 | + number = {2}, | |
| 37 | + pages = {579--625}, | |
| 38 | +} | |
| 39 | + | |
| 40 | +@article{avellaneda2003weighted, | |
| 41 | + author = {Avellaneda, Marco and Lipkin, Michael D.}, | |
| 42 | + year = {2003}, | |
| 43 | + title = {A market-induced mechanism for stock pinning}, | |
| 44 | + journal = {Quantitative Finance}, | |
| 45 | + volume = {3}, | |
| 46 | + number = {6}, | |
| 47 | + pages = {417--425}, | |
| 48 | +} | |
| 49 | + | |
| 50 | +@unpublished{bali2019option, | |
| 51 | + author = {Bali, Turan G. and Hu, Jianfeng and Murray, Scott}, | |
| 52 | + year = {2019}, | |
| 53 | + title = {Option implied volatility, skewness, and kurtosis and the cross-section of expected stock returns}, | |
| 54 | + note = {Working Paper, Georgetown University}, | |
| 55 | +} | |
| 56 | + | |
| 57 | +@article{barbon2022option, | |
| 58 | + author = {Barbon, Andrea and Buraschi, Andrea}, | |
| 59 | + year = {2022}, | |
| 60 | + title = {Gamma fragility}, | |
| 61 | + journal = {Journal of Financial Economics}, | |
| 62 | + volume = {143}, | |
| 63 | + number = {1}, | |
| 64 | + pages = {316--348}, | |
| 65 | +} | |
| 66 | + | |
| 67 | +@article{bekaert2014asymmetric, | |
| 68 | + author = {Bekaert, Geert and Hoerova, Marie}, | |
| 69 | + year = {2014}, | |
| 70 | + title = {The {VIX}, the variance premium and stock market volatility}, | |
| 71 | + journal = {Journal of Econometrics}, | |
| 72 | + volume = {183}, | |
| 73 | + number = {2}, | |
| 74 | + pages = {181--192}, | |
| 75 | +} | |
| 76 | + | |
| 77 | +@article{black1975fact, | |
| 78 | + author = {Black, Fischer}, | |
| 79 | + year = {1975}, | |
| 80 | + title = {Fact and fantasy in the use of options}, | |
| 81 | + journal = {Financial Analysts Journal}, | |
| 82 | + volume = {31}, | |
| 83 | + number = {4}, | |
| 84 | + pages = {36--41}, | |
| 85 | +} | |
| 86 | + | |
| 87 | +@article{black1973pricing, | |
| 88 | + author = {Black, Fischer and Scholes, Myron}, | |
| 89 | + year = {1973}, | |
| 90 | + title = {The pricing of options and corporate liabilities}, | |
| 91 | + journal = {Journal of Political Economy}, | |
| 92 | + volume = {81}, | |
| 93 | + number = {3}, | |
| 94 | + pages = {637--654}, | |
| 95 | +} | |
| 96 | + | |
| 97 | +@article{blair2001forecasting, | |
| 98 | + author = {Blair, Bevan J. and Poon, Ser-Huang and Taylor, Stephen J.}, | |
| 99 | + year = {2001}, | |
| 100 | + title = {Forecasting {S\&P}~100 volatility}, | |
| 101 | + journal = {Journal of Econometrics}, | |
| 102 | + volume = {105}, | |
| 103 | + number = {1}, | |
| 104 | + pages = {5--26}, | |
| 105 | +} | |
| 106 | + | |
| 107 | +@article{bollerslev2009expected, | |
| 108 | + author = {Bollerslev, Tim and Tauchen, George and Zhou, Hao}, | |
| 109 | + year = {2009}, | |
| 110 | + title = {Expected stock returns and variance risk premia}, | |
| 111 | + journal = {Review of Financial Studies}, | |
| 112 | + volume = {22}, | |
| 113 | + number = {11}, | |
| 114 | + pages = {4463--4492}, | |
| 115 | +} | |
| 116 | + | |
| 117 | +@article{bucci2020realized, | |
| 118 | + author = {Bucci, Andrea}, | |
| 119 | + year = {2020}, | |
| 120 | + title = {Realized volatility forecasting with neural networks}, | |
| 121 | + journal = {Journal of Financial Econometrics}, | |
| 122 | + volume = {18}, | |
| 123 | + number = {3}, | |
| 124 | + pages = {502--531}, | |
| 125 | +} | |
| 126 | + | |
| 127 | +@article{busch2011role, | |
| 128 | + author = {Busch, Thomas and Christensen, Bent Jesper and Nielsen, Morten {\O}rregaard}, | |
| 129 | + year = {2011}, | |
| 130 | + title = {The role of implied volatility in forecasting future realized volatility}, | |
| 131 | + journal = {Journal of Econometrics}, | |
| 132 | + volume = {160}, | |
| 133 | + number = {1}, | |
| 134 | + pages = {48--57}, | |
| 135 | +} | |
| 136 | + | |
| 137 | +@article{buss2012more, | |
| 138 | + author = {Buss, Adrian and Vilkov, Grigory}, | |
| 139 | + year = {2012}, | |
| 140 | + title = {Measuring equity risk with option-implied correlations}, | |
| 141 | + journal = {Review of Financial Studies}, | |
| 142 | + volume = {25}, | |
| 143 | + number = {10}, | |
| 144 | + pages = {3113--3140}, | |
| 145 | +} | |
| 146 | + | |
| 147 | +@article{cameron2011robust, | |
| 148 | + author = {Cameron, A. Colin and Gelbach, Jonah B. and Miller, Douglas L.}, | |
| 149 | + year = {2011}, | |
| 150 | + title = {Robust inference with multiway clustering}, | |
| 151 | + journal = {Journal of Business \& Economic Statistics}, | |
| 152 | + volume = {29}, | |
| 153 | + number = {2}, | |
| 154 | + pages = {238--249}, | |
| 155 | +} | |
| 156 | + | |
| 157 | +@article{cao2005informational, | |
| 158 | + author = {Cao, Charles and Chen, Zhiwu and Griffin, John M.}, | |
| 159 | + year = {2005}, | |
| 160 | + title = {Informational content of option volume prior to takeovers}, | |
| 161 | + journal = {Journal of Business}, | |
| 162 | + volume = {78}, | |
| 163 | + number = {3}, | |
| 164 | + pages = {1073--1109}, | |
| 165 | +} | |
| 166 | + | |
| 167 | +@article{carr2009variance, | |
| 168 | + author = {Carr, Peter and Wu, Liuren}, | |
| 169 | + year = {2009}, | |
| 170 | + title = {Variance risk premiums}, | |
| 171 | + journal = {Review of Financial Studies}, | |
| 172 | + volume = {22}, | |
| 173 | + number = {3}, | |
| 174 | + pages = {1311--1341}, | |
| 175 | +} | |
| 176 | + | |
| 177 | +@article{christensen1998relation, | |
| 178 | + author = {Christensen, Bent Jesper and Prabhala, Nagpurnanand R.}, | |
| 179 | + year = {1998}, | |
| 180 | + title = {The relation between implied and realized volatility}, | |
| 181 | + journal = {Journal of Financial Economics}, | |
| 182 | + volume = {50}, | |
| 183 | + number = {2}, | |
| 184 | + pages = {125--150}, | |
| 185 | +} | |
| 186 | + | |
| 187 | +@article{christensen2023machine, | |
| 188 | + author = {Christensen, Kim and Siggaard, Mathias and Veliyev, Bezirgen}, | |
| 189 | + year = {2023}, | |
| 190 | + title = {A machine learning approach to volatility forecasting}, | |
| 191 | + journal = {Journal of Financial Econometrics}, | |
| 192 | + volume = {21}, | |
| 193 | + number = {5}, | |
| 194 | + pages = {1680--1727}, | |
| 195 | +} | |
| 196 | + | |
| 197 | +@article{corsi2009simple, | |
| 198 | + author = {Corsi, Fulvio}, | |
| 199 | + year = {2009}, | |
| 200 | + title = {A simple approximate long-memory model of realized volatility}, | |
| 201 | + journal = {Journal of Financial Econometrics}, | |
| 202 | + volume = {7}, | |
| 203 | + number = {2}, | |
| 204 | + pages = {174--196}, | |
| 205 | +} | |
| 206 | + | |
| 207 | +@article{cremers2010deviations, | |
| 208 | + author = {Cremers, Martijn and Weinbaum, David}, | |
| 209 | + year = {2010}, | |
| 210 | + title = {Deviations from put-call parity and stock return predictability}, | |
| 211 | + journal = {Journal of Financial and Quantitative Analysis}, | |
| 212 | + volume = {45}, | |
| 213 | + number = {2}, | |
| 214 | + pages = {335--367}, | |
| 215 | +} | |
| 216 | + | |
| 217 | +@article{diebold1995comparing, | |
| 218 | + author = {Diebold, Francis X. and Mariano, Roberto S.}, | |
| 219 | + year = {1995}, | |
| 220 | + title = {Comparing predictive accuracy}, | |
| 221 | + journal = {Journal of Business \& Economic Statistics}, | |
| 222 | + volume = {13}, | |
| 223 | + number = {3}, | |
| 224 | + pages = {253--263}, | |
| 225 | +} | |
| 226 | + | |
| 227 | +@article{driessen2009price, | |
| 228 | + author = {Driessen, Joost and Maenhout, Pascal J. and Vilkov, Grigory}, | |
| 229 | + year = {2009}, | |
| 230 | + title = {The price of correlation risk}, | |
| 231 | + journal = {Journal of Finance}, | |
| 232 | + volume = {64}, | |
| 233 | + number = {3}, | |
| 234 | + pages = {1377--1406}, | |
| 235 | +} | |
| 236 | + | |
| 237 | +@article{easley1998option, | |
| 238 | + author = {Easley, David and O'Hara, Maureen and Srinivas, P.S.}, | |
| 239 | + year = {1998}, | |
| 240 | + title = {Option volume and stock prices}, | |
| 241 | + journal = {Journal of Finance}, | |
| 242 | + volume = {53}, | |
| 243 | + number = {2}, | |
| 244 | + pages = {431--465}, | |
| 245 | +} | |
| 246 | + | |
| 247 | +@article{fama1973risk, | |
| 248 | + author = {Fama, Eugene F. and MacBeth, James D.}, | |
| 249 | + year = {1973}, | |
| 250 | + title = {Risk, return, and equilibrium: {E}mpirical tests}, | |
| 251 | + journal = {Journal of Political Economy}, | |
| 252 | + volume = {81}, | |
| 253 | + number = {3}, | |
| 254 | + pages = {607--636}, | |
| 255 | +} | |
| 256 | + | |
| 257 | +@article{ge2016informed, | |
| 258 | + author = {Ge, Li and Lin, Tse-Chun and Pearson, Neil D.}, | |
| 259 | + year = {2016}, | |
| 260 | + title = {Why does the option to stock volume ratio predict stock returns?}, | |
| 261 | + journal = {Journal of Financial Economics}, | |
| 262 | + volume = {120}, | |
| 263 | + number = {3}, | |
| 264 | + pages = {601--622}, | |
| 265 | +} | |
| 266 | + | |
| 267 | +@article{gu2020empirical, | |
| 268 | + author = {Gu, Shihao and Kelly, Bryan and Xiu, Dacheng}, | |
| 269 | + year = {2020}, | |
| 270 | + title = {Empirical asset pricing via machine learning}, | |
| 271 | + journal = {Review of Financial Studies}, | |
| 272 | + volume = {33}, | |
| 273 | + number = {5}, | |
| 274 | + pages = {2223--2273}, | |
| 275 | +} | |
| 276 | + | |
| 277 | +@article{hansen2012realized, | |
| 278 | + author = {Hansen, Peter R. and Huang, Zhuo and Shek, Howard H.}, | |
| 279 | + year = {2012}, | |
| 280 | + title = {Realized {GARCH}: {A} joint model for returns and realized measures of volatility}, | |
| 281 | + journal = {Journal of Applied Econometrics}, | |
| 282 | + volume = {27}, | |
| 283 | + number = {6}, | |
| 284 | + pages = {877--906}, | |
| 285 | +} | |
| 286 | + | |
| 287 | +@article{hu2014does, | |
| 288 | + author = {Hu, Jianfeng}, | |
| 289 | + year = {2014}, | |
| 290 | + title = {Does option trading convey stock price information?}, | |
| 291 | + journal = {Journal of Financial Economics}, | |
| 292 | + volume = {111}, | |
| 293 | + number = {3}, | |
| 294 | + pages = {625--645}, | |
| 295 | +} | |
| 296 | + | |
| 297 | +@article{johnson2012option, | |
| 298 | + author = {Johnson, Travis L. and So, Eric C.}, | |
| 299 | + year = {2012}, | |
| 300 | + title = {The option to stock volume ratio and future returns}, | |
| 301 | + journal = {Journal of Financial Economics}, | |
| 302 | + volume = {106}, | |
| 303 | + number = {2}, | |
| 304 | + pages = {262--286}, | |
| 305 | +} | |
| 306 | + | |
| 307 | +@article{kelly2014tail, | |
| 308 | + author = {Kelly, Bryan and Jiang, Hao}, | |
| 309 | + year = {2014}, | |
| 310 | + title = {Tail risk and asset prices}, | |
| 311 | + journal = {Review of Financial Studies}, | |
| 312 | + volume = {27}, | |
| 313 | + number = {10}, | |
| 314 | + pages = {2841--2871}, | |
| 315 | +} | |
| 316 | + | |
| 317 | +@article{manaster1982option, | |
| 318 | + author = {Manaster, Steven and Rendleman, Richard J.}, | |
| 319 | + year = {1982}, | |
| 320 | + title = {Option prices as predictors of equilibrium stock prices}, | |
| 321 | + journal = {Journal of Finance}, | |
| 322 | + volume = {37}, | |
| 323 | + number = {4}, | |
| 324 | + pages = {1043--1057}, | |
| 325 | +} | |
| 326 | + | |
| 327 | +@article{ni2009does, | |
| 328 | + author = {Ni, Sophie X. and Pearson, Neil D. and Poteshman, Allen M. and White, Joshua}, | |
| 329 | + year = {2009}, | |
| 330 | + title = {Does option trading convey stock price information?}, | |
| 331 | + journal = {Journal of Finance}, | |
| 332 | + volume = {60}, | |
| 333 | + number = {3}, | |
| 334 | + pages = {1049--1084}, | |
| 335 | +} | |
| 336 | + | |
| 337 | +@article{pan2006information, | |
| 338 | + author = {Pan, Jun and Poteshman, Allen M.}, | |
| 339 | + year = {2006}, | |
| 340 | + title = {The information in option volume for future stock prices}, | |
| 341 | + journal = {Review of Financial Studies}, | |
| 342 | + volume = {19}, | |
| 343 | + number = {3}, | |
| 344 | + pages = {871--908}, | |
| 345 | +} | |
| 346 | + | |
| 347 | +@article{patton2015good, | |
| 348 | + author = {Patton, Andrew J. and Sheppard, Kevin}, | |
| 349 | + year = {2015}, | |
| 350 | + title = {Good volatility, bad volatility}, | |
| 351 | + journal = {Review of Economics and Statistics}, | |
| 352 | + volume = {97}, | |
| 353 | + number = {3}, | |
| 354 | + pages = {683--697}, | |
| 355 | +} | |
| 356 | + | |
| 357 | +@article{stilger2017puzzle, | |
| 358 | + author = {Stilger, Przemys{\l}aw S. and Kostakis, Alexandros and Poon, Ser-Huang}, | |
| 359 | + year = {2017}, | |
| 360 | + title = {What does risk-neutral skewness tell us about future stock returns?}, | |
| 361 | + journal = {Management Science}, | |
| 362 | + volume = {63}, | |
| 363 | + number = {6}, | |
| 364 | + pages = {1814--1834}, | |
| 365 | +} | |
| 366 | + | |
| 367 | +@article{xing2010does, | |
| 368 | + author = {Xing, Yuhang and Zhang, Xiaoyan and Zhao, Rui}, | |
| 369 | + year = {2010}, | |
| 370 | + title = {What does the individual option volatility smirk tell us about future equity returns?}, | |
| 371 | + journal = {Journal of Financial and Quantitative Analysis}, | |
| 372 | + volume = {45}, | |
| 373 | + number = {3}, | |
| 374 | + pages = {641--662}, | |
| 375 | +} | |
| 376 | + | |
| 377 | +% --- Added in revision 1.1 (extended robustness analyses) --- | |
| 378 | + | |
| 379 | +@article{white1980heteroskedasticity, | |
| 380 | + author = {White, Halbert}, | |
| 381 | + year = {1980}, | |
| 382 | + title = {A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroskedasticity}, | |
| 383 | + journal = {Econometrica}, | |
| 384 | + volume = {48}, | |
| 385 | + number = {4}, | |
| 386 | + pages = {817--838}, | |
| 387 | +} | |
| 388 | + | |
| 389 | +@article{newey1987simple, | |
| 390 | + author = {Newey, Whitney K. and West, Kenneth D.}, | |
| 391 | + year = {1987}, | |
| 392 | + title = {A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix}, | |
| 393 | + journal = {Econometrica}, | |
| 394 | + volume = {55}, | |
| 395 | + number = {3}, | |
| 396 | + pages = {703--708}, | |
| 397 | +} | |
| 398 | + | |
| 399 | +@article{petersen2009estimating, | |
| 400 | + author = {Petersen, Mitchell A.}, | |
| 401 | + year = {2009}, | |
| 402 | + title = {Estimating standard errors in finance panel data sets: {C}omparing approaches}, | |
| 403 | + journal = {Review of Financial Studies}, | |
| 404 | + volume = {22}, | |
| 405 | + number = {1}, | |
| 406 | + pages = {435--480}, | |
| 407 | +} | |
| 408 | + | |
| 409 | +@article{koenker1978regression, | |
| 410 | + author = {Koenker, Roger and Bassett, Gilbert}, | |
| 411 | + year = {1978}, | |
| 412 | + title = {Regression quantiles}, | |
| 413 | + journal = {Econometrica}, | |
| 414 | + volume = {46}, | |
| 415 | + number = {1}, | |
| 416 | + pages = {33--50}, | |
| 417 | +} | |
| 418 | + | |
| 419 | +@article{harvey2016and, | |
| 420 | + author = {Harvey, Campbell R. and Liu, Yan and Zhu, Heqing}, | |
| 421 | + year = {2016}, | |
| 422 | + title = {{\ldots} and the cross-section of expected returns}, | |
| 423 | + journal = {Review of Financial Studies}, | |
| 424 | + volume = {29}, | |
| 425 | + number = {1}, | |
| 426 | + pages = {5--68}, | |
| 427 | +} | |
| 428 | + | |
| 429 | +@article{welch2008comprehensive, | |
| 430 | + author = {Welch, Ivo and Goyal, Amit}, | |
| 431 | + year = {2008}, | |
| 432 | + title = {A comprehensive look at the empirical performance of equity premium prediction}, | |
| 433 | + journal = {Review of Financial Studies}, | |
| 434 | + volume = {21}, | |
| 435 | + number = {4}, | |
| 436 | + pages = {1455--1508}, | |
| 437 | +} | |
| 438 | + | |
| 439 | +@article{campbell2008predicting, | |
| 440 | + author = {Campbell, John Y. and Thompson, Samuel B.}, | |
| 441 | + year = {2008}, | |
| 442 | + title = {Predicting excess stock returns out of sample: {C}an anything beat the historical average?}, | |
| 443 | + journal = {Review of Financial Studies}, | |
| 444 | + volume = {21}, | |
| 445 | + number = {4}, | |
| 446 | + pages = {1509--1531}, | |
| 447 | +} | |
| 448 | + | |
| 449 | +@article{fama2008dissecting, | |
| 450 | + author = {Fama, Eugene F. and French, Kenneth R.}, | |
| 451 | + year = {2008}, | |
| 452 | + title = {Dissecting anomalies}, | |
| 453 | + journal = {Journal of Finance}, | |
| 454 | + volume = {63}, | |
| 455 | + number = {4}, | |
| 456 | + pages = {1653--1678}, | |
| 457 | +} | |
added
paper/sections/conclusion.tex
+23 −0
@@ -0,0 +1,23 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% Conclusion | |
| 6 | +% ============================================================================= | |
| 7 | +\section{Conclusion}\label{sec:conclude} | |
| 8 | + | |
| 9 | +This paper provides comprehensive evidence on the information content of the options market, drawing on 3.83~billion option contracts and 11.5~billion intraday observations spanning 2010--2025 and six asset classes. The findings can be summarized as follows. | |
| 10 | + | |
| 11 | +\textbf{Finding 1.} Implied kurtosis, put-call ratios, and implied skewness predict weekly cross-sectional stock returns. Quintile long-short portfolios sorted on implied kurtosis deliver annualized Sharpe ratios of 2.33 ($t=19.84$). Daily predictability is negligible. | |
| 12 | + | |
| 13 | +\textbf{Finding 2.} Combining the IV surface with HAR-RV improves 1-day realized-variance forecasting by 23.3\% in $R^2$, an improvement that is robust across nine subperiods. | |
| 14 | + | |
| 15 | +\textbf{Finding 3.} The implied-to-realized correlation ratio predicts market stress at 5- to 20-day horizons ($t$-statistics: 3.91--8.30). | |
| 16 | + | |
| 17 | +\textbf{Finding 4.} The information content of the Greeks for realized volatility increases with time-to-expiry ($R^2$: 3.8\% at one week $\to$ 9.5\% at three months). The price-magnet hypothesis is not supported. | |
| 18 | + | |
| 19 | +\textbf{Finding 5.} HAR-RV dominates machine-learning models and the VIX for out-of-sample SPX realized-variance forecasting (2020--2025). Short-tenor ATM implied volatility carries the highest marginal predictive content (50.8\% of Random Forest importance). | |
| 20 | + | |
| 21 | +\textbf{Cross-cutting result.} ATM implied volatility Granger-causes realized volatility in 100\% of tickers ($F=62.4$), and IV shocks explain 73.8\% of the RV forecast error variance at the 20-day horizon. | |
| 22 | + | |
| 23 | +Future research should explore regularized approaches to exploiting the high-dimensional options surface, assess the net profitability of option-implied strategies under realistic transaction costs, and extend the analysis to international markets. | |
added
paper/sections/data.tex
+139 −0
@@ -0,0 +1,139 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% ============================================================================ | |
| 6 | +% Data and Variable Construction | |
| 7 | +% ============================================================================ | |
| 8 | +\section{Data and Variable Construction}\label{sec:data} | |
| 9 | + | |
| 10 | +\subsection{Data Sources} | |
| 11 | + | |
| 12 | +\paragraph{Options.} | |
| 13 | +I use a comprehensive end-of-day options database containing 3,831,907,488 records covering 11,077 underlyings from January~4, 2010 to December~31, 2025 (4,025 trading days). Each record includes trade date, strike, expiry, call/put flag, bid/ask prices, bid/ask implied volatilities, open interest, volume, and the full Greek sensitivities ($\delta$, $\Gamma$, $\mathcal{V}$, $\Theta$, $\rho$). Data quality is high: 92--95\% of records contain valid Greeks. | |
| 14 | + | |
| 15 | +\paragraph{Intraday OHLCV.} | |
| 16 | +I use 5-minute OHLCV data across six asset classes: 7,789 US equities (1.23B bars), 4,302 ETFs (301M bars), 125 indices, 131 futures, 78 FX pairs, and 74 cryptocurrencies. Total: approximately 11.5~billion intraday observations. | |
| 17 | + | |
| 18 | +\begin{table}[H] | |
| 19 | +\centering | |
| 20 | +\caption{Data coverage.} | |
| 21 | +\label{tab:data} | |
| 22 | +\begin{threeparttable} | |
| 23 | +\begin{tabular}{@{}lrrrl@{}} | |
| 24 | +\toprule | |
| 25 | +Asset class & Symbols & Rows (millions) & Freq.\ & Period \\ | |
| 26 | +\midrule | |
| 27 | +\multicolumn{5}{@{}l}{\textit{Panel A: Options}} \\ | |
| 28 | +Option contracts & 11,077 & 3,832 & Daily & 2010--2025 \\[6pt] | |
| 29 | +\multicolumn{5}{@{}l}{\textit{Panel B: Intraday OHLCV}} \\ | |
| 30 | +US equities & 7,789 & 1,225 & 5-min & 2000--2026 \\ | |
| 31 | +ETFs & 4,302 & 301 & 5-min & 2000--2026 \\ | |
| 32 | +Equity indices & 125 & 40 & 5-min & 2008--2026 \\ | |
| 33 | +Futures & 131 & 73 & 5-min & 2008--2026 \\ | |
| 34 | +FX & 78 & 83 & 5-min & 2010--2026 \\ | |
| 35 | +Crypto & 74 & 39 & 5-min & 2013--2026 \\ | |
| 36 | +\midrule | |
| 37 | +\textbf{Total} & & \textbf{$\approx$11,500} & & \\ | |
| 38 | +\bottomrule | |
| 39 | +\end{tabular} | |
| 40 | +\end{threeparttable} | |
| 41 | +\end{table} | |
| 42 | + | |
| 43 | +\subsection{Sample Construction} | |
| 44 | + | |
| 45 | +The analysis sample consists of 69 underlyings with overlapping options and OHLCV coverage: 49 major US stocks, 17 ETFs, and 3 broad market indices (SPX, NDX, RUT). After merging option-derived features with realized volatility, the sample comprises \textbf{264,383 ticker-day observations} (January 2010--December 2025). | |
| 46 | + | |
| 47 | +\subsection{Variable Definitions} | |
| 48 | + | |
| 49 | +\subsubsection{Option-Implied Features} | |
| 50 | + | |
| 51 | +I construct ten daily features for each underlying from the raw option chain: | |
| 52 | + | |
| 53 | +\begin{table}[H] | |
| 54 | +\centering | |
| 55 | +\caption{Option-implied variables.} | |
| 56 | +\label{tab:variables} | |
| 57 | +\begin{threeparttable} | |
| 58 | +\small | |
| 59 | +\begin{tabular}{@{}lp{10cm}@{}} | |
| 60 | +\toprule | |
| 61 | +Variable & Definition \\ | |
| 62 | +\midrule | |
| 63 | +$IV_{ATM,30d}$ & Average mid-IV of calls with $|\delta - 0.5| < 0.10$, 20--40 DTE \\ | |
| 64 | +$IV_{ATM,90d}$ & Same, 80--100 DTE \\ | |
| 65 | +IV term slope & $IV_{ATM,90d} - IV_{ATM,30d}$ \\ | |
| 66 | +Skew$_{25\delta}$ & $IV_{25\delta P,30d} - IV_{25\delta C,30d}$ \\ | |
| 67 | +Implied skewness & $(IV_{10\delta P} - IV_{10\delta C})/IV_{ATM}$ \\ | |
| 68 | +Implied kurtosis & $\overline{IV}_{wings} / IV_{ATM}$, with $0.03 < |\delta| < 0.15$ \\ | |
| 69 | +PC vol.\ ratio & $\sum V^{put} / \sum V^{call}$ \\ | |
| 70 | +PC OI ratio & $\sum OI^{put} / \sum OI^{call}$ \\ | |
| 71 | +Net gamma exp.\ & $\sum \Gamma^{call} \cdot OI^{call} - \sum \Gamma^{put} \cdot OI^{put}$ \\ | |
| 72 | +\bottomrule | |
| 73 | +\end{tabular} | |
| 74 | +\end{threeparttable} | |
| 75 | +\end{table} | |
| 76 | + | |
| 77 | +\subsubsection{Realized Volatility Measures} | |
| 78 | + | |
| 79 | +Following \citet{andersen2003modeling}, daily realized variance is: | |
| 80 | +\begin{equation}\label{eq:rv} | |
| 81 | + RV_t = \sum_{i=1}^{N_t} r_{t,i}^{2}, | |
| 82 | + \qquad r_{t,i} = \ln\!\bigl(P_{t,i}\,/\,P_{t,i-1}\bigr). | |
| 83 | +\end{equation} | |
| 84 | +I also compute the weekly and monthly rolling averages $RV_t^{(w)}$ and $RV_t^{(m)}$, as well as forward targets $RV_{t+1}$ (1-day) and $\sum_{j=1}^{5}RV_{t+j}$ (5-day). | |
| 85 | + | |
| 86 | +\subsection{Descriptive Statistics} | |
| 87 | + | |
| 88 | +Table~\ref{tab:desc_groups} presents summary statistics by asset group. | |
| 89 | + | |
| 90 | +\begin{table}[H] | |
| 91 | +\centering | |
| 92 | +\caption{Descriptive statistics by asset group.} | |
| 93 | +\label{tab:desc_groups} | |
| 94 | +\begin{threeparttable} | |
| 95 | +\begin{tabular}{@{}ld{3.4}d{3.4}d{3.4}d{3.4}@{}} | |
| 96 | +\toprule | |
| 97 | +& \multicolumn{1}{c}{Stocks} & \multicolumn{1}{c}{ETFs} & \multicolumn{1}{c}{Indices} & \multicolumn{1}{c}{All} \\ | |
| 98 | +\midrule | |
| 99 | +$N$ (ticker-days) & 188093 & 64256 & 12034 & 264383 \\ | |
| 100 | +$N$ tickers & 49 & 17 & 3 & 69 \\ | |
| 101 | +Mean $IV_{ATM,30d}$ & 0.2664 & 0.1784 & 0.1823 & 0.2406 \\ | |
| 102 | +Mean skew$_{25\delta}$ & 0.0361 & 0.0425 & 0.0562 & 0.0387 \\ | |
| 103 | +Mean PC vol.\ ratio & 0.890 & 2.345 & 1.754 & 1.283 \\ | |
| 104 | +Mean RV (daily) & 0.0005 & 0.0002 & 0.0001 & 0.0004 \\ | |
| 105 | +Mean daily return (\%) & 0.054 & 0.035 & 0.047 & 0.049 \\ | |
| 106 | +Std daily return (\%) & 1.90 & 1.25 & 1.29 & 1.74 \\ | |
| 107 | +\bottomrule | |
| 108 | +\end{tabular} | |
| 109 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 110 | +\item \textit{Notes.} Sample period: January 2010--December 2025. $IV_{ATM}$ is the 30-day at-the-money call implied volatility. Skew is the 25-delta put minus 25-delta call IV. PC vol.\ ratio is total put volume divided by total call volume. RV is realized variance from 5-minute returns. | |
| 111 | +\end{tablenotes} | |
| 112 | +\end{threeparttable} | |
| 113 | +\end{table} | |
| 114 | + | |
| 115 | +Stocks exhibit higher ATM implied volatility (26.6\%) and return volatility (1.90\% daily) than ETFs (17.8\%, 1.25\%) and indices (18.2\%, 1.29\%). The put-call volume ratio is notably higher for ETFs (2.35) and indices (1.75) than for stocks (0.89), consistent with institutional portfolio hedging. | |
| 116 | + | |
| 117 | +Table~\ref{tab:autocorr} reports the average autocorrelation structure. ATM implied volatility is highly persistent (lag-1: 0.959, lag-22: 0.538), while daily returns exhibit slight negative autocorrelation ($-0.062$). | |
| 118 | + | |
| 119 | +\begin{table}[H] | |
| 120 | +\centering | |
| 121 | +\caption{Average autocorrelation structure.} | |
| 122 | +\label{tab:autocorr} | |
| 123 | +\begin{threeparttable} | |
| 124 | +\begin{tabular}{@{}ld{1.3}d{1.3}d{1.3}d{1.3}@{}} | |
| 125 | +\toprule | |
| 126 | +Variable & \multicolumn{1}{c}{Lag 1} & \multicolumn{1}{c}{Lag 5} & \multicolumn{1}{c}{Lag 10} & \multicolumn{1}{c}{Lag 22} \\ | |
| 127 | +\midrule | |
| 128 | +ATM IV (30d) & 0.959 & 0.861 & 0.753 & 0.538 \\ | |
| 129 | +Skew (25$\delta$) & 0.832 & 0.711 & 0.593 & 0.416 \\ | |
| 130 | +Realized variance & 0.320 & 0.211 & 0.139 & 0.057 \\ | |
| 131 | +Daily return & -0.062 & -0.010 & -0.006 & -0.030 \\ | |
| 132 | +PC vol.\ ratio & 0.299 & 0.218 & 0.172 & 0.118 \\ | |
| 133 | +\bottomrule | |
| 134 | +\end{tabular} | |
| 135 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 136 | +\item \textit{Notes.} Cross-sectional average of within-ticker autocorrelations. | |
| 137 | +\end{tablenotes} | |
| 138 | +\end{threeparttable} | |
| 139 | +\end{table} | |
added
paper/sections/discussion.tex
+29 −0
@@ -0,0 +1,29 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% Discussion | |
| 6 | +% ============================================================================= | |
| 7 | +\section{Discussion}\label{sec:discuss} | |
| 8 | + | |
| 9 | +\subsection{Economic Interpretation} | |
| 10 | + | |
| 11 | +\paragraph{Horizon-dependent predictability.} | |
| 12 | +The increase from near-zero daily $R^2$ to 4.8--19.3\% weekly $R^2$ suggests that option-implied information captures medium-term risk assessments that take several days to be reflected in spot prices, consistent with limits to arbitrage and gradual information diffusion. | |
| 13 | + | |
| 14 | +\paragraph{Implied kurtosis as the strongest predictor.} | |
| 15 | +The Sharpe ratio of 2.33 for the kurtosis sort points to a ``kurtosis risk premium'': investors demand compensation for holding assets with uncertain tail behavior. This extends the variance-risk-premium literature \citep{bollerslev2009expected} to higher moments. | |
| 16 | + | |
| 17 | +\paragraph{Information flow: options lead volatility.} | |
| 18 | +The Granger causality results ($F=62.4$, significant for 100\% of tickers) and the variance decomposition (73.8\% at 20 days) establish the options market as the dominant information venue for volatility dynamics, consistent with the informational-role hypothesis of \citet{easley1998option}. | |
| 19 | + | |
| 20 | +\paragraph{The failure of the price-magnet hypothesis.} | |
| 21 | +The 47.0\% convergence rate---below the 50\% null---contradicts the ``max pain'' narrative and is consistent with \citet{avellaneda2003weighted}, who find that pinning is confined to the last hours before expiration. | |
| 22 | + | |
| 23 | +\subsection{Comparison with Prior Literature} | |
| 24 | + | |
| 25 | +The implied-kurtosis Sharpe ratio of 2.33 exceeds those of the variance-risk-premium strategies in \citet{bollerslev2009expected} ($\approx$1.0) and the skewness sorts in \citet{xing2010does} ($\approx$0.8). The HAR-RV~$+$~IV improvement (23.3\%) likewise exceeds the 10--15\% reported by \citet{busch2011role}, plausibly because the present study exploits the full surface rather than a single VIX-like measure. | |
| 26 | + | |
| 27 | +\subsection{Limitations} | |
| 28 | + | |
| 29 | +Several limitations merit acknowledgment. Portfolio sorts assume frictionless trading. The options features are computed from end-of-day data; intraday options data might reveal different patterns. The focus on large-cap, liquid names may limit generalizability. The implied-correlation analysis uses equal weights. Finally, the machine-learning comparison is limited to tree-based methods; deep learning merits future investigation. | |
added
paper/sections/introduction.tex
+25 −0
@@ -0,0 +1,25 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% Introduction | |
| 6 | +% ============================================================================= | |
| 7 | +\section{Introduction}\label{sec:intro} | |
| 8 | + | |
| 9 | +Options markets aggregate the expectations of heterogeneous participants regarding future price movements, volatility, and tail risks. Since the seminal work of \citet{black1973pricing}, financial economists have recognized that derivative prices embed forward-looking information that is not fully reflected in the underlying asset's spot price. The implied volatility surface---spanning the dimensions of moneyness and time-to-expiration---constitutes a rich, high-dimensional representation of market expectations about the full distribution of future returns. Whether, and how, this information can be exploited for return prediction and volatility forecasting remains a central question in empirical finance. | |
| 10 | + | |
| 11 | +This paper addresses that question with a dataset of unprecedented scale: 3.83~billion individual option contract records spanning 11,077 underlying tickers over 4,025 trading days (January 2010--December 2025), merged with 11.5~billion intraday OHLCV observations at the 1-minute and 5-minute frequencies across six asset classes. This infrastructure supports five interconnected research questions: | |
| 12 | + | |
| 13 | +\begin{enumerate}[label=\textbf{RQ\arabic*.}] | |
| 14 | + \item Do option-implied moments (variance, skewness, kurtosis) extracted from the strike--expiry surface predict next-day and next-week cross-sectional stock returns? Does this predictability extend to sector ETFs and equity indices? | |
| 15 | + \item Can the implied volatility term structure and volatility smile jointly forecast realized volatility more accurately than standard time-series models (GARCH, HAR-RV)? | |
| 16 | + \item Does the divergence between option-implied and realized correlations predict future market stress events? | |
| 17 | + \item How does the information content of aggregated options Greeks decay as a function of days-to-expiry? Does open-interest concentration at specific strikes create predictable intraday price magnets? | |
| 18 | + \item Can machine-learning models trained on the full daily options surface outperform the VIX in forecasting the 5-minute realized variance of the S\&P~500? | |
| 19 | +\end{enumerate} | |
| 20 | + | |
| 21 | +The study advances the existing literature along four dimensions. First, whereas most prior work examines individual stocks or a single index, I provide evidence spanning 69 underlyings across three asset groups (individual stocks, sector ETFs, and broad market indices), documenting a systematic cross-asset gradient in predictability. Second, I assess the \textit{economic significance} of option-implied predictability through portfolio sorts, constructing long-short quintile portfolios and evaluating risk-adjusted performance under realistic transaction costs. Third, I provide the most comprehensive set of robustness checks in this literature: Newey-West HAC standard errors at multiple lag lengths \citep{newey1987simple}, double-clustered standard errors \citep{cameron2011robust,petersen2009estimating}, Fama-MacBeth regressions \citep{fama1973risk}, subperiod and leave-one-year-out analysis, VIX-regime conditioning, quantile regressions, winsorization sensitivity, nonparametric rank-based information coefficients, decile sorts, ticker-by-ticker $R^2$ distributions, and a within-ticker permutation placebo test. Fourth, I employ Granger causality tests and bivariate VAR models to establish the direction of information flow between option-implied and realized measures, complemented by impulse response functions and forecast error variance decomposition. | |
| 22 | + | |
| 23 | +The 16-year sample encompasses the post-GFC recovery (2010--2012), the extended bull market (2013--2016), the low-volatility era of 2017, the Volmageddon of February 2018, the COVID-19 crash of March 2020, the meme-stock episode of January 2021, the 2022 rate-hiking cycle, the SVB crisis of March 2023, and the August 2024 VIX spike---a sequence of natural experiments for regime-dependent analysis. | |
| 24 | + | |
| 25 | +The remainder of the paper is organized as follows. Section~\ref{sec:lit} reviews the literature. Section~\ref{sec:data} describes the data and variable construction. Section~\ref{sec:method} presents the methodology. Section~\ref{sec:results} reports the results. Section~\ref{sec:robust} presents robustness tests. Section~\ref{sec:discuss} discusses the findings, and Section~\ref{sec:conclude} concludes. | |
added
paper/sections/literature.tex
+31 −0
@@ -0,0 +1,31 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% Literature Review | |
| 6 | +% ============================================================================= | |
| 7 | +\section{Literature Review}\label{sec:lit} | |
| 8 | + | |
| 9 | +\subsection{Information Content of Option Prices} | |
| 10 | + | |
| 11 | +The notion that options markets convey informational advantages relative to the equity market dates back to \citet{black1975fact} and \citet{manaster1982option}. \citet{easley1998option} develop a sequential-trade model in which option volume signals the presence of informed traders; \citet{pan2006information} extend this framework and find that the informational role is concentrated in out-of-the-money puts. \citet{johnson2012option} show that the option-to-stock volume ratio predicts returns more strongly when short-sale constraints bind, and \citet{ge2016informed} use order-level data to confirm that non-market-maker option trades carry predictive power for future stock prices. \citet{hu2014does} documents that the information content of option trades has increased over time. | |
| 12 | + | |
| 13 | +\subsection{Option-Implied Moments and Return Predictability} | |
| 14 | + | |
| 15 | +\citet{xing2010does} demonstrate that the steepness of the volatility smirk predicts individual stock returns. \citet{cremers2010deviations} show that deviations from put-call parity contain return-predictive information. \citet{an2014joint} analyze the joint cross section of stocks and options and find incremental predictive power in implied volatility and skewness. \citet{bali2019option} construct comprehensive implied-moment measures and document significant cross-sectional predictability at the weekly horizon. \citet{stilger2017puzzle} examine the implied volatility spread (call IV minus put IV) and document a strong positive relationship with future returns. \citet{cao2005informational} provide evidence that the options market leads the equity market in price discovery. | |
| 16 | + | |
| 17 | +\subsection{Implied Volatility and Realized Volatility Forecasting} | |
| 18 | + | |
| 19 | +\citet{christensen1998relation} establish that implied volatility is a biased but efficient forecast of realized volatility, a result \citet{blair2001forecasting} confirm using the VIX. The HAR-RV model of \citet{corsi2009simple} has become the benchmark for realized volatility forecasting, and \citet{busch2011role} augment it with implied volatility. \citet{bekaert2014asymmetric} decompose the VIX into expected volatility and variance-risk-premium components, while \citet{bollerslev2009expected} show that the variance risk premium predicts equity returns. \citet{carr2009variance} provide the theoretical foundation for model-free implied variance. \citet{patton2015good} propose the semivariance-based asymmetric HAR-RV, and \citet{hansen2012realized} develop the Realized GARCH model. | |
| 20 | + | |
| 21 | +\subsection{Implied Correlation and Systemic Risk} | |
| 22 | + | |
| 23 | +\citet{driessen2009price} formalize the correlation risk premium and show that it is positive. \citet{buss2012more} demonstrate that implied correlation spikes during market stress. \citet{kelly2014tail} develop tail-risk measures from out-of-the-money puts, and \citet{acharya2017measuring} propose systemic-risk measures related to the correlation approach adopted here. | |
| 24 | + | |
| 25 | +\subsection{Market Microstructure of Options and Greeks} | |
| 26 | + | |
| 27 | +\citet{ni2009does} document that high open interest at specific strikes affects underlying prices, and \citet{avellaneda2003weighted} study expiration-day pinning. \citet{barbon2022option} show that aggregate dealer gamma positions predict returns and volatility. | |
| 28 | + | |
| 29 | +\subsection{Machine Learning in Volatility Forecasting} | |
| 30 | + | |
| 31 | +\citet{bucci2020realized} compare neural networks with traditional volatility models. \citet{christensen2023machine} find that machine-learning methods offer modest improvements that often fail out-of-sample, whereas \citet{gu2020empirical} show that tree-based methods perform well for cross-sectional return prediction. | |
added
paper/sections/methodology.tex
+59 −0
@@ -0,0 +1,59 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% ============================================================================ | |
| 6 | +% Methodology | |
| 7 | +% ============================================================================ | |
| 8 | +\section{Methodology}\label{sec:method} | |
| 9 | + | |
| 10 | +\subsection{Return Predictability (RQ1)} | |
| 11 | + | |
| 12 | +I estimate pooled panel regressions: | |
| 13 | +\begin{equation}\label{eq:rq1} | |
| 14 | + r_{i,t+h} = \alpha + \boldsymbol{\beta}'\,\mathbf{X}_{i,t}^{opt} | |
| 15 | + + \gamma\, RV_{i,t} + \delta\, RV_{i,t}^{(w)} + \varepsilon_{i,t+h}, | |
| 16 | + \qquad h \in \{1,\,5\}\text{ days}, | |
| 17 | +\end{equation} | |
| 18 | +with heteroskedasticity-robust (HC1) standard errors \citep{white1980heteroskedasticity}. All variables are winsorized at the 1st and 99th percentiles and standardized. Robustness uses Newey-West HAC(5) \citep{newey1987simple}, double-clustered (ticker $+$ date) standard errors \citep{cameron2011robust,petersen2009estimating}, Fama-MacBeth cross-sectional regressions, quantile regressions \citep{koenker1978regression}, rank-based information coefficients, decile sorts, leave-one-year-out estimation, and a within-ticker permutation placebo. | |
| 19 | + | |
| 20 | +For economic significance, I construct daily-rebalanced equal-weighted quintile portfolios by cross-sectional sorting on each option-implied variable and evaluate annualized Sharpe ratios. | |
| 21 | + | |
| 22 | +\subsection{RV Forecasting (RQ2)} | |
| 23 | + | |
| 24 | +I compare five nested models for $RV_{t+1}$: | |
| 25 | +\begin{align} | |
| 26 | + \text{GARCH proxy:}\quad & RV_{t+1} = \alpha + \beta_1\,RV_t + \beta_2\,r_t^2 + \varepsilon_{t+1} \label{eq:garch} \\ | |
| 27 | + \text{HAR-RV:}\quad & RV_{t+1} = \alpha + \beta_d\,RV_t + \beta_w\,RV_t^{(w)} + \beta_m\,RV_t^{(m)} + \varepsilon_{t+1} \label{eq:har} | |
| 28 | +\end{align} | |
| 29 | +with IV-only, IV-surface, and HAR-RV~$+$~IV-surface extensions. Out-of-sample evaluation uses rolling windows (500~training, 250~test) with MSE, MAE, $R^2_{OOS}$, and QLIKE loss. Model comparison uses the \citet{diebold1995comparing} test. | |
| 30 | + | |
| 31 | +\subsection{Implied Correlation (RQ3)} | |
| 32 | + | |
| 33 | +Following the CBOE methodology: | |
| 34 | +\begin{equation}\label{eq:implcorr} | |
| 35 | + \hat{\rho}_{impl,t} | |
| 36 | + = \frac{\sigma_{SPX,t}^{2} - n^{-1}\,\overline{\sigma_{i,t}^{2}}} | |
| 37 | + {\bigl(1 - n^{-1}\bigr)\,\bar{\sigma}_{i,t}^{2}}, | |
| 38 | +\end{equation} | |
| 39 | +where $\sigma_{SPX,t}$ is 30-day ATM IV of SPX, $\overline{\sigma_{i,t}^{2}}$ is the mean squared ATM IV of 30 constituents, and $\bar{\sigma}_{i,t}$ is the mean ATM IV. Realized correlation uses the 22-day rolling pairwise matrix. Stress is defined as VIX $> 25$ or 5-day VIX change $> 20\%$. | |
| 40 | + | |
| 41 | +\subsection{Greeks Information Decay and Price Magnets (RQ4)} | |
| 42 | + | |
| 43 | +I partition options into six DTE buckets (1w, 2w, 1m, 2m, 3m, 6m) and estimate predictive regressions within each. For the price magnet test: | |
| 44 | +\begin{equation}\label{eq:magnet} | |
| 45 | + \mathrm{Magnet}_{i,t} = \mathbf{1}\!\Bigl[\, | |
| 46 | + \frac{|P_{close,t} - K_t^{*}|}{P_{close,t}} | |
| 47 | + < | |
| 48 | + \frac{|P_{open,t} - K_t^{*}|}{P_{open,t}} | |
| 49 | + \Bigr], | |
| 50 | +\end{equation} | |
| 51 | +where $K_t^{*}$ is the max-OI strike. Under the null, $\Pr(\mathrm{Magnet}=1) = 0.5$. | |
| 52 | + | |
| 53 | +\subsection{Machine Learning (RQ5)} | |
| 54 | + | |
| 55 | +I construct 21 daily features from the SPX surface (listed in Appendix~\ref{app:features}) and train Random Forest (200~trees, max depth~10) and Gradient Boosting (200~trees, learning rate~0.05) on 2010--2019, testing on 2020--2025. The benchmark is $\widehat{RV}_t^{VIX} = (VIX_t/100)^2 / 252$. | |
| 56 | + | |
| 57 | +\subsection{Granger Causality and VAR} | |
| 58 | + | |
| 59 | +Bivariate Granger $F$-tests (5~lags) estimated per ticker. Bivariate VAR(5) models yield impulse response functions (IRFs) and forecast error variance decomposition (FEVD). | |
added
paper/sections/results.tex
+215 −0
@@ -0,0 +1,215 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% ============================================================================ | |
| 6 | +% Results | |
| 7 | +% ============================================================================ | |
| 8 | +\section{Results}\label{sec:results} | |
| 9 | + | |
| 10 | +\subsection{RQ1: Return Predictability} | |
| 11 | + | |
| 12 | +\subsubsection{Panel Regressions} | |
| 13 | + | |
| 14 | +Table~\ref{tab:rq1} reports pooled OLS results. Predictive power is dramatically stronger at the 5-day horizon: $R^2$ increases from 0.08\% (stocks, 1-day) to 4.8\% (stocks, 5-day), 12.4\% (ETFs), and 19.3\% (indices). | |
| 15 | + | |
| 16 | +\begin{table}[H] | |
| 17 | +\centering | |
| 18 | +\caption{Return predictability: pooled OLS panel regressions.} | |
| 19 | +\label{tab:rq1} | |
| 20 | +\begin{threeparttable} | |
| 21 | +\begin{tabular}{@{}ld{1.4}d{1.4}d{1.4}d{1.4}d{1.4}d{1.4}@{}} | |
| 22 | +\toprule | |
| 23 | +& \multicolumn{3}{c}{1-Day return} & \multicolumn{3}{c}{5-Day return} \\ | |
| 24 | +\cmidrule(lr){2-4}\cmidrule(lr){5-7} | |
| 25 | +& \multicolumn{1}{c}{Stocks} & \multicolumn{1}{c}{ETFs} & \multicolumn{1}{c}{Idx} & \multicolumn{1}{c}{Stocks} & \multicolumn{1}{c}{ETFs} & \multicolumn{1}{c}{Idx} \\ | |
| 26 | +\midrule | |
| 27 | +$R^2$ & 0.0008 & 0.0014 & 0.0043 & 0.0476 & 0.1242 & 0.1930 \\ | |
| 28 | +Adj.\ $R^2$ & 0.0007 & 0.0011 & 0.0032 & 0.0475 & 0.1239 & 0.1921 \\ | |
| 29 | +$N$ & 79943 & 30152 & 8986 & 79943 & 30152 & 8986 \\ | |
| 30 | +\# sig.\ (5\%) & 2 & 2 & 0 & 7 & 9 & 9 \\ | |
| 31 | +\bottomrule | |
| 32 | +\end{tabular} | |
| 33 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 34 | +\item \textit{Notes.} Ten predictors: $IV_{ATM,30d}$, IV term slope, skew$_{25\delta}$, implied skewness, implied kurtosis, PC vol.\ ratio, PC OI ratio, net gamma exposure, $RV_t$, $RV_t^{(w)}$. HC1 standard errors. All variables winsorized at 1\%/99\% and standardized. | |
| 35 | +\end{tablenotes} | |
| 36 | +\end{threeparttable} | |
| 37 | +\end{table} | |
| 38 | + | |
| 39 | +\subsubsection{Portfolio Sorts} | |
| 40 | + | |
| 41 | +Table~\ref{tab:sorts} reports quintile long-short portfolio performance for 5-day stock returns. The implied kurtosis sort delivers an annualized Sharpe of 2.33 ($t=19.84$). Sorting on the put-call volume ratio yields Sharpe $=-2.48$: stocks with the highest put-call ratio (bearish sentiment) earn the lowest future returns. | |
| 42 | + | |
| 43 | +\begin{table}[H] | |
| 44 | +\centering | |
| 45 | +\caption{Long-short portfolio performance (Q5$-$Q1, 5-day returns).} | |
| 46 | +\label{tab:sorts} | |
| 47 | +\begin{threeparttable} | |
| 48 | +\begin{tabular}{@{}ld{2.2}d{2.2}d{1.3}d{2.3}r@{}} | |
| 49 | +\toprule | |
| 50 | +Sorting variable & \multicolumn{1}{c}{\shortstack{Ann.\\ret.\,(\%)}} & \multicolumn{1}{c}{\shortstack{Ann.\\vol.\,(\%)}} & \multicolumn{1}{c}{Sharpe} & \multicolumn{1}{c}{$t$-stat} & $N_{days}$ \\ | |
| 51 | +\midrule | |
| 52 | +Implied kurtosis & 44.04 & 18.91 & 2.328 & 19.843 & 3,777 \\ | |
| 53 | +IV term slope & 11.33 & 20.30 & 0.558 & 4.004 & 2,676 \\ | |
| 54 | +PC OI ratio & 5.27 & 13.27 & 0.397 & 3.492 & 4,024 \\[3pt] | |
| 55 | +ATM IV (30d) & -1.76 & 26.13 & -0.067 & -0.575 & 3,777 \\ | |
| 56 | +Implied skewness & -9.91 & 18.81 & -0.527 & -4.493 & 3,777 \\ | |
| 57 | +Put-call vol.\ ratio & -30.29 & 12.22 & -2.478 & -21.796 & 4,024 \\ | |
| 58 | +Skew$_{25\delta}$ & -37.53 & 20.10 & -1.868 & -15.918 & 3,778 \\ | |
| 59 | +\bottomrule | |
| 60 | +\end{tabular} | |
| 61 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 62 | +\item \textit{Notes.} Equal-weighted quintile portfolios formed each trading day. Returns are 5-day (weekly). Annualization uses $\sqrt{52}$. $t$-statistics test $H_0$: mean daily L/S return~$=0$. | |
| 63 | +\end{tablenotes} | |
| 64 | +\end{threeparttable} | |
| 65 | +\end{table} | |
| 66 | + | |
| 67 | +\subsubsection{Double Sorts} | |
| 68 | + | |
| 69 | +Table~\ref{tab:dsort} shows a $3\times 3$ sort on ATM~IV and implied skewness. Among high-IV stocks, those with high skewness earn $-47.8$~bps/week ($t=-6.17$), while those with low skewness earn $+41.8$~bps/week ($t=13.12$). The information content of skewness is amplified in high-uncertainty environments. | |
| 70 | + | |
| 71 | +\begin{table}[H] | |
| 72 | +\centering | |
| 73 | +\caption{Double sort: ATM\,IV $\times$ implied skewness $\to$ 5-day returns (bps/week).} | |
| 74 | +\label{tab:dsort} | |
| 75 | +\begin{threeparttable} | |
| 76 | +\begin{tabular}{@{}ld{2.2}d{2.2}d{2.2}@{}} | |
| 77 | +\toprule | |
| 78 | +& \multicolumn{1}{c}{Low skew} & \multicolumn{1}{c}{Med.} & \multicolumn{1}{c}{High skew} \\ | |
| 79 | +\midrule | |
| 80 | +Low IV & 8.15 & 24.12 & 35.90 \\ | |
| 81 | +Medium IV & 22.11 & 23.80 & 15.62 \\ | |
| 82 | +High IV & 41.76 & 2.72 & -47.82 \\ | |
| 83 | +\midrule | |
| 84 | +\textit{High$-$Low IV} & \textit{33.61} & \textit{$-$21.40} & \textit{$-$83.72} \\ | |
| 85 | +\bottomrule | |
| 86 | +\end{tabular} | |
| 87 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 88 | +\item \textit{Notes.} Tercile breakpoints computed cross-sectionally each day. | |
| 89 | +\end{tablenotes} | |
| 90 | +\end{threeparttable} | |
| 91 | +\end{table} | |
| 92 | + | |
| 93 | + | |
| 94 | +\subsection{RQ2: IV Surface vs.\ HAR-RV} | |
| 95 | + | |
| 96 | +Table~\ref{tab:rq2} reports in-sample $R^2$. The combined HAR-RV\,$+$\,IV-surface model achieves $R^2=0.442$ for 1-day~RV, a 23.3\% improvement over HAR-RV (0.359). The IV-only model ($R^2=0.390$) outperforms HAR-RV at the daily horizon. | |
| 97 | + | |
| 98 | +\begin{table}[H] | |
| 99 | +\centering | |
| 100 | +\caption{In-sample $R^2$: realized variance forecasting models.} | |
| 101 | +\label{tab:rq2} | |
| 102 | +\begin{threeparttable} | |
| 103 | +\begin{tabular}{@{}ld{1.3}d{1.3}r@{}} | |
| 104 | +\toprule | |
| 105 | +Model & \multicolumn{1}{c}{1-Day RV} & \multicolumn{1}{c}{5-Day RV} & \multicolumn{1}{c}{$N$} \\ | |
| 106 | +\midrule | |
| 107 | +GARCH proxy & 0.326 & 0.648 & 264,380 \\ | |
| 108 | +HAR-RV & 0.359 & 0.888 & 264,345 \\ | |
| 109 | +IV only & 0.390 & 0.495 & 120,280 \\ | |
| 110 | +IV surface & 0.391 & 0.496 & 119,093 \\ | |
| 111 | +HAR-RV $+$ IV surface & 0.442 & 0.896 & 119,093 \\ | |
| 112 | +\bottomrule | |
| 113 | +\end{tabular} | |
| 114 | +\end{threeparttable} | |
| 115 | +\end{table} | |
| 116 | + | |
| 117 | +Diebold-Mariano tests show statistically significant MSE improvements for AAPL ($+10.3\%$, DM\,$=2.54$), AMD ($+11.7\%$, DM\,$=3.13$), CAT ($+32.7\%$, DM\,$=4.27$), and COST ($+24.4\%$, DM\,$=2.94$). | |
| 118 | + | |
| 119 | + | |
| 120 | +\subsection{RQ3: Implied Correlation and Stress Prediction} | |
| 121 | + | |
| 122 | +Table~\ref{tab:rq3} shows that the correlation \textit{ratio} ($\hat{\rho}_{impl}/\hat{\rho}_{real}$) significantly predicts stress at all horizons ($t$: 3.91--8.30). The raw divergence is not significant; the multiplicative form captures the signal. Appendix~\ref{app:crises} details the behavior of the implied-correlation index around nine major market events. | |
| 123 | + | |
| 124 | +\begin{table}[H] | |
| 125 | +\centering | |
| 126 | +\caption{Stress prediction: linear probability model ($t$-statistics).} | |
| 127 | +\label{tab:rq3} | |
| 128 | +\begin{threeparttable} | |
| 129 | +\begin{tabular}{@{}ld{2.2}d{2.2}d{2.2}@{}} | |
| 130 | +\toprule | |
| 131 | +Predictor & \multicolumn{1}{c}{5-Day} & \multicolumn{1}{c}{10-Day} & \multicolumn{1}{c}{20-Day} \\ | |
| 132 | +\midrule | |
| 133 | +Corr.\ ratio ($\hat{\rho}_{impl}/\hat{\rho}_{real}$) & 4.07\sym{***} & 8.30\sym{***} & 3.91\sym{***} \\ | |
| 134 | +SPX ATM IV & -2.23\sym{**} & -4.07\sym{***} & -7.30\sym{***} \\ | |
| 135 | +VIX level & 5.27\sym{***} & 6.69\sym{***} & 9.56\sym{***} \\ | |
| 136 | +Corr.\ divergence & 0.00 & 0.00 & 0.00 \\ | |
| 137 | +\midrule | |
| 138 | +$R^2$ & 0.228 & 0.156 & 0.088 \\ | |
| 139 | +$N$ & 2486 & 2481 & 2471 \\ | |
| 140 | +\bottomrule | |
| 141 | +\end{tabular} | |
| 142 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 143 | +\item \textit{Notes.} HC1 standard errors. \sym{***}$p<0.01$; \sym{**}$p<0.05$. | |
| 144 | +\end{tablenotes} | |
| 145 | +\end{threeparttable} | |
| 146 | +\end{table} | |
| 147 | + | |
| 148 | + | |
| 149 | +\subsection{RQ4: Greeks Information Decay and Price Magnets} | |
| 150 | + | |
| 151 | +The information content of Greeks for RV forecasting increases monotonically with DTE: $R^2$ rises from 3.8\% (1-week) to 9.5\% (3-month), then declines slightly to 8.2\% (6-month). Return predictability is negligible across all buckets ($R^2<0.2\%$). | |
| 152 | + | |
| 153 | +For the price magnet analysis, prices moved toward the max-OI strike in only 47.0\% of 10,480 cases---below the 50\% null. The OI concentration coefficient is not significant ($t=1.06$), contradicting the ``max pain'' narrative. | |
| 154 | + | |
| 155 | + | |
| 156 | +\subsection{RQ5: ML Models for SPX RV} | |
| 157 | + | |
| 158 | +Table~\ref{tab:rq5} reports the out-of-sample comparison. OLS HAR-RV dominates at every horizon ($R^2_{OOS}$: 0.437, 0.948, 0.994). ML models underperform (RF: 0.143; GBM: 0.095 for 1-day). RF feature importance shows that 2-week ATM~IV accounts for 50.8\% of total importance; the full ranking is reported in Appendix~\ref{app:importance}. | |
| 159 | + | |
| 160 | +\begin{table}[H] | |
| 161 | +\centering | |
| 162 | +\caption{Out-of-sample SPX realized variance forecasting (2020--2025).} | |
| 163 | +\label{tab:rq5} | |
| 164 | +\begin{threeparttable} | |
| 165 | +\begin{tabular}{@{}lld{4.3}d{2.3}d{1.3}@{}} | |
| 166 | +\toprule | |
| 167 | +Model & Target & \multicolumn{1}{c}{MSE\,$(\times10^7)$} & \multicolumn{1}{c}{MAE\,$(\times10^4)$} & \multicolumn{1}{c}{$R^2_{OOS}$} \\ | |
| 168 | +\midrule | |
| 169 | +VIX benchmark & 1-Day & 1.835 & 1.371 & 0.336 \\ | |
| 170 | +OLS: HAR-RV & 1-Day & 1.556 & 1.018 & 0.437 \\ | |
| 171 | +Random Forest & 1-Day & 2.368 & 1.148 & 0.143 \\ | |
| 172 | +Gradient Boosting & 1-Day & 2.501 & 1.282 & 0.095 \\ | |
| 173 | +\midrule | |
| 174 | +VIX benchmark & 5-Day & 18.870 & 5.425 & 0.597 \\ | |
| 175 | +OLS: HAR-RV & 5-Day & 2.452 & 1.431 & 0.948 \\ | |
| 176 | +\midrule | |
| 177 | +VIX benchmark & 22-Day & 211.1 & 21.61 & 0.618 \\ | |
| 178 | +OLS: HAR-RV & 22-Day & 3.518 & 1.709 & 0.994 \\ | |
| 179 | +\bottomrule | |
| 180 | +\end{tabular} | |
| 181 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 182 | +\item \textit{Notes.} Training: 2010--2019 (2,515 days). Test: 2020--2025 (1,507 days). | |
| 183 | +\end{tablenotes} | |
| 184 | +\end{threeparttable} | |
| 185 | +\end{table} | |
| 186 | + | |
| 187 | + | |
| 188 | +\subsection{Granger Causality and VAR Analysis} | |
| 189 | + | |
| 190 | +Table~\ref{tab:granger} reports the Granger causality results. ATM~IV strongly Granger-causes RV ($F=62.4$, significant in 100\% of tickers). Returns Granger-cause skew ($F=13.6$, 95.7\%), indicating asymmetric volatility feedback. | |
| 191 | + | |
| 192 | +\begin{table}[H] | |
| 193 | +\centering | |
| 194 | +\caption{Granger causality tests (5 lags).} | |
| 195 | +\label{tab:granger} | |
| 196 | +\begin{threeparttable} | |
| 197 | +\begin{tabular}{@{}ld{2.3}d{1.4}d{2.1}@{}} | |
| 198 | +\toprule | |
| 199 | +Hypothesis & \multicolumn{1}{c}{Avg.\ $F$} & \multicolumn{1}{c}{Avg.\ $p$} & \multicolumn{1}{c}{\% sig.} \\ | |
| 200 | +\midrule | |
| 201 | +ATM IV $\to$ RV & 62.381 & 0.0000 & 100.0 \\ | |
| 202 | +RV $\to$ ATM IV & 17.933 & 0.1501 & 60.9 \\ | |
| 203 | +Skew $\to$ RV & 20.792 & 0.0177 & 94.2 \\ | |
| 204 | +Return $\to$ Skew & 13.576 & 0.0133 & 95.7 \\ | |
| 205 | +ATM IV $\to$ Return & 1.799 & 0.2688 & 24.6 \\ | |
| 206 | +PC ratio $\to$ Return & 1.010 & 0.4999 & 5.8 \\ | |
| 207 | +\bottomrule | |
| 208 | +\end{tabular} | |
| 209 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 210 | +\item \textit{Notes.} Per-ticker bivariate $F$-tests. \% sig.\ is the share of tickers rejecting the null at 5\%. | |
| 211 | +\end{tablenotes} | |
| 212 | +\end{threeparttable} | |
| 213 | +\end{table} | |
| 214 | + | |
| 215 | +The bivariate VAR(5) impulse response shows that a one-SD shock to ATM~IV produces a cumulative RV response of 0.67~SD at horizon~2, decaying to 0.27~SD at horizon~20. The forecast error variance decomposition reveals that IV shocks explain an increasing share of RV forecast error variance, reaching \textbf{73.8\%} at the 20-day horizon (Appendix~\ref{app:fevd}). | |
added
paper/sections/robustness.tex
+221 −0
@@ -0,0 +1,221 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% ============================================================================ | |
| 6 | +% Robustness | |
| 7 | +% ============================================================================ | |
| 8 | +\section{Robustness}\label{sec:robust} | |
| 9 | + | |
| 10 | +\subsection{Alternative Standard Errors} | |
| 11 | + | |
| 12 | +Table~\ref{tab:robust_se} compares inference for the 5-day return regression under three SE specifications \citep{white1980heteroskedasticity,newey1987simple,cameron2011robust}; \citet{petersen2009estimating} shows that two-way clustering is the most conservative choice for finance panels of this type. Of the ten predictors, nine remain significant at 5\% under Newey-West HAC(5), and eight under double-clustered (ticker\,$+$\,date) SEs. Implied skewness ($t_{DC}=-4.94$), implied kurtosis ($t_{DC}=9.02$), PC volume ratio ($t_{DC}=-7.96$), and net gamma ($t_{DC}=5.39$) remain highly significant under all specifications. | |
| 13 | + | |
| 14 | +\begin{table}[H] | |
| 15 | +\centering | |
| 16 | +\caption{Robustness of 5-day return predictability to SE specification.} | |
| 17 | +\label{tab:robust_se} | |
| 18 | +\begin{threeparttable} | |
| 19 | +\begin{tabular}{@{}ld{2.2}d{2.2}d{2.2}@{}} | |
| 20 | +\toprule | |
| 21 | +Variable & \multicolumn{1}{c}{HC1} & \multicolumn{1}{c}{NW(5)} & \multicolumn{1}{c}{DC} \\ | |
| 22 | +\midrule | |
| 23 | +$IV_{ATM,30d}$ & 3.86\sym{***} & 3.32\sym{***} & 1.40 \\ | |
| 24 | +IV term slope & 4.83\sym{***} & 4.59\sym{***} & 2.12\sym{**} \\ | |
| 25 | +Skew$_{25\delta}$ & -2.03\sym{**} & -0.93 & -0.39 \\ | |
| 26 | +Implied skewness & -15.19\sym{***}& -13.66\sym{***}& -4.94\sym{***} \\ | |
| 27 | +Implied kurtosis & 25.87\sym{***}& 25.64\sym{***}& 9.02\sym{***} \\ | |
| 28 | +PC vol.\ ratio & -13.72\sym{***}& -16.69\sym{***}& -7.96\sym{***} \\ | |
| 29 | +PC OI ratio & 12.33\sym{***}& 13.12\sym{***}& 4.61\sym{***} \\ | |
| 30 | +Net gamma exp. & 15.55\sym{***}& 17.83\sym{***}& 5.39\sym{***} \\ | |
| 31 | +$RV_{daily}$ & -17.18\sym{***}& -17.87\sym{***}& -7.27\sym{***} \\ | |
| 32 | +$RV_{weekly}$ & 10.10\sym{***}& 7.95\sym{***}& 3.53\sym{***} \\ | |
| 33 | +\bottomrule | |
| 34 | +\end{tabular} | |
| 35 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 36 | +\item \textit{Notes.} NW(5) = Newey-West with 5 lags. DC = double-clustered by ticker and date following \citet{cameron2011robust}. \sym{***}$p<0.01$; \sym{**}$p<0.05$. | |
| 37 | +\end{tablenotes} | |
| 38 | +\end{threeparttable} | |
| 39 | +\end{table} | |
| 40 | + | |
| 41 | +\subsection{Subperiod Stability} | |
| 42 | + | |
| 43 | +Table~\ref{tab:subperiod} shows that both return predictability and the HAR+IV improvement are stable across nine subperiods. The 5-day return $R^2$ ranges from 3.1\% (post-GFC) to 14.4\% (COVID). The HAR+IV improvement over HAR-RV is positive in eight of nine subperiods, peaking at $+35.5\%$ during the low-vol era (2017--18) and $+34.4\%$ during the recovery (2023--24). | |
| 44 | + | |
| 45 | +\begin{table}[H] | |
| 46 | +\centering | |
| 47 | +\caption{Subperiod stability.} | |
| 48 | +\label{tab:subperiod} | |
| 49 | +\begin{threeparttable} | |
| 50 | +\small | |
| 51 | +\begin{tabular}{@{}ld{1.3}d{1.3}d{1.3}d{2.1}@{}} | |
| 52 | +\toprule | |
| 53 | +Subperiod & \multicolumn{1}{c}{\shortstack{5D ret\\$R^2$}} & \multicolumn{1}{c}{\shortstack{HAR-RV\\$R^2$}} & \multicolumn{1}{c}{\shortstack{HAR+IV\\$R^2$}} & \multicolumn{1}{c}{$\Delta R^2\,(\%)$} \\ | |
| 54 | +\midrule | |
| 55 | +Post-GFC (2010--12) & 0.031 & 0.344 & 0.392 & +14.0 \\ | |
| 56 | +Bull (2013--16) & 0.075 & 0.342 & 0.336 & -1.7 \\ | |
| 57 | +Low vol (2017--18) & 0.136 & 0.309 & 0.419 & +35.5 \\ | |
| 58 | +Pre-COVID (2019) & 0.080 & 0.280 & 0.363 & +29.9 \\ | |
| 59 | +COVID (2020) & 0.144 & 0.604 & 0.721 & +19.4 \\ | |
| 60 | +Post-COVID (2021) & 0.036 & 0.376 & 0.440 & +16.9 \\ | |
| 61 | +Rate hike (2022) & 0.084 & 0.387 & 0.471 & +21.8 \\ | |
| 62 | +Recovery (2023--24) & 0.052 & 0.290 & 0.390 & +34.4 \\ | |
| 63 | +Recent (2025) & 0.037 & 0.321 & 0.402 & +25.2 \\ | |
| 64 | +\bottomrule | |
| 65 | +\end{tabular} | |
| 66 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 67 | +\item \textit{Notes.} $\Delta R^2 = (R^2_{HAR+IV} - R^2_{HAR}) / R^2_{HAR} \times 100$. | |
| 68 | +\end{tablenotes} | |
| 69 | +\end{threeparttable} | |
| 70 | +\end{table} | |
| 71 | + | |
| 72 | +\subsection{VIX Regime Conditioning} | |
| 73 | + | |
| 74 | +Table~\ref{tab:vix_regime} shows that predictability increases with VIX level. The 5-day return $R^2$ rises from 2.7\% (VIX\,$<$\,15) to 19.8\% (VIX\,$>$\,35). Option-implied information is most valuable in high-uncertainty environments. | |
| 75 | + | |
| 76 | +\begin{table}[H] | |
| 77 | +\centering | |
| 78 | +\caption{Predictability by VIX regime.} | |
| 79 | +\label{tab:vix_regime} | |
| 80 | +\begin{threeparttable} | |
| 81 | +\begin{tabular}{@{}ld{1.3}d{1.3}d{2.1}r@{}} | |
| 82 | +\toprule | |
| 83 | +VIX regime & \multicolumn{1}{c}{\shortstack{5D ret\\$R^2$}} & \multicolumn{1}{c}{\shortstack{HAR+IV\\$R^2$ (RV)}} & \multicolumn{1}{c}{\shortstack{Pct.\ of\\sample (\%)}} & $N$ \\ | |
| 84 | +\midrule | |
| 85 | +Very low ($<$15) & 0.027 & 0.359 & 35.7 & 43,971 \\ | |
| 86 | +Low (15--20) & 0.040 & 0.341 & 35.0 & 40,221 \\ | |
| 87 | +Medium (20--25) & 0.073 & 0.394 & 15.8 & 19,210 \\ | |
| 88 | +High (25--35) & 0.080 & 0.385 & 11.0 & 13,139 \\ | |
| 89 | +Crisis ($>$35) & 0.198 & 0.618 & 2.5 & 2,540 \\ | |
| 90 | +\bottomrule | |
| 91 | +\end{tabular} | |
| 92 | +\end{threeparttable} | |
| 93 | +\end{table} | |
| 94 | + | |
| 95 | +\subsection{Additional Controls, Quantile Regressions, and Ticker-Level Analysis} | |
| 96 | + | |
| 97 | +Adding controls (log volume, log OI, lagged returns) increases 5-day return $R^2$ from 5.3\% to 5.6\%; all core predictors retain significance. Quantile regressions at $\tau \in \{0.10, 0.25, 0.50, 0.75, 0.90\}$ \citep{koenker1978regression} show that the implied kurtosis and put-call ratio coefficients retain a stable sign and magnitude across the entire conditional return distribution. | |
| 98 | + | |
| 99 | +The distribution of ticker-level $R^2$ values for 5-day returns has mean 5.9\%, median 4.7\%, and interquartile range [2.0\%, 8.2\%], confirming that panel results are not driven by outliers. | |
| 100 | + | |
| 101 | +Rolling-window (252-day) analysis yields average $R^2$ of 8.0\% (std.\ 4.5\%, range [2.1\%, 17.9\%]) for 5-day returns and 41.2\% (std.\ 10.7\%) for 1-day RV forecasting. | |
| 102 | + | |
| 103 | +\subsection{Estimator and Specification Sensitivity} | |
| 104 | + | |
| 105 | +Two implementation choices could mechanically drive the baseline results: the winsorization cutoff and the HAC lag length. Table~\ref{tab:winsor} shows that neither does. Predictability rises modestly with heavier trimming---from $R^2 = 5.1\%$ at 0.5\% cutoffs to 6.2\% at 5\% cutoffs---because winsorization suppresses noise in the extreme tails, and even wholly unwinsorized data leave the key predictors highly significant ($t_{kurt} = 13.8$). Lengthening the Newey-West window from 5 to 22 lags \citep{newey1987simple}, enough to absorb the full overlap of the 5-day return plus a trading month, barely moves the $t$-statistics: implied kurtosis declines only from 25.6 to 22.1, and the set of significant predictors (9 of 10) is unchanged at every lag length. | |
| 106 | + | |
| 107 | +\begin{table}[H] | |
| 108 | +\centering | |
| 109 | +\caption{Winsorization and HAC-lag sensitivity (5-day returns).} | |
| 110 | +\label{tab:winsor} | |
| 111 | +\begin{threeparttable} | |
| 112 | +\small | |
| 113 | +\begin{tabular}{@{}ld{1.3}d{2.2}d{3.2}r@{\hskip 2em}ld{2.2}@{}} | |
| 114 | +\toprule | |
| 115 | +\multicolumn{5}{c}{Panel A: winsorization cutoff} & \multicolumn{2}{c}{Panel B: NW lags} \\ | |
| 116 | +\cmidrule(r){1-5}\cmidrule(l){6-7} | |
| 117 | +Cutoff & \multicolumn{1}{c}{$R^2$} & \multicolumn{1}{c}{$t_{kurt}$} & \multicolumn{1}{c}{$t_{PC}$} & \multicolumn{1}{c}{\#sig.} & Lags & \multicolumn{1}{c}{$t_{kurt}$} \\ | |
| 118 | +\midrule | |
| 119 | +None & 0.034 & 13.76 & -3.59 & 8/10 & NW(5) & 25.64 \\ | |
| 120 | +0.5\% & 0.051 & 36.51 & -21.31 & 10/10 & NW(10) & 23.89 \\ | |
| 121 | +1\% (baseline) & 0.053 & 40.07 & -21.48 & 9/10 & NW(22) & 22.09 \\ | |
| 122 | +2.5\% & 0.058 & 43.66 & -21.32 & 9/10 & & \\ | |
| 123 | +5\% & 0.062 & 45.73 & -20.86 & 9/10 & & \\ | |
| 124 | +\bottomrule | |
| 125 | +\end{tabular} | |
| 126 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 127 | +\item \textit{Notes.} Panel A: pooled 5-day return regression (all 69 tickers) with HC1 $t$-statistics under alternative symmetric winsorization cutoffs. $t_{kurt}$ and $t_{PC}$ refer to implied kurtosis and the put-call volume ratio. \#sig.\ counts predictors significant at 5\%. Panel B: Newey-West $t$-statistic of implied kurtosis at alternative lag lengths (baseline data treatment). | |
| 128 | +\end{tablenotes} | |
| 129 | +\end{threeparttable} | |
| 130 | +\end{table} | |
| 131 | + | |
| 132 | +\subsection{Rank-Based Information Coefficients} | |
| 133 | + | |
| 134 | +Parametric regressions may be sensitive to outliers and functional form even after winsorization. As a fully nonparametric check, I compute daily cross-sectional Spearman information coefficients (ICs)---the rank correlation between each predictor and the subsequent 5-day stock return---and test whether the time-series mean IC differs from zero. Table~\ref{tab:ic} confirms the regression evidence. Implied kurtosis carries a mean IC of $+0.098$ ($t = 16.8$), positive on 64.3\% of the 4{,}024 trading days; the put-call volume ratio ($-0.059$, $t = -13.8$) and the 25$\delta$ skew ($-0.056$, $t = -9.7$) are reliably negative. At the 1-day horizon no predictor achieves a mean IC above 0.02 in absolute value, mirroring the near-zero daily $R^2$ of Section~\ref{sec:results}. | |
| 135 | + | |
| 136 | +\begin{table}[H] | |
| 137 | +\centering | |
| 138 | +\caption{Daily cross-sectional Spearman information coefficients (stocks, 5-day returns).} | |
| 139 | +\label{tab:ic} | |
| 140 | +\begin{threeparttable} | |
| 141 | +\begin{tabular}{@{}ld{1.4}d{3.2}d{2.1}@{}} | |
| 142 | +\toprule | |
| 143 | +Predictor & \multicolumn{1}{c}{Mean IC} & \multicolumn{1}{c}{$t$-stat} & \multicolumn{1}{c}{\% days $>0$} \\ | |
| 144 | +\midrule | |
| 145 | +Net gamma exposure & 0.1702 & 33.99 & 77.8 \\ | |
| 146 | +Implied kurtosis & 0.0978 & 16.77 & 64.3 \\ | |
| 147 | +IV term slope & 0.0328 & 6.30 & 54.6 \\ | |
| 148 | +PC OI ratio & 0.0170 & 3.63 & 52.4 \\ | |
| 149 | +$RV_{daily}$ & 0.0161 & 2.41 & 52.7 \\ | |
| 150 | +$RV_{weekly}$ & 0.0120 & 1.73 & 51.2 \\ | |
| 151 | +$IV_{ATM,30d}$ & 0.0085 & 1.09 & 53.0 \\ | |
| 152 | +Implied skewness & -0.0188 & -3.30 & 47.4 \\ | |
| 153 | +Skew$_{25\delta}$ & -0.0558 & -9.66 & 41.9 \\ | |
| 154 | +PC vol.\ ratio & -0.0591 & -13.81 & 37.2 \\ | |
| 155 | +\bottomrule | |
| 156 | +\end{tabular} | |
| 157 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 158 | +\item \textit{Notes.} For each trading day with at least 20 stocks, the Spearman rank correlation between the predictor and the 5-day forward return is computed across stocks; the table reports the time-series mean, its Fama-MacBeth-style $t$-statistic, and the share of days with a positive IC ($N = 4{,}024$ days maximum). | |
| 159 | +\end{tablenotes} | |
| 160 | +\end{threeparttable} | |
| 161 | +\end{table} | |
| 162 | + | |
| 163 | +\subsection{Decile Sorts} | |
| 164 | + | |
| 165 | +The baseline quintile sorts could mask nonlinearity in the extreme tails of the sorting variables \citep{fama2008dissecting}. Table~\ref{tab:decile} repeats the three strongest sorts with decile portfolios. Sharpening the sort raises the spread in annualized returns---implied kurtosis rises from 44.0\% to 52.1\%, and the 25$\delta$ skew from $-37.5\%$ to $-52.5\%$---while Sharpe ratios remain essentially unchanged (2.33 vs.\ 2.19 for kurtosis), since the finer portfolios are noisier. The premia are therefore monotone rather than driven by a single extreme quintile. | |
| 166 | + | |
| 167 | +\begin{table}[H] | |
| 168 | +\centering | |
| 169 | +\caption{Quintile vs.\ decile long-short sorts (5-day returns).} | |
| 170 | +\label{tab:decile} | |
| 171 | +\begin{threeparttable} | |
| 172 | +\begin{tabular}{@{}lld{3.2}d{1.3}d{3.2}@{}} | |
| 173 | +\toprule | |
| 174 | +Sorting variable & Scheme & \multicolumn{1}{c}{Ann.\ ret.\ (\%)} & \multicolumn{1}{c}{Sharpe} & \multicolumn{1}{c}{$t$-stat} \\ | |
| 175 | +\midrule | |
| 176 | +Implied kurtosis & Q5$-$Q1 & 44.04 & 2.328 & 19.84 \\ | |
| 177 | + & D10$-$D1 & 52.08 & 2.185 & 18.56 \\[3pt] | |
| 178 | +Put-call vol.\ ratio & Q5$-$Q1 & -30.29 & -2.478 & -21.80 \\ | |
| 179 | + & D10$-$D1 & -33.37 & -2.099 & -18.47 \\[3pt] | |
| 180 | +Skew$_{25\delta}$ & Q5$-$Q1 & -37.53 & -1.868 & -15.92 \\ | |
| 181 | + & D10$-$D1 & -52.51 & -1.896 & -16.11 \\ | |
| 182 | +\bottomrule | |
| 183 | +\end{tabular} | |
| 184 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 185 | +\item \textit{Notes.} Equal-weighted daily-rebalanced portfolios of individual stocks; long-short is the top minus the bottom portfolio. Annualization uses $\sqrt{52}$. | |
| 186 | +\end{tablenotes} | |
| 187 | +\end{threeparttable} | |
| 188 | +\end{table} | |
| 189 | + | |
| 190 | +\subsection{Temporal Stability and a Placebo Test} | |
| 191 | + | |
| 192 | +A recurrent concern with in-sample predictability is that it is concentrated in a handful of episodes and vanishes when they are excluded \citep{welch2008comprehensive,campbell2008predicting}. Table~\ref{tab:loyo} therefore re-estimates the two headline regressions sixteen times, excluding one calendar year at a time. The 5-day return $R^2$ stays within [4.7\%, 5.7\%] regardless of which year is dropped---removing 2018 (Volmageddon) has the largest effect---and the HAR$+$IV realized-variance $R^2$ stays within [0.478, 0.492] for every exclusion except 2020, whose removal lowers it to 0.414 by taking out the COVID variance burst. No single year drives either result. | |
| 193 | + | |
| 194 | +Finally, a placebo experiment permutes the entire block of option-implied features within each ticker (preserving their cross-feature correlation while destroying their alignment with dates) and re-runs the 5-day return regression. Across ten seeded draws, the placebo $R^2$ averages 0.0008 (maximum 0.0010) against an actual $R^2$ of 0.0529---a 66-fold gap confirming that the measured predictability reflects genuine temporal information rather than mechanical panel structure. Together with $t$-statistics that comfortably clear the conservative $t > 3.0$ multiple-testing hurdle of \citet{harvey2016and} for every key predictor, these checks make a data-mining explanation of the findings implausible. | |
| 195 | + | |
| 196 | +\begin{table}[H] | |
| 197 | +\centering | |
| 198 | +\caption{Leave-one-year-out panel $R^2$.} | |
| 199 | +\label{tab:loyo} | |
| 200 | +\begin{threeparttable} | |
| 201 | +\small | |
| 202 | +\begin{tabular}{@{}ld{1.4}d{1.4}@{\hskip 2.5em}ld{1.4}d{1.4}@{}} | |
| 203 | +\toprule | |
| 204 | +Excl.\ year & \multicolumn{1}{c}{\shortstack{5D ret\\$R^2$}} & \multicolumn{1}{c}{\shortstack{HAR+IV\\$R^2$}} & | |
| 205 | +Excl.\ year & \multicolumn{1}{c}{\shortstack{5D ret\\$R^2$}} & \multicolumn{1}{c}{\shortstack{HAR+IV\\$R^2$}} \\ | |
| 206 | +\midrule | |
| 207 | +2010 & 0.0537 & 0.4852 & 2018 & 0.0469 & 0.4861 \\ | |
| 208 | +2011 & 0.0535 & 0.4810 & 2019 & 0.0540 & 0.4858 \\ | |
| 209 | +2012 & 0.0537 & 0.4831 & 2020 & 0.0505 & 0.4142 \\ | |
| 210 | +2013 & 0.0538 & 0.4800 & 2021 & 0.0557 & 0.4817 \\ | |
| 211 | +2014 & 0.0529 & 0.4833 & 2022 & 0.0500 & 0.4786 \\ | |
| 212 | +2015 & 0.0514 & 0.4922 & 2023 & 0.0532 & 0.4883 \\ | |
| 213 | +2016 & 0.0520 & 0.4844 & 2024 & 0.0572 & 0.4895 \\ | |
| 214 | +2017 & 0.0547 & 0.4839 & 2025 & 0.0573 & 0.4900 \\ | |
| 215 | +\bottomrule | |
| 216 | +\end{tabular} | |
| 217 | +\begin{tablenotes}[flushleft]\footnotesize | |
| 218 | +\item \textit{Notes.} Each row re-estimates the pooled 5-day return regression (ten predictors) and the HAR$+$IV 1-day RV regression (specification of Table~\ref{tab:subperiod}) on the full panel excluding the indicated calendar year. Full-sample baselines: 0.053 and 0.483. | |
| 219 | +\end{tablenotes} | |
| 220 | +\end{threeparttable} | |
| 221 | +\end{table} | |
added
paper/sections/titlepage.tex
+81 −0
@@ -0,0 +1,81 @@ | ||
| 1 | +% ============================================================================= | |
| 2 | +% Author: Simon-Pierre Boucher | |
| 3 | +% Contact: contact@spboucher.ai | |
| 4 | +% ============================================================================= | |
| 5 | +% ============================================================================ | |
| 6 | +% Title Page | |
| 7 | +% ============================================================================ | |
| 8 | +\thispagestyle{empty} | |
| 9 | + | |
| 10 | +\begin{center} | |
| 11 | + | |
| 12 | +% --- Logo --- | |
| 13 | +\includegraphics[width=3.5cm]{uq_logo.jpg} | |
| 14 | + | |
| 15 | +\vspace{0.6cm} | |
| 16 | + | |
| 17 | +{\footnotesize\textsc{Universit\'e du Qu\'ebec en Outaouais}}\\[0.15cm] | |
| 18 | +{\footnotesize\textsc{D\'epartement des sciences administratives}} | |
| 19 | + | |
| 20 | +\vspace{0.8cm} | |
| 21 | + | |
| 22 | +{\footnotesize\textsc{Working Paper No.~\WPnumber}} | |
| 23 | + | |
| 24 | +\vspace{1.2cm} | |
| 25 | + | |
| 26 | +% --- Title --- | |
| 27 | +{\LARGE\bfseries \WPtitle\par} | |
| 28 | + | |
| 29 | +\ifx\WPsubtitle\empty\else | |
| 30 | + \vspace{0.3cm} | |
| 31 | + {\large\itshape \WPsubtitle\par} | |
| 32 | +\fi | |
| 33 | + | |
| 34 | +\vspace{1.2cm} | |
| 35 | + | |
| 36 | +% --- Author --- | |
| 37 | +{\large \WPauthor\footnotemark[1]}\\[0.3cm] | |
| 38 | +{\normalsize\itshape \WPaffiliation} | |
| 39 | + | |
| 40 | +\footnotetext[1]{Professeur, D\'epartement des sciences administratives, Universit\'e du Qu\'ebec en Outaouais (UQO), 283 boulevard Alexandre-Tach\'e, Gatineau, QC J9A 1L8, Canada. Email: \href{mailto:\WPemail}{\WPemail}.} | |
| 41 | + | |
| 42 | +\vspace{0.8cm} | |
| 43 | + | |
| 44 | +% --- Date & Version --- | |
| 45 | +{\normalsize This version: \WPdate}\\[0.1cm] | |
| 46 | +{\small\itshape Version~\WPversion} | |
| 47 | + | |
| 48 | +\end{center} | |
| 49 | + | |
| 50 | +\vfill | |
| 51 | + | |
| 52 | +\newpage | |
| 53 | + | |
| 54 | +% ============================================================================ | |
| 55 | +% Abstract Page | |
| 56 | +% ============================================================================ | |
| 57 | +\thispagestyle{empty} | |
| 58 | + | |
| 59 | +\vspace*{1cm} | |
| 60 | + | |
| 61 | +\noindent\rule{\textwidth}{0.4pt} | |
| 62 | +\vspace{0.3cm} | |
| 63 | + | |
| 64 | +\noindent\textbf{Abstract} | |
| 65 | + | |
| 66 | +\vspace{0.15cm} | |
| 67 | + | |
| 68 | +\noindent\WPabstract | |
| 69 | + | |
| 70 | +\vspace{0.4cm} | |
| 71 | + | |
| 72 | +\noindent\textbf{Keywords:} \WPkeywords | |
| 73 | + | |
| 74 | +\vspace{0.15cm} | |
| 75 | + | |
| 76 | +\noindent\textbf{JEL Classification:} \WPjel | |
| 77 | + | |
| 78 | +\vspace{0.3cm} | |
| 79 | +\noindent\rule{\textwidth}{0.4pt} | |
| 80 | + | |
| 81 | +\newpage | |
added
paper/uq_logo.jpg
+0 −0
Binary file not shown.
added
pyproject.toml
+26 −0
@@ -0,0 +1,26 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +[build-system] | |
| 6 | +requires = ["setuptools>=68"] | |
| 7 | +build-backend = "setuptools.build_meta" | |
| 8 | + | |
| 9 | +[project] | |
| 10 | +name = "wp7" | |
| 11 | +version = "1.0.0" | |
| 12 | +description = "UQO WP7 — Options-Implied Information Content for Cross-Asset Return and Volatility Prediction" | |
| 13 | +authors = [{ name = "Simon-Pierre Boucher", email = "contact@spboucher.ai" }] | |
| 14 | +requires-python = ">=3.11" | |
| 15 | +dependencies = [ | |
| 16 | + "numpy>=2.0", | |
| 17 | + "pandas>=2.2", | |
| 18 | + "pyarrow>=15", | |
| 19 | + "scipy>=1.12", | |
| 20 | + "scikit-learn>=1.4", | |
| 21 | + "duckdb>=1.0", | |
| 22 | + "matplotlib>=3.8", | |
| 23 | +] | |
| 24 | + | |
| 25 | +[tool.setuptools.packages.find] | |
| 26 | +where = ["src"] | |
added
requirements.txt
+13 −0
@@ -0,0 +1,13 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +# Pinned to the environment used to validate the reproduction (2026-08-05). | |
| 6 | +# Python >= 3.11 recommended. | |
| 7 | +numpy==2.4.4 | |
| 8 | +pandas==3.0.2 | |
| 9 | +pyarrow==24.0.0 | |
| 10 | +scipy==1.17.1 | |
| 11 | +scikit-learn==1.6.1 | |
| 12 | +duckdb==1.5.2 | |
| 13 | +matplotlib==3.10.9 | |
added
results/descriptive_autocorrelations.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +variable,lag,avg_autocorr | |
| 2 | +iv_atm_30d,1,0.9592728365408905 | |
| 3 | +iv_atm_30d,5,0.860490448442951 | |
| 4 | +iv_atm_30d,10,0.7525586182871806 | |
| 5 | +iv_atm_30d,22,0.5376331506127137 | |
| 6 | +iv_skew_25d,1,0.8320262103395855 | |
| 7 | +iv_skew_25d,5,0.7111734826039526 | |
| 8 | +iv_skew_25d,10,0.5930315973773796 | |
| 9 | +iv_skew_25d,22,0.41602239955232856 | |
| 10 | +rv_daily,1,0.3197367267859841 | |
| 11 | +rv_daily,5,0.21094579758939003 | |
| 12 | +rv_daily,10,0.13867834780170124 | |
| 13 | +rv_daily,22,0.05726846293551011 | |
| 14 | +daily_return,1,-0.06184021467546654 | |
| 15 | +daily_return,5,-0.010432528026758989 | |
| 16 | +daily_return,10,-0.005825324552553195 | |
| 17 | +daily_return,22,-0.029889633855063914 | |
| 18 | +pc_volume_ratio,1,0.2992094150098126 | |
| 19 | +pc_volume_ratio,5,0.21816764253881243 | |
| 20 | +pc_volume_ratio,10,0.1717197805083051 | |
| 21 | +pc_volume_ratio,22,0.117984242042143 | |
added
results/descriptive_by_group.csv
+5 −0
@@ -0,0 +1,5 @@ | ||
| 1 | +Group,N_obs,N_tickers,Date_min,Date_max,Mean_IV_ATM,Std_IV_ATM,Mean_RV,Mean_Skew,Mean_Ret_1d,Std_Ret_1d,Mean_PC_ratio | |
| 2 | +Stocks,188093,49,2010-01-04,2025-12-31,0.26635484437446266,0.12001045805245089,0.0004863592952177116,0.03614561510932377,0.0005422781792618706,0.01901712817556674,0.890054068073878 | |
| 3 | +ETFs,64256,17,2010-01-04,2025-12-31,0.17838701250486216,0.0738950556393931,0.00019979200172208882,0.04253964408090098,0.00034922540563498734,0.012498140766909539,2.3454580288965676 | |
| 4 | +Indices,12034,3,2010-01-04,2025-12-31,0.18227346379280654,0.07106732907176552,0.00013525566205162284,0.056216542666832216,0.00047203897814238716,0.01289727864086633,1.7544899128965963 | |
| 5 | +All,264383,69,2010-01-04,2025-12-31,0.24059665686005302,0.11546400261064191,0.00040073030571242783,0.03873144189798992,0.0004921612747391106,0.017402131346727637,1.2831191218436342 | |
added
results/descriptive_correlation_matrix.csv
+12 −0
@@ -0,0 +1,12 @@ | ||
| 1 | +,iv_atm_30d,iv_term_slope,iv_skew_25d,implied_skewness,implied_kurtosis_proxy,pc_volume_ratio,pc_oi_ratio,rv_daily,rv_weekly,ret_1d,ret_5d | |
| 2 | +iv_atm_30d,1.0,-0.535,0.279,-0.228,-0.243,-0.067,-0.153,0.33,0.503,0.021,-0.072 | |
| 3 | +iv_term_slope,-0.535,1.0,-0.257,0.065,0.157,0.01,0.064,-0.23,-0.317,-0.002,0.102 | |
| 4 | +iv_skew_25d,0.279,-0.257,1.0,0.484,0.162,0.059,0.126,0.16,0.249,0.01,-0.109 | |
| 5 | +implied_skewness,-0.228,0.065,0.484,1.0,0.693,0.1,0.265,-0.034,-0.052,-0.004,-0.027 | |
| 6 | +implied_kurtosis_proxy,-0.243,0.157,0.162,0.693,1.0,0.05,0.134,-0.057,-0.08,-0.008,0.071 | |
| 7 | +pc_volume_ratio,-0.067,0.01,0.059,0.1,0.05,1.0,0.149,-0.013,-0.021,-0.002,-0.016 | |
| 8 | +pc_oi_ratio,-0.153,0.064,0.126,0.265,0.134,0.149,1.0,-0.038,-0.069,-0.003,-0.009 | |
| 9 | +rv_daily,0.33,-0.23,0.16,-0.034,-0.057,-0.013,-0.038,1.0,0.567,0.006,-0.073 | |
| 10 | +rv_weekly,0.503,-0.317,0.249,-0.052,-0.08,-0.021,-0.069,0.567,1.0,0.009,-0.052 | |
| 11 | +ret_1d,0.021,-0.002,0.01,-0.004,-0.008,-0.002,-0.003,0.006,0.009,1.0,0.438 | |
| 12 | +ret_5d,-0.072,0.102,-0.109,-0.027,0.071,-0.016,-0.009,-0.073,-0.052,0.438,1.0 | |
added
results/descriptive_coverage_by_year.csv
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +year,n_obs,n_tickers,avg_iv_atm,avg_rv,avg_skew,avg_ret,std_ret | |
| 2 | +2010,15218,62,0.264696,0.000547,0.04947,0.000471,0.017329 | |
| 3 | +2011,15569,62,0.282896,0.000563,0.061525,-4e-06,0.020206 | |
| 4 | +2012,15500,62,0.228746,0.000326,0.040406,0.000533,0.014915 | |
| 5 | +2013,15874,63,0.200215,0.000254,0.028301,0.00119,0.013839 | |
| 6 | +2014,16065,64,0.185413,0.000254,0.026055,0.000407,0.012904 | |
| 7 | +2015,16099,65,0.21268,0.000339,0.038343,0.000207,0.015066 | |
| 8 | +2016,16466,66,0.215971,0.000344,0.041839,0.00049,0.015395 | |
| 9 | +2017,16566,66,0.17339,0.000209,0.025553,0.000868,0.011458 | |
| 10 | +2018,16654,68,0.225917,0.000464,0.036186,-8.3e-05,0.017526 | |
| 11 | +2019,16882,68,0.216182,0.000276,0.040292,0.000988,0.015218 | |
| 12 | +2020,17125,68,0.346799,0.000966,0.061179,0.000695,0.027671 | |
| 13 | +2021,17254,69,0.245828,0.000301,0.033569,0.000899,0.015757 | |
| 14 | +2022,17229,69,0.312147,0.000542,0.056636,-0.000773,0.021792 | |
| 15 | +2023,17246,69,0.237981,0.000285,0.037973,0.000841,0.015617 | |
| 16 | +2024,17386,69,0.232136,0.000313,0.021159,0.000597,0.016418 | |
| 17 | +2025,17250,69,0.264178,0.000422,0.033779,0.000551,0.019689 | |
added
results/descriptive_cross_sectional_dispersion.csv
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +year,iv_atm_cs_std,skew_cs_std,rv_cs_std,ret_cs_std,n_tickers | |
| 2 | +2010,0.097143,0.042235,0.002386,0.017329,62 | |
| 3 | +2011,0.124911,0.043633,0.001675,0.020206,62 | |
| 4 | +2012,0.107011,0.039278,0.000837,0.014915,62 | |
| 5 | +2013,0.104272,0.031329,0.000649,0.013839,63 | |
| 6 | +2014,0.084579,0.016429,0.001486,0.012904,64 | |
| 7 | +2015,0.091141,0.033292,0.001129,0.015066,65 | |
| 8 | +2016,0.100822,0.040095,0.001939,0.015395,66 | |
| 9 | +2017,0.083544,0.050258,0.001778,0.011458,66 | |
| 10 | +2018,0.104781,0.024853,0.002981,0.017526,68 | |
| 11 | +2019,0.091634,0.018423,0.001202,0.015218,68 | |
| 12 | +2020,0.164618,0.064908,0.002091,0.027671,68 | |
| 13 | +2021,0.101447,0.065147,0.0005,0.015757,69 | |
| 14 | +2022,0.110083,0.031943,0.000858,0.021792,69 | |
| 15 | +2023,0.094717,0.023991,0.000595,0.015617,69 | |
| 16 | +2024,0.101824,0.018979,0.000735,0.016418,69 | |
| 17 | +2025,0.110374,0.027993,0.001025,0.019689,69 | |
added
results/descriptive_options_quality.csv
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +year,n_records,n_tickers,pct_valid_iv,pct_with_volume,pct_with_oi,pct_valid_greeks,avg_spread | |
| 2 | +2010,80141522,3689,0.5603211903063183,0.16325479818064847,0.6192144441679058,0.9414304235449883,7.378956935462366 | |
| 3 | +2011,106313698,4045,0.5092654570251145,0.14820284023983438,0.5571225450176702,0.9445874886225856,2.018150939775713 | |
| 4 | +2012,123399540,4145,0.4399998492701026,0.11949846814663977,0.49635518090261926,0.9269507406591629,1.340341073957178 | |
| 5 | +2013,138304024,4340,0.47034534584474563,0.126063013177404,0.48718350378583347,0.9222798897015462,0.9510770126182796 | |
| 6 | +2014,180534512,4499,0.4547097011567517,0.19188912200898187,0.4711852268999957,0.9234711200260701,1.2043519025848697 | |
| 7 | +2015,209738612,4851,0.45550458300925534,0.3945907489842643,0.4480767852130155,0.9204094666174295,1.3455954056725508 | |
| 8 | +2016,214308632,4833,0.4446692329219851,0.4282370156699988,0.4254115858478346,0.9201519097000255,1.473306344279893 | |
| 9 | +2017,209603286,4681,0.4536221249890138,0.4447706988715816,0.43654774572570393,0.9108871174853623,1.2906537205225985 | |
| 10 | +2018,222096650,4602,0.5103315876218755,0.48262537053125293,0.49362306905574665,0.9245985475242423,1.3641033015528778 | |
| 11 | +2019,226701222,4495,0.49573939217672147,0.18052890777977368,0.4830654552007664,0.9255218130231341,1.2576883668472407 | |
| 12 | +2020,283505430,4653,0.5386446566473171,0.17397140153541327,0.5190977929417436,0.9370349696653076,2.1674455496524665 | |
| 13 | +2021,337724820,5869,0.5522790329712812,0.2618721745117815,0.5322301393187507,0.9446724051847892,2.2560009053046075 | |
| 14 | +2022,356820973,6282,0.5258082349324237,0.4377349310125893,0.490288383356883,0.9422986916186679,2.3632679057766173 | |
| 15 | +2023,348825377,6317,0.4416207081172308,0.14041610854476336,0.4470494673900976,0.9304564271996759,2.067275052161795 | |
| 16 | +2024,384669738,6083,0.44969850994621263,0.1456652095673822,0.4689129041910752,0.9428944706848762,2.5207759389496385 | |
| 17 | +2025,409219452,6274,0.47065785621549583,0.16657771195099494,0.5077653859914752,0.9499853565123292,3.2968923289524787 | |
added
results/descriptive_summary_stats.csv
+24 −0
@@ -0,0 +1,24 @@ | ||
| 1 | +,count,mean,std,min,1%,5%,25%,50%,75%,95%,99%,max,skewness,kurtosis,pct_missing | |
| 2 | +iv_atm_30d,236475.0,0.24059665686005302,0.11546400261064191,0.045149999999999996,0.09731604761904761,0.11867198412698413,0.16278,0.21250000000000002,0.2836692307692308,0.4651756818181818,0.6548320000000002,3.0159,2.2135620764266073,10.92432765550004,10.555898072115076 | |
| 3 | +iv_atm_90d,131476.0,0.24376081999403457,0.10357525119688325,0.0,0.10661666666666665,0.12971916666666666,0.173025,0.21955,0.286325,0.45043750000000005,0.6097125,1.50696875,1.826665591919962,5.61940871178548,50.270630108592464 | |
| 4 | +iv_term_slope,124270.0,0.002214315247264522,0.03644156518965625,-0.8957666666666666,-0.11732206150793646,-0.05911466666666666,-0.010149999999999992,0.007728660714285726,0.020810645053475945,0.0448429934210526,0.07012685716783217,0.6817916666666666,-1.7041797261595744,49.60476268978388,52.99622139093664 | |
| 5 | +iv_skew_25d,228312.0,0.03873144189798992,0.040371360598382824,-1.5878,-0.017050593333333277,0.0028612976044226214,0.021987500000000014,0.034258090437788005,0.04955624999999992,0.08414999999999995,0.1447324819444442,2.9163333333333337,16.097668566692892,788.0616853779302,13.643464216685642 | |
| 6 | +implied_skewness,229856.0,0.38121736691148084,0.296451072084222,-7.829815393638992,-0.1329156325094457,0.030452742711783793,0.23387352440427323,0.36042126396277974,0.5083632196426691,0.7443977143095875,1.0063572240997747,20.93355754857997,10.637511271288002,386.826675460415,13.059462976061246 | |
| 7 | +implied_kurtosis_proxy,236436.0,1.2612816036768173,0.2720281120233158,0.0,0.9974434466422932,1.0599576980557062,1.1409909592619876,1.216043619449638,1.3215414465288216,1.5597282406707427,1.977742400047588,19.34128662035639,14.66835247639418,469.4937474208965,10.570649398788879 | |
| 8 | +pc_volume_ratio,264365.0,1.2831191218436342,4.314381979656647,0.0,0.1184310631926767,0.27121300341800963,0.554651144693633,0.845342198453422,1.3525559673079852,3.0719904948457737,7.682400287459553,1031.138528138528,117.66536452116708,22206.91205964587,0.006808304618678205 | |
| 9 | +pc_oi_ratio,264360.0,1.1557369199703253,0.7230771290289001,0.0,0.39124218988459014,0.5368117836803997,0.7693031361817986,0.9838043760337389,1.335905656481052,2.3364548256874684,3.4631250740348465,147.2967409948542,41.63774793896402,7371.450513244507,0.008699500346088818 | |
| 10 | +net_gamma_exposure,264383.0,-6.003200818470901e+37,3.8362012518777524e+40,-1.2434597510865127e+43,-78811.66645199998,-13309.295490000015,-72.4060999999989,624.4674,3896.1542500000023,29565.892430000004,96604.99421199977,1.1407625388710046e+43,-33.71025982847343,76626.1345355379,0.0 | |
| 11 | +avg_vega_30d,244920.0,-1.9415400764096769e+31,8.519508906548525e+33,-2.859515517970832e+36,0.0022799999999999995,0.005939211423699911,0.022477619047619045,0.04635644324548662,0.08287745354239255,0.49790896956424074,2.601142458689459,5.251270781458781e+35,-297.53223300508887,99056.51730337592,7.361668488518551 | |
| 12 | +avg_theta_30d,244919.0,-1.4522160866555816e+31,5.567071913783503e+33,-1.76312121944393e+36,-1.0364389911397107,-0.22287204464285723,-0.04259600988700564,-0.018790000000000005,-0.00884333853270224,-0.0028652589587559248,-0.0013062594537815123,1.3945997813054467e+36,-137.4558920975691,75055.46896118295,7.362046727664033 | |
| 13 | +total_option_volume,264383.0,99848.1113195629,266801.37520592957,0.0,542.0,2282.1000000000004,9503.0,21782.0,61329.5,485055.7999999995,1411185.9999999995,7317630.0,6.193609115538391,55.54427910677232,0.0 | |
| 14 | +total_oi,264383.0,1131087.6974238132,2393079.7653611824,0.0,17757.100000000002,58093.1,162681.0,326245.0,858131.0,5051509.3,13765023.19999998,34225198.0,4.314969706380939,21.782915613491635,0.0 | |
| 15 | +rv_daily,264383.0,0.00040073030571242783,0.0015373425069068758,1.3768559028485862e-06,1.6268291267545182e-05,3.255445647704381e-05,8.610603043620723e-05,0.00017102609348791355,0.0003613316700531579,0.0012712464869274456,0.0037993331269221635,0.262113205775071,65.0192350791737,8080.490217231984,0.0 | |
| 16 | +rvol_daily,264383.0,0.016058334343875397,0.01195243674603625,0.0011733950327356027,0.004033396987242746,0.005705651275401214,0.009279333512133272,0.01307769450201042,0.019008726155453667,0.035654543705416784,0.06163873073738284,0.5119699266315073,5.250388246503591,78.36767957553224,0.0 | |
| 17 | +rv_weekly,264376.0,0.002004234313553365,0.004483295729211252,2.240963617665533e-05,0.0001192418441172048,0.00021961741031746219,0.0005280666354195562,0.0009981191401328801,0.00201445189045793,0.006400268729689679,0.016330381185275824,0.26813351965687465,18.273197892293776,687.8067480899355,0.0026476740183748577 | |
| 18 | +daily_return,264383.0,0.0004931375757165654,0.017401505071253712,-0.34146660820780744,-0.048616807162727455,-0.024992839062357955,-0.007006595046734136,0.0006311139370100773,0.008249620294458186,0.025035502227542812,0.048479995130289256,0.35429575109859524,-0.13690080815424654,16.59414595254334,0.0 | |
| 19 | +realized_skew,264383.0,0.10472644456787142,1.7604272294478531,-12.146119981792701,-4.888301717851265,-2.579167831052471,-0.7306972922207067,0.04277738200343342,0.8843473328226423,2.98892741438237,5.533776997053528,11.890223343080633,0.23729732402068204,3.9963586655308903,0.0 | |
| 20 | +realized_kurt,264383.0,11.414495043039281,10.813811721895863,1.9732620131613592,2.951198894514506,3.585530848920119,5.286177777626968,7.788030853629648,13.117602676270334,32.03678964300675,55.30907031744122,156.6544763306374,3.6147282988073712,21.075240982912334,0.0 | |
| 21 | +ret_1d,264383.0,0.0004921612747391106,0.017402131346727637,-0.34146660820780744,-0.04861589873670486,-0.024993515057339464,-0.007011148111940965,0.0006310277484861863,0.008249018827133768,0.025034835668677112,0.0484867173148171,0.35429575109859524,-0.1369138439158137,16.58939772377889,0.0 | |
| 22 | +ret_5d,264376.0,0.002462273467014857,0.037564006342308845,-0.6963033699729,-0.10730782433400138,-0.05477268982320896,-0.014573271363676164,0.003523198007316708,0.02058717249257189,0.05657238919898349,0.10349160694254442,0.6680591286973019,-0.36657522021349376,11.49346828532021,0.0026476740183748577 | |
| 23 | +rv_fwd_1d,264383.0,0.0004006746225960613,0.0015372182562227563,0.0,1.6268291267545182e-05,3.255418815372144e-05,8.610936501935275e-05,0.00017103325021062643,0.0003613209515248866,0.0012711582755783669,0.003795880003549758,0.262113205775071,65.03430629901956,8083.109163340245,0.0 | |
| 24 | +rv_fwd_5d,264376.0,0.0020038041274330134,0.004481792473205312,2.240963617665533e-05,0.00011926852998930454,0.00021961079215989282,0.0005279488831194709,0.0009979124041882338,0.0020139607451699474,0.0063987616724714355,0.016328470914410597,0.26813351965687465,18.283436681406506,688.6316620154149,0.0026476740183748577 | |
added
results/descriptive_vix_regimes.csv
+6 −0
@@ -0,0 +1,6 @@ | ||
| 1 | +vix_regime,n_obs,pct_obs,mean_iv_atm,mean_rv,mean_skew,mean_ret_1d,std_ret_1d,mean_pc_ratio,mean_impl_skew | |
| 2 | +Very Low (<15),94470,35.732252,0.192254,0.00024,0.026553,0.000404,0.01332,1.241125,0.365054 | |
| 3 | +Low (15-20),92574,35.015111,0.232462,0.000308,0.035432,0.000284,0.015661,1.314472,0.376048 | |
| 4 | +Medium (20-25),41711,15.776733,0.274892,0.000446,0.044686,0.000875,0.018523,1.313131,0.382834 | |
| 5 | +High (25-35),28987,10.964018,0.329495,0.000713,0.062176,-0.000369,0.023202,1.258578,0.416751 | |
| 6 | +Crisis (>35),6641,2.511886,0.464711,0.002331,0.123523,0.00601,0.039669,1.36209,0.52566 | |
added
results/double_sort_iv_skew.csv
+10 −0
@@ -0,0 +1,10 @@ | ||
| 1 | +q1,q2,mean,std,count,mean_bps,t_stat | |
| 2 | +1,1,0.0008151427739457642,0.033377056486195406,6957,8.151427739457642,2.037026369141118 | |
| 3 | +1,2,0.002411837974402523,0.02828823263093608,16889,24.11837974402523,11.080115355853012 | |
| 4 | +1,3,0.0035903372888018057,0.025505804176619695,31471,35.903372888018055,24.971894995225732 | |
| 5 | +2,1,0.0022108846597390075,0.03996305608120129,13706,22.108846597390077,6.476833870083081 | |
| 6 | +2,2,0.0023802914524478276,0.034764369060130494,21968,23.802914524478275,10.148247378651282 | |
| 7 | +2,3,0.0015624032033988058,0.03486427973013344,16925,15.624032033988058,5.830110175075233 | |
| 8 | +3,1,0.004176092660489417,0.059249718842900936,34653,41.760926604894166,13.120616803733691 | |
| 9 | +3,2,0.00027228795074543384,0.04917731278237744,13741,2.7228795074543384,0.6490419974337353 | |
| 10 | +3,3,-0.004782166489784315,0.05613027265750696,5247,-47.82166489784315,-6.171391132326184 | |
added
results/extended_decile_sorts.csv
+7 −0
@@ -0,0 +1,7 @@ | ||
| 1 | +sort_variable,scheme,mean_daily_bps,annualized_return_pct,annualized_vol_pct,sharpe_ratio,t_statistic,n_days | |
| 2 | +Implied Kurtosis,Quintile (baseline),84.68437042102255,44.03587261893173,18.913906695855363,2.3282272312668946,19.84253637373645,3777 | |
| 3 | +Implied Kurtosis,Decile,100.14705511082843,52.076468657630784,23.836606425327652,2.1847266229263567,18.562760583578715,3754 | |
| 4 | +Put-Call Volume Ratio,Quintile (baseline),-58.247254076933345,-30.288572120005337,12.2244451508235,-2.4777052656631167,-21.79600796863729,4024 | |
| 5 | +Put-Call Volume Ratio,Decile,-64.16861741444349,-33.36768105551061,15.89336674663741,-2.099472162659952,-18.468747119129826,4024 | |
| 6 | +Volatility Skew (25d),Quintile (baseline),-72.17826490058003,-37.53269774830162,20.0977643732778,-1.8675061091971745,-15.918103940098042,3778 | |
| 7 | +Volatility Skew (25d),Decile,-100.97375105068923,-52.50635054635839,27.69009901622333,-1.8962138963676327,-16.11138171895377,3754 | |
added
results/extended_information_coefficients.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +target,variable,mean_ic,std_ic,t_stat,pct_positive,n_days | |
| 2 | +1-Day,iv_atm_30d,0.014020211968601438,0.33770095935571964,1.840363293810679,0.5216284987277354,1965 | |
| 3 | +1-Day,iv_term_slope,-0.001286407283853752,0.2278944710190576,-0.250222281133648,0.4916030534351145,1965 | |
| 4 | +1-Day,iv_skew_25d,0.019973047097920783,0.2520002169152939,3.5133764737487923,0.5312977099236641,1965 | |
| 5 | +1-Day,implied_skewness,-0.001813098413562992,0.25286853687311206,-0.31783949320876137,0.5027989821882952,1965 | |
| 6 | +1-Day,implied_kurtosis_proxy,-0.008283621394680763,0.2544218342813107,-1.4432685200758328,0.4895674300254453,1965 | |
| 7 | +1-Day,pc_volume_ratio,0.01329794063363677,0.19024787279531977,3.0984597408844556,0.5419847328244275,1965 | |
| 8 | +1-Day,pc_oi_ratio,0.007142632906449861,0.20262665244571326,1.5625827945248114,0.5099236641221374,1965 | |
| 9 | +1-Day,net_gamma_exposure,-0.010680760555627748,0.21809118610399691,-2.170927609456667,0.4814249363867684,1965 | |
| 10 | +1-Day,rv_daily,-0.0004205354306446495,0.29144246073206725,-0.0639633267994626,0.5002544529262086,1965 | |
| 11 | +1-Day,rv_w,0.0018921669981878486,0.3001288119455326,0.27946862091206287,0.5012722646310432,1965 | |
| 12 | +5-Day,iv_atm_30d,0.008468267540307333,0.3434207327125634,1.0930734286162467,0.5302798982188295,1965 | |
| 13 | +5-Day,iv_term_slope,0.03284117705639645,0.23118192003977045,6.2971802574945785,0.5455470737913486,1965 | |
| 14 | +5-Day,iv_skew_25d,-0.055827294249938327,0.25608409576024777,-9.663740287544183,0.4193384223918575,1965 | |
| 15 | +5-Day,implied_skewness,-0.018833826623984466,0.25325311605890816,-3.296590842284389,0.4737913486005089,1965 | |
| 16 | +5-Day,implied_kurtosis_proxy,0.09779640631137758,0.25852159646002765,16.769006937525127,0.6427480916030535,1965 | |
| 17 | +5-Day,pc_volume_ratio,-0.059133202971978376,0.18982114160090632,-13.809186650792691,0.37150127226463103,1965 | |
| 18 | +5-Day,pc_oi_ratio,0.01697919126621168,0.20738042551822322,3.629363912792036,0.5241730279898219,1965 | |
| 19 | +5-Day,net_gamma_exposure,0.1702073081211924,0.22198156736744687,33.989327125146225,0.7776081424936386,1965 | |
| 20 | +5-Day,rv_daily,0.016087714337187142,0.29540376968362436,2.414124092980691,0.5267175572519084,1965 | |
| 21 | +5-Day,rv_w,0.012032237375331363,0.3088415481562639,1.7269984498968243,0.5124681933842239,1965 | |
added
results/extended_leave_one_year_out.csv
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +excluded_year,r2_ret_5d,r2_rv_har_iv,n_obs_ret | |
| 2 | +2010,0.05366715703023728,0.48516022735769493,116766 | |
| 3 | +2011,0.053509916077026265,0.4810305947601775,115801 | |
| 4 | +2012,0.053682861064221266,0.4831446164900626,116111 | |
| 5 | +2013,0.0538150359990901,0.48000358504665097,114266 | |
| 6 | +2014,0.05290367062417112,0.4832766882583932,112401 | |
| 7 | +2015,0.0514246766097608,0.49221705361344403,112130 | |
| 8 | +2016,0.05199682043637355,0.48439671843418564,111577 | |
| 9 | +2017,0.05472210727629934,0.4838661787880558,110943 | |
| 10 | +2018,0.04689058407435642,0.48607972154878076,110948 | |
| 11 | +2019,0.053964163348554806,0.48579573012166,110707 | |
| 12 | +2020,0.05048103866727982,0.4142232450633596,110189 | |
| 13 | +2021,0.05572667787311192,0.48167487402265774,109347 | |
| 14 | +2022,0.049976864574241,0.47860338796316804,109013 | |
| 15 | +2023,0.05323700902177875,0.48827157843816404,109401 | |
| 16 | +2024,0.05715603235639366,0.489536092974064,108365 | |
| 17 | +2025,0.05731674800941933,0.49002808553485677,108250 | |
added
results/extended_newey_west_lags.csv
+67 −0
@@ -0,0 +1,67 @@ | ||
| 1 | +target,n_lags,variable,coefficient,nw_t_stat,sig_5pct | |
| 2 | +1-Day,5,const,0.00041763446448038873,9.675788130572228,True | |
| 3 | +1-Day,5,iv_atm_30d,0.000280103614679104,2.6174042782485727,True | |
| 4 | +1-Day,5,iv_term_slope,8.13942413539805e-05,1.2359481704937565,False | |
| 5 | +1-Day,5,iv_skew_25d,0.0005589362280265609,5.078282676726459,True | |
| 6 | +1-Day,5,implied_skewness,-0.00027431955853834326,-2.7170843606410493,True | |
| 7 | +1-Day,5,implied_kurtosis_proxy,3.198378790915095e-05,0.4883151818771706,False | |
| 8 | +1-Day,5,pc_volume_ratio,-1.4646140356719655e-06,-0.031100452274136516,False | |
| 9 | +1-Day,5,pc_oi_ratio,-6.372110421016961e-05,-1.1831671225309466,False | |
| 10 | +1-Day,5,net_gamma_exposure,5.053427056373319e-06,0.11352309486312698,False | |
| 11 | +1-Day,5,rv_daily,-0.0003205381939735506,-2.7936443681139584,True | |
| 12 | +1-Day,5,rv_w,-4.7339039740472715e-05,-0.4138409388043216,False | |
| 13 | +1-Day,10,const,0.00041763446448038873,9.78565088195995,True | |
| 14 | +1-Day,10,iv_atm_30d,0.000280103614679104,2.687296384082095,True | |
| 15 | +1-Day,10,iv_term_slope,8.13942413539805e-05,1.2585214616159557,False | |
| 16 | +1-Day,10,iv_skew_25d,0.0005589362280265609,5.26383054933098,True | |
| 17 | +1-Day,10,implied_skewness,-0.00027431955853834326,-2.770470232495979,True | |
| 18 | +1-Day,10,implied_kurtosis_proxy,3.198378790915095e-05,0.49696217056489883,False | |
| 19 | +1-Day,10,pc_volume_ratio,-1.4646140356719655e-06,-0.030794001794525704,False | |
| 20 | +1-Day,10,pc_oi_ratio,-6.372110421016961e-05,-1.1854343979747173,False | |
| 21 | +1-Day,10,net_gamma_exposure,5.053427056373319e-06,0.1159299646908982,False | |
| 22 | +1-Day,10,rv_daily,-0.0003205381939735506,-2.7951057230470493,True | |
| 23 | +1-Day,10,rv_w,-4.7339039740472715e-05,-0.41918060373069693,False | |
| 24 | +1-Day,22,const,0.00041763446448038873,10.081479360832157,True | |
| 25 | +1-Day,22,iv_atm_30d,0.000280103614679104,2.739315938553952,True | |
| 26 | +1-Day,22,iv_term_slope,8.13942413539805e-05,1.265741089488286,False | |
| 27 | +1-Day,22,iv_skew_25d,0.0005589362280265609,5.407077481085138,True | |
| 28 | +1-Day,22,implied_skewness,-0.00027431955853834326,-2.812984500120854,True | |
| 29 | +1-Day,22,implied_kurtosis_proxy,3.198378790915095e-05,0.5029627845452709,False | |
| 30 | +1-Day,22,pc_volume_ratio,-1.4646140356719655e-06,-0.030802455941061936,False | |
| 31 | +1-Day,22,pc_oi_ratio,-6.372110421016961e-05,-1.1830279845894662,False | |
| 32 | +1-Day,22,net_gamma_exposure,5.053427056373319e-06,0.11842553681310698,False | |
| 33 | +1-Day,22,rv_daily,-0.0003205381939735506,-2.794660440941982,True | |
| 34 | +1-Day,22,rv_w,-4.7339039740472715e-05,-0.41350027509357284,False | |
| 35 | +5-Day,5,const,0.002249473137649632,13.141841337935864,True | |
| 36 | +5-Day,5,iv_atm_30d,0.0013216839369709678,3.3249773734758246,True | |
| 37 | +5-Day,5,iv_term_slope,0.001133720205572446,4.590595207033885,True | |
| 38 | +5-Day,5,iv_skew_25d,-0.0003731283791251577,-0.9272252693333577,False | |
| 39 | +5-Day,5,implied_skewness,-0.004685263679195295,-13.656129975363415,True | |
| 40 | +5-Day,5,implied_kurtosis_proxy,0.006342337908904511,25.642476250469922,True | |
| 41 | +5-Day,5,pc_volume_ratio,-0.002132635195154358,-16.690798309685608,True | |
| 42 | +5-Day,5,pc_oi_ratio,0.0026340423531046745,13.118584891448076,True | |
| 43 | +5-Day,5,net_gamma_exposure,0.0030205764876359066,17.83024585466301,True | |
| 44 | +5-Day,5,rv_daily,-0.005554035996188907,-17.871005028272663,True | |
| 45 | +5-Day,5,rv_w,0.00348308295756233,7.951443801559899,True | |
| 46 | +5-Day,10,const,0.002249473137649632,12.345960835919136,True | |
| 47 | +5-Day,10,iv_atm_30d,0.0013216839369709678,3.170266253756691,True | |
| 48 | +5-Day,10,iv_term_slope,0.001133720205572446,4.371021098518735,True | |
| 49 | +5-Day,10,iv_skew_25d,-0.0003731283791251577,-0.8782292993058013,False | |
| 50 | +5-Day,10,implied_skewness,-0.004685263679195295,-12.924840999749954,True | |
| 51 | +5-Day,10,implied_kurtosis_proxy,0.006342337908904511,23.88681611849446,True | |
| 52 | +5-Day,10,pc_volume_ratio,-0.002132635195154358,-15.921940838181772,True | |
| 53 | +5-Day,10,pc_oi_ratio,0.0026340423531046745,12.158644093704863,True | |
| 54 | +5-Day,10,net_gamma_exposure,0.0030205764876359066,16.67061163096755,True | |
| 55 | +5-Day,10,rv_daily,-0.005554035996188907,-17.79332067036291,True | |
| 56 | +5-Day,10,rv_w,0.00348308295756233,7.753799585964247,True | |
| 57 | +5-Day,22,const,0.002249473137649632,12.11235710395085,True | |
| 58 | +5-Day,22,iv_atm_30d,0.0013216839369709678,3.1218825994907817,True | |
| 59 | +5-Day,22,iv_term_slope,0.001133720205572446,4.313392190023936,True | |
| 60 | +5-Day,22,iv_skew_25d,-0.0003731283791251577,-0.8479097635525128,False | |
| 61 | +5-Day,22,implied_skewness,-0.004685263679195295,-12.178883871711093,True | |
| 62 | +5-Day,22,implied_kurtosis_proxy,0.006342337908904511,22.09484250127396,True | |
| 63 | +5-Day,22,pc_volume_ratio,-0.002132635195154358,-15.335551032733035,True | |
| 64 | +5-Day,22,pc_oi_ratio,0.0026340423531046745,11.336062946544525,True | |
| 65 | +5-Day,22,net_gamma_exposure,0.0030205764876359066,15.477545452381397,True | |
| 66 | +5-Day,22,rv_daily,-0.005554035996188907,-17.510791097020366,True | |
| 67 | +5-Day,22,rv_w,0.00348308295756233,7.800655647519896,True | |
added
results/extended_placebo.csv
+12 −0
@@ -0,0 +1,12 @@ | ||
| 1 | +draw,r2 | |
| 2 | +actual,0.05291603110227727 | |
| 3 | +1,0.0007417089391908993 | |
| 4 | +2,0.0008261871701321644 | |
| 5 | +3,0.0007763315032777163 | |
| 6 | +4,0.000980276456860163 | |
| 7 | +5,0.0006012417890638444 | |
| 8 | +6,0.0007364700640961619 | |
| 9 | +7,0.0009818076808868481 | |
| 10 | +8,0.0007777895071854335 | |
| 11 | +9,0.0007599980702359677 | |
| 12 | +10,0.0008595216383930904 | |
added
results/extended_winsorization_sensitivity.csv
+6 −0
@@ -0,0 +1,6 @@ | ||
| 1 | +winsorization,r2,adj_r2,n_obs,t_implied_kurtosis,t_pc_volume_ratio,t_implied_skewness,n_significant_5pct | |
| 2 | +None,0.03350735718101783,0.03342618705900402,119081,13.755824294668269,-3.590348792573864,-8.583183654871487,8 | |
| 3 | +0.5%,0.051039572284505286,0.05095987459174334,119081,36.507085316444645,-21.310130926199722,-17.941997876961818,10 | |
| 4 | +1% (baseline),0.05291603110227727,0.05283649100242871,119081,40.06677941685727,-21.48293852968104,-19.737131592896397,9 | |
| 5 | +2.5%,0.05770036766996445,0.057621229378847505,119081,43.66170335444888,-21.32166406183641,-20.042069653438933,9 | |
| 6 | +5%,0.06191784066911932,0.06183905657914435,119081,45.73023608159133,-20.855308567174866,-18.97219097816346,9 | |
added
results/fevd_results.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +horizon,pct_rv_explained_by_iv,pct_rv_explained_by_rv | |
| 2 | +1,0.0,100.0 | |
| 3 | +2,28.007319977109773,71.99268002289023 | |
| 4 | +3,44.31703720059686,55.68296279940314 | |
| 5 | +4,51.278734813984784,48.721265186015216 | |
| 6 | +5,56.097204489827924,43.902795510172076 | |
| 7 | +6,58.76175896703146,41.23824103296854 | |
| 8 | +7,61.235470999828834,38.764529000171166 | |
| 9 | +8,63.28656618802052,36.71343381197948 | |
| 10 | +9,64.98337674753189,35.01662325246811 | |
| 11 | +10,66.40599563729678,33.59400436270321 | |
| 12 | +11,67.61238521557922,32.38761478442077 | |
| 13 | +12,68.66288974863926,31.337110251360745 | |
| 14 | +13,69.58433031188322,30.415669688116775 | |
| 15 | +14,70.39856183459653,29.601438165403472 | |
| 16 | +15,71.12371125728141,28.876288742718593 | |
| 17 | +16,71.77358399509681,28.226416004903186 | |
| 18 | +17,72.35964179157772,27.64035820842229 | |
| 19 | +18,72.89070607078267,27.109293929217326 | |
| 20 | +19,73.37402010639867,26.625979893601325 | |
| 21 | +20,73.81558160584328,26.184418394156715 | |
added
results/granger_causality.csv
+13 −0
@@ -0,0 +1,13 @@ | ||
| 1 | +test,x_causes_y,avg_f_stat,avg_p_value,pct_significant_5pct,n_tickers | |
| 2 | +ATM_IV → RV,iv_atm_30d → rv_daily,62.38106520233454,5.071267131906581e-06,1.0,69 | |
| 3 | +RV → ATM_IV,rv_daily → iv_atm_30d,17.93328431789441,0.15014524117017866,0.6086956521739131,69 | |
| 4 | +Skew → RV,iv_skew_25d → rv_daily,20.79185793640106,0.017692917026207195,0.9420289855072463,69 | |
| 5 | +RV → Skew,rv_daily → iv_skew_25d,6.589389745339387,0.06276398502636006,0.7536231884057971,69 | |
| 6 | +ATM_IV → Return,iv_atm_30d → daily_return,1.799392890104521,0.2687779841282898,0.2463768115942029,69 | |
| 7 | +Return → ATM_IV,daily_return → iv_atm_30d,3.9766915847902937,0.17413499102184476,0.5797101449275363,69 | |
| 8 | +Skew → Return,iv_skew_25d → daily_return,1.4117792320379194,0.3816573851754086,0.13043478260869565,69 | |
| 9 | +Return → Skew,daily_return → iv_skew_25d,13.575983727116334,0.01329845811411139,0.9565217391304348,69 | |
| 10 | +PC_Ratio → Return,pc_volume_ratio → daily_return,1.0097282323014052,0.49989109436475865,0.057971014492753624,69 | |
| 11 | +Return → PC_Ratio,daily_return → pc_volume_ratio,2.81884569035887,0.16377581135473343,0.463768115942029,69 | |
| 12 | +Impl_Skew → RV,implied_skewness → rv_daily,1.3428309373629608,0.38563328915244494,0.17391304347826086,69 | |
| 13 | +Impl_Kurt → RV,implied_kurtosis_proxy → rv_daily,5.6192779559291575,0.08610874071907583,0.7536231884057971,69 | |
added
results/irf_results.csv
+401 −0
@@ -0,0 +1,401 @@ | ||
| 1 | +ticker,horizon,iv_to_iv,rv_to_iv,iv_to_rv,rv_to_rv | |
| 2 | +AAPL,0,1.0,0.0,0.0,1.0 | |
| 3 | +AAPL,1,0.9491628014472261,-0.09369294246277479,0.7302331195844847,0.22332755127331197 | |
| 4 | +AAPL,2,0.8999020259215129,-0.09724494462692342,0.713816784960013,0.11953523883349881 | |
| 5 | +AAPL,3,0.8351874851785384,-0.1052784839407106,0.5068263379824433,0.09074680201696152 | |
| 6 | +AAPL,4,0.7725921496313757,-0.09368464087399606,0.4549055465495751,0.08398246644558302 | |
| 7 | +AAPL,5,0.7423383999903764,-0.08692095069551288,0.3910242176668829,0.0483895632674536 | |
| 8 | +AAPL,6,0.7213434469742127,-0.08541140970936544,0.36953854030564715,0.029175858725018475 | |
| 9 | +AAPL,7,0.6988751221295182,-0.08364859134203878,0.3491022816886294,0.013474479683698977 | |
| 10 | +AAPL,8,0.6761418487333521,-0.08156921444641135,0.3302083188511222,0.0023223231704329397 | |
| 11 | +AAPL,9,0.6531295569985471,-0.07929822693388383,0.31308940086793985,-0.006466735417600036 | |
| 12 | +AAPL,10,0.6307152116639099,-0.07690345233825871,0.29749463341252635,-0.012659948712419933 | |
| 13 | +AAPL,11,0.6092578278618639,-0.07450109847308362,0.28347242635947373,-0.01685245881039442 | |
| 14 | +AAPL,12,0.5886459348678139,-0.07213676794170293,0.27106058703328245,-0.019773216568271895 | |
| 15 | +AAPL,13,0.568800420768663,-0.06982462644236248,0.25984165656149627,-0.0217669444035314 | |
| 16 | +AAPL,14,0.5496493503767353,-0.0675693927719444,0.24954100651698646,-0.023044935980406592 | |
| 17 | +AAPL,15,0.5311489399569297,-0.06536839573029865,0.23997398131053443,-0.02378356327568667 | |
| 18 | +AAPL,16,0.5132770560717107,-0.06322372599951319,0.2310141659353286,-0.024123963294458487 | |
| 19 | +AAPL,17,0.496013468433604,-0.061138267500336865,0.22257535969659767,-0.02417166047845966 | |
| 20 | +AAPL,18,0.4793370303990755,-0.05911349747136242,0.2145878108815769,-0.02400593496808686 | |
| 21 | +AAPL,19,0.4632265477842651,-0.057149829804445273,0.20699564954590516,-0.023686241815346128 | |
| 22 | +ADBE,0,1.0,0.0,0.0,1.0 | |
| 23 | +ADBE,1,0.9302496119741617,-0.08979219663546474,0.5094952038997101,0.2536183783054845 | |
| 24 | +ADBE,2,0.9169295663782072,-0.10006818500764342,0.611697245226565,0.13232054256197381 | |
| 25 | +ADBE,3,0.8837742214333835,-0.09426635260718419,0.3611156862623409,0.10770909754174345 | |
| 26 | +ADBE,4,0.8559936445633091,-0.08776998273882232,0.3062945138585201,0.0729878439795524 | |
| 27 | +ADBE,5,0.8289432821267331,-0.08540478602157948,0.3504167898583504,0.058761782889874214 | |
| 28 | +ADBE,6,0.7962651714174025,-0.08389279762313585,0.3346855043939802,0.027295120847726298 | |
| 29 | +ADBE,7,0.7621711443890536,-0.08082859756465624,0.3188679956141072,0.009339614454755975 | |
| 30 | +ADBE,8,0.7295058440993892,-0.07745732189707372,0.3023816922930497,-0.0006335076960069311 | |
| 31 | +ADBE,9,0.6987287180461917,-0.07422454859761651,0.2885025890618258,-0.007622538036407601 | |
| 32 | +ADBE,10,0.6691959579242378,-0.07118918494455775,0.2770967568795286,-0.012555965919188677 | |
| 33 | +ADBE,11,0.6407491157348546,-0.06826982223461041,0.26544791054696326,-0.01614127510758937 | |
| 34 | +ADBE,12,0.6134696097414513,-0.0654229337120404,0.2540179506365652,-0.018363169739888968 | |
| 35 | +ADBE,13,0.5873570052231347,-0.06267293468714324,0.24309825217733994,-0.019624433441350692 | |
| 36 | +ADBE,14,0.5623665757758173,-0.06003171167227718,0.23272319709982733,-0.020265384406715884 | |
| 37 | +ADBE,15,0.5384389256806793,-0.0574977759037973,0.22282294687109963,-0.020479148119742087 | |
| 38 | +ADBE,16,0.5155258217559241,-0.055066262960668806,0.21333334068748383,-0.020391835668203438 | |
| 39 | +ADBE,17,0.49358683562248323,-0.052733501901965414,0.20424368586227382,-0.020089627061530196 | |
| 40 | +ADBE,18,0.4725818317232195,-0.050496889522590016,0.19554379671801989,-0.019642282989600687 | |
| 41 | +ADBE,19,0.4524710029361567,-0.04835342774695021,0.1872177454090632,-0.01910114612018328 | |
| 42 | +AMD,0,1.0,0.0,0.0,1.0 | |
| 43 | +AMD,1,0.9216099428754455,-0.0683924830491683,0.3544973844001664,0.27698720135317106 | |
| 44 | +AMD,2,0.8756798974918844,-0.07990994643807461,0.4656219544236868,0.12758476044312522 | |
| 45 | +AMD,3,0.7926653286581538,-0.07090106062405853,0.3917152705044711,0.11389727263261944 | |
| 46 | +AMD,4,0.7591125327001763,-0.06635425921307453,0.37411644314252734,0.07864861048421125 | |
| 47 | +AMD,5,0.7174157370709234,-0.043654647133126404,0.29005044011208003,0.13042806663344775 | |
| 48 | +AMD,6,0.6923328039753082,-0.04359163622952846,0.29719200055218403,0.07983353443323532 | |
| 49 | +AMD,7,0.6671532624520067,-0.042551266766400905,0.2977963144357787,0.05308898250757017 | |
| 50 | +AMD,8,0.6406210197576636,-0.040212255144189524,0.28572430997669895,0.04097213672765605 | |
| 51 | +AMD,9,0.6147539952879332,-0.03783856261298321,0.2744210802800507,0.02961563912188287 | |
| 52 | +AMD,10,0.5887679265229311,-0.03445270209934623,0.25914634303836015,0.025305058845667517 | |
| 53 | +AMD,11,0.5647401715208509,-0.03243538853124536,0.24893274388806072,0.01744358326034403 | |
| 54 | +AMD,12,0.5418971793839131,-0.030713593366764925,0.2394804112141581,0.01142401290910584 | |
| 55 | +AMD,13,0.5198969177548253,-0.02906752502376507,0.22969649254857633,0.007316261870554591 | |
| 56 | +AMD,14,0.498761025571213,-0.027561197066471206,0.2203400007633771,0.003967373790777752 | |
| 57 | +AMD,15,0.4784066108558303,-0.026108699661277067,0.21112421578964127,0.001605030985135746 | |
| 58 | +AMD,16,0.4589168946826185,-0.02481873347533469,0.20249269961915797,-0.00042952611687510633 | |
| 59 | +AMD,17,0.44023626516845105,-0.023635207387615403,0.19426054193200737,-0.0020083108569678727 | |
| 60 | +AMD,18,0.42231193387282406,-0.022529162782160474,0.186327268297087,-0.0031694229465700687 | |
| 61 | +AMD,19,0.40511604511888843,-0.021496463866959414,0.17872277641877124,-0.004046274190395412 | |
| 62 | +AMZN,0,1.0,0.0,0.0,1.0 | |
| 63 | +AMZN,1,0.9630122461180568,-0.1472144359466318,0.6896034283250195,0.2163289027933604 | |
| 64 | +AMZN,2,0.9230827991186805,-0.15044978182709318,0.6708345432584873,0.07185614520518 | |
| 65 | +AMZN,3,0.8482597311409547,-0.14834830194548151,0.4263087027514362,0.05445592667490899 | |
| 66 | +AMZN,4,0.851860457960401,-0.15218785059711193,0.46348056855285674,0.007900337250567324 | |
| 67 | +AMZN,5,0.8004860774792211,-0.1436754101167279,0.3957341266197361,0.019591093227248113 | |
| 68 | +AMZN,6,0.7709348067899628,-0.14365873448790892,0.38455672655277096,-0.009911753732239278 | |
| 69 | +AMZN,7,0.7368112243373873,-0.14042439908251717,0.35940989427046793,-0.026245309856837512 | |
| 70 | +AMZN,8,0.7058794978690323,-0.1362751478490097,0.3355451643835669,-0.03416248772637768 | |
| 71 | +AMZN,9,0.6757665642555865,-0.13184240673217562,0.3169844919584103,-0.039869870003371 | |
| 72 | +AMZN,10,0.6474322518250007,-0.12713289256836377,0.29983439650376476,-0.04222807483821417 | |
| 73 | +AMZN,11,0.6204161710950068,-0.12257944886752056,0.2849825752608759,-0.04419475907536519 | |
| 74 | +AMZN,12,0.5946742052203644,-0.11802850151624136,0.2715160897575033,-0.04515132891984227 | |
| 75 | +AMZN,13,0.5699930199917695,-0.11351159064439102,0.2588332817091141,-0.04520059716336538 | |
| 76 | +AMZN,14,0.546435892540753,-0.1090957182241245,0.24718642299001395,-0.044745934016620754 | |
| 77 | +AMZN,15,0.5238802239627898,-0.10478935684634676,0.2362666697360153,-0.0438940331462555 | |
| 78 | +AMZN,16,0.502293181737683,-0.10061718643582157,0.22602517799971744,-0.042824759615891037 | |
| 79 | +AMZN,17,0.4816153397306821,-0.0965818757632098,0.21635357258193524,-0.04160521518940502 | |
| 80 | +AMZN,18,0.4618047658240825,-0.09268639113244265,0.2071828062848707,-0.04028672224005844 | |
| 81 | +AMZN,19,0.4428207515357821,-0.08893245775244751,0.19846929915158673,-0.0389166470045503 | |
| 82 | +BA,0,1.0,0.0,0.0,1.0 | |
| 83 | +BA,1,0.9129241026443531,0.0073042176456299766,0.8895119743268154,0.264329206699581 | |
| 84 | +BA,2,0.9010853430049565,0.009004109414549936,0.9318869401780445,0.2060621366503314 | |
| 85 | +BA,3,0.836832276214177,0.009980980307738795,0.6527571413304563,0.17532532992117758 | |
| 86 | +BA,4,0.8462684752718378,0.008384714828365695,0.6935844842550103,0.15866806361704613 | |
| 87 | +BA,5,0.83645709066775,0.010251972436108045,0.5504694748912635,0.16715356693448952 | |
| 88 | +BA,6,0.8312343643829576,0.011068354401594965,0.5901428276746988,0.11201778944343246 | |
| 89 | +BA,7,0.8220914954012669,0.011653046625350855,0.5626045347372313,0.09236117057596807 | |
| 90 | +BA,8,0.8144042697752365,0.011858377549605035,0.5419661976108355,0.07701678959110603 | |
| 91 | +BA,9,0.8065530282377961,0.012033637219913405,0.5242506007731879,0.06561747895388143 | |
| 92 | +BA,10,0.7986747302771847,0.012267843124272431,0.5066120190064096,0.05591993773813873 | |
| 93 | +BA,11,0.7907896173087221,0.012413273565982836,0.49649921018557647,0.04576324498777548 | |
| 94 | +BA,12,0.7829791897057976,0.012493732255130622,0.485403916276488,0.03861009627514227 | |
| 95 | +BA,13,0.7752147537119843,0.012525764042255392,0.47546199974431247,0.032850750450285016 | |
| 96 | +BA,14,0.7675061867058403,0.012531224301520809,0.4665608136881281,0.02818936373590885 | |
| 97 | +BA,15,0.759839397172293,0.01251726450600065,0.4584798390111968,0.024316322620567803 | |
| 98 | +BA,16,0.7522353812513833,0.01248117044639439,0.45130731566996823,0.021071688481912168 | |
| 99 | +BA,17,0.744693803078175,0.012427794553461123,0.4445837071389653,0.018470563466586026 | |
| 100 | +BA,18,0.7372170847293092,0.012361002736743575,0.4383273655875981,0.016345594679181112 | |
| 101 | +BA,19,0.7298056324386702,0.012284182988708866,0.43246078526838816,0.014603676539291911 | |
| 102 | +BAC,0,1.0,0.0,0.0,1.0 | |
| 103 | +BAC,1,0.857444805385889,0.00036693884833089064,0.8336970188965066,0.26768769101765827 | |
| 104 | +BAC,2,0.8761059942816519,-0.012277971855453998,0.8511397775404098,0.161482548596577 | |
| 105 | +BAC,3,0.8150113133035229,-0.003249147168664313,0.7445448575440152,0.13086036045951663 | |
| 106 | +BAC,4,0.8053327726852659,0.01181606265983437,0.6610543515201929,0.11334714931946659 | |
| 107 | +BAC,5,0.7894467097018443,0.010705576451400594,0.5560247851777461,0.08396714384977678 | |
| 108 | +BAC,6,0.7760612792121268,0.012148778056578055,0.5334235676600818,0.060758771713908574 | |
| 109 | +BAC,7,0.7598324744993864,0.012975533599330298,0.5029342054109265,0.04741126452040932 | |
| 110 | +BAC,8,0.7433583073241822,0.014056263801023894,0.47989254613066046,0.036908024695989375 | |
| 111 | +BAC,9,0.7260910487566486,0.014399262826112596,0.4573195025295756,0.02857912627062953 | |
| 112 | +BAC,10,0.7095428424492302,0.014593265001738775,0.4390922406644709,0.023222477206851506 | |
| 113 | +BAC,11,0.6930572048842863,0.014638770150614025,0.42336616397886917,0.019188243462795348 | |
| 114 | +BAC,12,0.6768789067463817,0.014574680739088417,0.409557755463487,0.01621048368673612 | |
| 115 | +BAC,13,0.6609158873181507,0.014419968881592552,0.3970691010682944,0.01396134915062413 | |
| 116 | +BAC,14,0.6452710617711503,0.014220708125577096,0.3856567784767746,0.012314796098121465 | |
| 117 | +BAC,15,0.6299363702503442,0.013984640667786565,0.375017603793148,0.011074522029861986 | |
| 118 | +BAC,16,0.6149302676825431,0.013725155039212593,0.36502748215043196,0.010126641724296472 | |
| 119 | +BAC,17,0.6002523228127461,0.013449837718753736,0.3555514281025076,0.009391601112162204 | |
| 120 | +BAC,18,0.5859053402089238,0.013166321356374546,0.34650652933776327,0.00881279859273149 | |
| 121 | +BAC,19,0.5718862660139638,0.012878588956847367,0.33782113488673376,0.008346512092856289 | |
| 122 | +CAT,0,1.0,0.0,0.0,1.0 | |
| 123 | +CAT,1,0.9074584869596091,-0.014682054310053521,0.55924984519433,0.20245826148689058 | |
| 124 | +CAT,2,0.8622457385692808,-0.016727066263146483,0.6611262341800169,0.10920134987851622 | |
| 125 | +CAT,3,0.7851999604426694,-0.011976279064363698,0.5229396666863386,0.127312516365079 | |
| 126 | +CAT,4,0.7542344667733182,-0.004222821580681384,0.44766533611924175,0.09235874476355718 | |
| 127 | +CAT,5,0.744901441313831,-0.013251593729580406,0.37349251525252736,0.09409494747710274 | |
| 128 | +CAT,6,0.7298640875437037,-0.014498699630612146,0.3860959956391487,0.049556167617880766 | |
| 129 | +CAT,7,0.7107037613410492,-0.014667544958128052,0.3804841442851088,0.031150907278694295 | |
| 130 | +CAT,8,0.6908830925133101,-0.014413462504823109,0.3622813814493033,0.023916842556721447 | |
| 131 | +CAT,9,0.6720679046394503,-0.014097425790652924,0.34676372444421694,0.015601822640661756 | |
| 132 | +CAT,10,0.6549866105570429,-0.01433845784777273,0.3328219277021699,0.010715849219363707 | |
| 133 | +CAT,11,0.6382329826431531,-0.014256720866039997,0.3231639081551058,0.005527386895110862 | |
| 134 | +CAT,12,0.6217609818277453,-0.014044847175694845,0.31385739456355616,0.002112555326464662 | |
| 135 | +CAT,13,0.6056736113191743,-0.013796267229297613,0.3044973570659458,-2.570470337901181e-05 | |
| 136 | +CAT,14,0.5900252921333328,-0.01351940545770117,0.29571847981667804,-0.0016905927254390473 | |
| 137 | +CAT,15,0.5748387301774632,-0.013251393765036767,0.2873940044804407,-0.0028328862694108267 | |
| 138 | +CAT,16,0.5600497613551891,-0.012965084588651551,0.2795690048146488,-0.0036892340692863345 | |
| 139 | +CAT,17,0.5456398944245575,-0.012668826217735464,0.2720632082068517,-0.004274340799742579 | |
| 140 | +CAT,18,0.531603080222023,-0.012370631672482566,0.26481069929724665,-0.004650351014816561 | |
| 141 | +CAT,19,0.5179308065537698,-0.012072635614856886,0.2578127444901149,-0.0048942836518266215 | |
| 142 | +COST,0,1.0,0.0,0.0,1.0 | |
| 143 | +COST,1,0.8953710285140365,-0.03769943216849857,0.5211517642857717,0.26112028580835783 | |
| 144 | +COST,2,0.8866184479806736,-0.027515730127135856,0.5522555538921529,0.15073489840194698 | |
| 145 | +COST,3,0.7930870428921594,-0.00960545860529741,0.4408141280939774,0.13862643709440653 | |
| 146 | +COST,4,0.8024067492147882,-0.008026697022750856,0.3648880984958204,0.14667557577728427 | |
| 147 | +COST,5,0.7769576570265878,-0.018866328376254172,0.3353528864634105,0.12555185954505302 | |
| 148 | +COST,6,0.7566709511656414,-0.02054270303213952,0.34148961715996584,0.0762462342775953 | |
| 149 | +COST,7,0.7263753381799705,-0.019475969007860895,0.32260038672563507,0.054486867096699296 | |
| 150 | +COST,8,0.7029788370000335,-0.018326284743411445,0.3004005806246918,0.04349814348255966 | |
| 151 | +COST,9,0.6800194456323978,-0.018810350792612264,0.28217954313783633,0.03449014398801037 | |
| 152 | +COST,10,0.6587459110550203,-0.019107657884635573,0.2700186643467206,0.025113536570516147 | |
| 153 | +COST,11,0.6371515491863103,-0.018914024647220848,0.25920495115973324,0.01708364159559659 | |
| 154 | +COST,12,0.6164466546699291,-0.01847232414105251,0.24828727629604758,0.011723423813865319 | |
| 155 | +COST,13,0.5964454126120496,-0.018081608981412776,0.23792428224291295,0.007892272222823678 | |
| 156 | +COST,14,0.5772576961794613,-0.01771357845992938,0.22863234188462084,0.004852171974516437 | |
| 157 | +COST,15,0.558652183091776,-0.017310540417979275,0.22015711772454952,0.0023877592813042314 | |
| 158 | +COST,16,0.540648632776379,-0.016862115515075913,0.21219728118543887,0.0005083172883495902 | |
| 159 | +COST,17,0.5232269639296564,-0.01640087815116605,0.2046302305817998,-0.0008671322963345555 | |
| 160 | +COST,18,0.5063884455099736,-0.015941035670724638,0.19746490953418494,-0.0018854539512901626 | |
| 161 | +COST,19,0.49009949025636174,-0.015484126171822536,0.19067462067836827,-0.00264879477539663 | |
| 162 | +CRM,0,1.0,0.0,0.0,1.0 | |
| 163 | +CRM,1,0.9369081280835183,-0.10206266498685759,0.532063417891342,0.29601800378305 | |
| 164 | +CRM,2,0.928590030555905,-0.11084458721828429,0.5733308060598477,0.10059478694975552 | |
| 165 | +CRM,3,0.8867882008305961,-0.09938477746251494,0.5278476344969681,0.11092848484680232 | |
| 166 | +CRM,4,0.8647883767249795,-0.09093490368221449,0.5072110762431826,0.06022544698848056 | |
| 167 | +CRM,5,0.8245839556707626,-0.08393037456558257,0.4260517307012885,0.045326671637830246 | |
| 168 | +CRM,6,0.7985062099616003,-0.08053975714595496,0.40072646982716853,0.026695685523968428 | |
| 169 | +CRM,7,0.7713095828552833,-0.07715822785955827,0.3800492427990386,0.010082906993551376 | |
| 170 | +CRM,8,0.7448487844718182,-0.07369864174748775,0.3576690836158844,0.0008657060203442063 | |
| 171 | +CRM,9,0.7187383802977059,-0.07065977696091062,0.3391584315266757,-0.00658006332220883 | |
| 172 | +CRM,10,0.6936111982320866,-0.06782098682060468,0.32279571238918064,-0.01181964342707021 | |
| 173 | +CRM,11,0.6692865763140922,-0.06516287292130496,0.30802311476056254,-0.015290847233730313 | |
| 174 | +CRM,12,0.6457910294353897,-0.06267374282850921,0.2947522453893507,-0.01772186489968189 | |
| 175 | +CRM,13,0.6230671626543741,-0.060318409784952544,0.28251271815618634,-0.019284294317778766 | |
| 176 | +CRM,14,0.6011251201465247,-0.05808299375807857,0.2711907096352692,-0.020221168772255216 | |
| 177 | +CRM,15,0.5799353595280617,-0.0559532963564658,0.26061730026910296,-0.02071147947051382 | |
| 178 | +CRM,16,0.5594784560326173,-0.053918292258801404,0.2506681042441747,-0.020870311745701232 | |
| 179 | +CRM,17,0.5397326464805766,-0.05197003437205338,0.2412617000651521,-0.020793523542471666 | |
| 180 | +CRM,18,0.520676144786741,-0.05010151731972098,0.23232884495780284,-0.020548788432848984 | |
| 181 | +CRM,19,0.5022867111970246,-0.04830709101451176,0.22381575459929334,-0.02018569040923219 | |
| 182 | +CSCO,0,1.0,0.0,0.0,1.0 | |
| 183 | +CSCO,1,0.972787550529081,-0.11512341195869634,0.4821651723294605,0.2568679134767055 | |
| 184 | +CSCO,2,0.9499946785540814,-0.12459265222362231,0.49199696804140536,0.10002009165866602 | |
| 185 | +CSCO,3,0.9415791957856768,-0.11379886134019825,0.4973695302549732,0.10357014300219762 | |
| 186 | +CSCO,4,0.9194113514035727,-0.10548204339160347,0.5467706563955567,0.07223325805308951 | |
| 187 | +CSCO,5,0.8608136308260451,-0.0948732332283737,0.43879153938296195,0.09170102753029563 | |
| 188 | +CSCO,6,0.823707843134344,-0.09409260922183664,0.43126126391479214,0.04967156242421729 | |
| 189 | +CSCO,7,0.7853801634446855,-0.08991724869002558,0.41763489753315136,0.025916475520795207 | |
| 190 | +CSCO,8,0.7463497920105484,-0.08443255906271091,0.39345259729751114,0.016910541569099928 | |
| 191 | +CSCO,9,0.7090469346903681,-0.07972114234469019,0.37311662452946975,0.007731039281956384 | |
| 192 | +CSCO,10,0.6734562830747262,-0.07535010881189058,0.35097864333532974,0.0016806305894069562 | |
| 193 | +CSCO,11,0.6399952942150099,-0.07151668736190771,0.33272775291362605,-0.004644057321254377 | |
| 194 | +CSCO,12,0.6081205560741167,-0.06781681906591472,0.315699361456072,-0.009331952335491535 | |
| 195 | +CSCO,13,0.5777424194701862,-0.0642596881210747,0.29911793713217966,-0.012362026468177769 | |
| 196 | +CSCO,14,0.5488920296765258,-0.060928897633068406,0.28362186255180705,-0.014640615105364362 | |
| 197 | +CSCO,15,0.521470056139547,-0.057790901811011056,0.2689200653061055,-0.0162265189541382 | |
| 198 | +CSCO,16,0.4954273273330073,-0.054835455740431624,0.2551141979644766,-0.017328881148537985 | |
| 199 | +CSCO,17,0.4706833875993184,-0.052039108766276765,0.2420891689739495,-0.018004655894327558 | |
| 200 | +CSCO,18,0.44716976322314517,-0.04939048878658024,0.22974800829318132,-0.018325242607441613 | |
| 201 | +CSCO,19,0.42482977474106365,-0.04688420629605586,0.21807306355873296,-0.018393465106911526 | |
| 202 | +CVX,0,1.0,0.0,0.0,1.0 | |
| 203 | +CVX,1,0.8865894058179159,0.005360067204719172,0.8389715259035978,0.2300782112036549 | |
| 204 | +CVX,2,0.9026559685800627,-0.001942924130265933,0.763511548202953,0.18257908171509774 | |
| 205 | +CVX,3,0.8248082257210556,-9.824646574287024e-05,0.5792203052272696,0.19173153805908608 | |
| 206 | +CVX,4,0.780259901039041,0.0022446575926685507,0.46809474636346227,0.16842992506815552 | |
| 207 | +CVX,5,0.7771308855586784,-0.003915084131395898,0.4494361227338709,0.16440347608607636 | |
| 208 | +CVX,6,0.7649089375920807,-0.00405681077098294,0.481147406766556,0.1065776902964659 | |
| 209 | +CVX,7,0.7566873503111022,-0.005329491944526169,0.4679315392334469,0.08777590246878474 | |
| 210 | +CVX,8,0.7447074897006453,-0.005692441748668763,0.4498358812761193,0.07504857008011652 | |
| 211 | +CVX,9,0.732755769114896,-0.006011541370991276,0.435768497806762,0.06165941836319786 | |
| 212 | +CVX,10,0.7213665405575463,-0.006668689161398758,0.426039967426608,0.0503751366501804 | |
| 213 | +CVX,11,0.7099218519872615,-0.0069411638948736485,0.4180767820822008,0.039432466579218714 | |
| 214 | +CVX,12,0.6988779126319022,-0.007204094094906879,0.408790487003058,0.03181137057139085 | |
| 215 | +CVX,13,0.688005736655067,-0.007372255088369327,0.40016727363497395,0.02560405046712675 | |
| 216 | +CVX,14,0.6773473628081766,-0.007493334726274796,0.3923329730984114,0.02030057080031689 | |
| 217 | +CVX,15,0.6668666095996304,-0.007585542335243747,0.3850217456743874,0.01591771310416214 | |
| 218 | +CVX,16,0.6565401697195676,-0.0076285384524714065,0.37802744948756384,0.01228460907535585 | |
| 219 | +CVX,17,0.6463847156830667,-0.007645441048906747,0.3712462837967662,0.009365549946847304 | |
| 220 | +CVX,18,0.6363934149509912,-0.00763787405502823,0.3647503434874115,0.006968263564604673 | |
| 221 | +CVX,19,0.6265643858949579,-0.0076114096847693935,0.35850834308645313,0.00499272948968782 | |
| 222 | +DIA,0,1.0,0.0,0.0,1.0 | |
| 223 | +DIA,1,0.8259660693236535,0.021928224446557065,0.7098260281064744,0.3236127745626069 | |
| 224 | +DIA,2,0.8265850467230329,0.00670699141242472,0.7336921384676561,0.22919579730458545 | |
| 225 | +DIA,3,0.7614948874613875,0.009166897974562317,0.6861854098641273,0.23471892166260955 | |
| 226 | +DIA,4,0.7244137245884323,0.02016279381820677,0.6008767565083741,0.19122688232276305 | |
| 227 | +DIA,5,0.7327538779690129,-0.0013222647901705402,0.4641213750429144,0.18243420774679653 | |
| 228 | +DIA,6,0.7118901683748192,-0.001826078146017894,0.4791864998174117,0.1250984930038001 | |
| 229 | +DIA,7,0.6977850186371733,-0.004905450329967668,0.4563596188330983,0.09821752863309731 | |
| 230 | +DIA,8,0.6791347217619775,-0.006771688895278053,0.43279582409146344,0.0794829461739725 | |
| 231 | +DIA,9,0.6614690753315572,-0.00758419566654733,0.4095711822158395,0.061634184383809236 | |
| 232 | +DIA,10,0.6482172326879565,-0.009838130891100036,0.3844574958334684,0.05060445658816547 | |
| 233 | +DIA,11,0.6337577605722308,-0.010724203007400759,0.3702111391332611,0.03834906417842124 | |
| 234 | +DIA,12,0.62021167835402,-0.011556784995377463,0.35598626482979195,0.029351780868848085 | |
| 235 | +DIA,13,0.6067640900225522,-0.012132642671852725,0.3433218507605293,0.02231017264493735 | |
| 236 | +DIA,14,0.5936697150923331,-0.012468580854968865,0.3318362274688267,0.01649522690889757 | |
| 237 | +DIA,15,0.5811849695521557,-0.012794253221105325,0.3209868559463411,0.012074811018328597 | |
| 238 | +DIA,16,0.5689505994164094,-0.012954449734737786,0.3115553123122308,0.008328817364988394 | |
| 239 | +DIA,17,0.5570687149614781,-0.013041154951465222,0.3028021703431038,0.005371307344144306 | |
| 240 | +DIA,18,0.5454665987154824,-0.013056767280747403,0.29469935616693316,0.0030205784332569072 | |
| 241 | +DIA,19,0.5341394150816713,-0.013011989740588772,0.28713148022520923,0.001136958921146799 | |
| 242 | +DIS,0,1.0,0.0,0.0,1.0 | |
| 243 | +DIS,1,0.9421149368957913,-0.06510740217959272,0.7473336485853116,0.2551705364907918 | |
| 244 | +DIS,2,0.9128274884693728,-0.06779800573166743,0.8775613197146518,0.1623892117400965 | |
| 245 | +DIS,3,0.8316361905542632,-0.07444630437795952,0.7435161128581318,0.1272568742901669 | |
| 246 | +DIS,4,0.8058052264042599,-0.07136709269954439,0.6777105166682309,0.0883631239271808 | |
| 247 | +DIS,5,0.7720284303440503,-0.06865434105572679,0.49226738618030075,0.09304709553430521 | |
| 248 | +DIS,6,0.7579656915964054,-0.07057942284810206,0.47772399553673317,0.056853632907869746 | |
| 249 | +DIS,7,0.739439644654437,-0.07101237948525921,0.45011325196917534,0.03664235422688911 | |
| 250 | +DIS,8,0.7225098565983874,-0.07100519991590373,0.42498022724606227,0.023046426098590585 | |
| 251 | +DIS,9,0.7045660108916916,-0.07045688373497805,0.40001509600355506,0.010888898169623733 | |
| 252 | +DIS,10,0.6872919997211958,-0.06962916632681279,0.37569752328313655,0.0026015032889116912 | |
| 253 | +DIS,11,0.6709609725364826,-0.06876008562232039,0.35719913442562035,-0.004483809701512121 | |
| 254 | +DIS,12,0.6552969530341278,-0.06775753184460563,0.3413738445014862,-0.009823281082348347 | |
| 255 | +DIS,13,0.6401440970299491,-0.06666937313350818,0.32737322180650735,-0.013837540722454598 | |
| 256 | +DIS,14,0.6254396721417597,-0.06551966275304111,0.31510686049328857,-0.01696236405183315 | |
| 257 | +DIS,15,0.611146252039759,-0.0643240708567612,0.3040633483232555,-0.019277727957567176 | |
| 258 | +DIS,16,0.5972567794000437,-0.06310238658644166,0.2941369562416459,-0.020990046521822035 | |
| 259 | +DIS,17,0.5837398235527824,-0.061864146815238226,0.28508468705445,-0.02221799329797541 | |
| 260 | +DIS,18,0.5705745352551048,-0.06061929875725916,0.2767495959888198,-0.02306401517566846 | |
| 261 | +DIS,19,0.5577421154629407,-0.0593753061109999,0.26901949297245875,-0.023615438485122767 | |
| 262 | +GLD,0,1.0,0.0,0.0,1.0 | |
| 263 | +GLD,1,0.9274853718598451,-0.005911254983985574,0.7945322678247071,0.14255371841413708 | |
| 264 | +GLD,2,0.8704697133940899,-0.010520854319886232,0.5067076211161176,0.14615589704649648 | |
| 265 | +GLD,3,0.8022219014891949,-0.020155699737650686,0.6140714201940174,0.07006347032839327 | |
| 266 | +GLD,4,0.8104868111346203,-0.02042263059116149,0.5771142036850369,0.0907766756229912 | |
| 267 | +GLD,5,0.8006167729750047,-0.028177072835242366,0.47424439469047047,0.04822150857110979 | |
| 268 | +GLD,6,0.7834542797668115,-0.029047970026613426,0.4537325240103655,0.018843521716030428 | |
| 269 | +GLD,7,0.7656267787305888,-0.030556448132958974,0.43847768360067907,0.0075144769957212814 | |
| 270 | +GLD,8,0.750945008931651,-0.030672110039338656,0.43301502921810575,0.0006983066456409249 | |
| 271 | +GLD,9,0.7368448646785977,-0.03120732395709347,0.41347404854192865,-0.004897669186456762 | |
| 272 | +GLD,10,0.7235142897333025,-0.031219706656838944,0.40041183001417513,-0.008987277234574542 | |
| 273 | +GLD,11,0.7103156570034918,-0.031048939890183334,0.39082780382012366,-0.01161612924628943 | |
| 274 | +GLD,12,0.6975468850098729,-0.030718937822275666,0.3828375415715608,-0.013058167162487113 | |
| 275 | +GLD,13,0.6850142908544823,-0.030353259884071802,0.3747662747373499,-0.014060983640798583 | |
| 276 | +GLD,14,0.6728168501330605,-0.029935182994287705,0.36711409249821697,-0.014602860304057433 | |
| 277 | +GLD,15,0.6608709468288162,-0.02948727786242476,0.36001767465334267,-0.014901942885746491 | |
| 278 | +GLD,16,0.649165797074994,-0.029017698509799912,0.3533089645245257,-0.015003603937373815 | |
| 279 | +GLD,17,0.6376768151991268,-0.02854153177170481,0.34681822901353626,-0.01499213551950349 | |
| 280 | +GLD,18,0.6264044328896334,-0.0280619749502232,0.34051776176025106,-0.014895771757393124 | |
| 281 | +GLD,19,0.6153400379971409,-0.027583477112239668,0.33438552806549704,-0.014746703731853075 | |
| 282 | +GOOG,0,1.0,0.0,0.0,1.0 | |
| 283 | +GOOG,1,0.9480202023821587,-0.11604163938363206,0.4399483803299463,0.21308731645748163 | |
| 284 | +GOOG,2,0.9289940924809312,-0.11510867852487197,0.5175094229170479,0.11564999244402888 | |
| 285 | +GOOG,3,0.8462322429309753,-0.12109299725587105,0.39317529392198963,0.11032422409850384 | |
| 286 | +GOOG,4,0.8348513427415355,-0.12403880335249341,0.41514936195036034,0.05384784401311732 | |
| 287 | +GOOG,5,0.7916519293571167,-0.10712741945258633,0.35353899383986387,0.06565647298818467 | |
| 288 | +GOOG,6,0.7713850051149287,-0.10825338462782277,0.35644603181266266,0.028618569173887644 | |
| 289 | +GOOG,7,0.7458838362914105,-0.10603501854192426,0.3462487782475707,0.010032639074854695 | |
| 290 | +GOOG,8,0.7220471376201953,-0.1037855103177832,0.3329342456305959,-0.0006494743001168174 | |
| 291 | +GOOG,9,0.6985211222000688,-0.10112349679772192,0.3220642300785271,-0.010611108699539056 | |
| 292 | +GOOG,10,0.6753786314632352,-0.09796269726492128,0.31027534052193867,-0.01673002675684384 | |
| 293 | +GOOG,11,0.6533006867929377,-0.09515783471635039,0.29990474180622523,-0.02196188543902093 | |
| 294 | +GOOG,12,0.6319749228992009,-0.09234910131694171,0.28994828749215873,-0.02563555896794342 | |
| 295 | +GOOG,13,0.6113170840317289,-0.0895421662615058,0.28018771243670293,-0.028049288683345535 | |
| 296 | +GOOG,14,0.5913466719712328,-0.08678607439495024,0.2708838175664191,-0.029722400765835974 | |
| 297 | +GOOG,15,0.5720155530259375,-0.0840712609298303,0.261888268700976,-0.03072718452968663 | |
| 298 | +GOOG,16,0.553325099389867,-0.08142386972121744,0.2532314728031215,-0.031262346342004074 | |
| 299 | +GOOG,17,0.5352472388105255,-0.07884074936334477,0.244883089029462,-0.03143184464097625 | |
| 300 | +GOOG,18,0.5177600241674432,-0.07632371606577658,0.23682025097598572,-0.03132150567585842 | |
| 301 | +GOOG,19,0.5008452018077216,-0.0738759972651794,0.2290370979849209,-0.031009004210283006 | |
| 302 | +GS,0,1.0,0.0,0.0,1.0 | |
| 303 | +GS,1,0.8840168464435632,-0.0069360779822119694,0.6554801329009209,0.2685559911965461 | |
| 304 | +GS,2,0.8947206809386866,-0.004479889732698613,0.7384475050501692,0.20482656693491452 | |
| 305 | +GS,3,0.7990586283883296,-0.009314643190070237,0.5896972059580371,0.15621027283475525 | |
| 306 | +GS,4,0.7794785720255601,0.006717209170207379,0.5212568633443448,0.11554823221885822 | |
| 307 | +GS,5,0.7631189100219468,-0.001096576313333356,0.4364948602644998,0.12301436490404705 | |
| 308 | +GS,6,0.7510046074238181,0.00014825098847821416,0.44693552637215905,0.0795452628519446 | |
| 309 | +GS,7,0.7318175676923301,-0.001113609132048294,0.4342494124570859,0.05865747056685594 | |
| 310 | +GS,8,0.713742572795901,-0.0007789163280501697,0.41736325156695786,0.04498108440597512 | |
| 311 | +GS,9,0.6948489741598429,-0.0003274265261656662,0.40008739740357296,0.0333273140315818 | |
| 312 | +GS,10,0.6780655134122744,-0.0004353545132669409,0.3838228406349635,0.02692633047098391 | |
| 313 | +GS,11,0.6613524058203497,-0.0004440955425506661,0.37197192296093456,0.020013549329566744 | |
| 314 | +GS,12,0.6451419346027513,-0.00045645421839314235,0.360938318146644,0.015120634326572529 | |
| 315 | +GS,13,0.6291915932970124,-0.0004581793801126518,0.35033845825528154,0.011459017583840794 | |
| 316 | +GS,14,0.6136328236100501,-0.000422007702564094,0.34036432148421053,0.008624247551477244 | |
| 317 | +GS,15,0.5984836477368441,-0.0004171500455849319,0.33083209514401946,0.006577871674819202 | |
| 318 | +GS,16,0.5837161329083966,-0.0004057053153446793,0.3219062437454384,0.004951437795145636 | |
| 319 | +GS,17,0.5693108054300953,-0.0003972804503747456,0.3133856596763979,0.003719899356520156 | |
| 320 | +GS,18,0.5552597783588178,-0.000388087092244473,0.3052079994539248,0.002786745854753094 | |
| 321 | +GS,19,0.5415528628909646,-0.0003777437805933723,0.2973355675266417,0.0020738910684732358 | |
| 322 | +HD,0,1.0,0.0,0.0,1.0 | |
| 323 | +HD,1,0.8625233116495779,-0.010607965903704738,0.40326956787693824,0.23601558075520676 | |
| 324 | +HD,2,0.8644470190241289,0.0015274125888961095,0.621017582122787,0.14626975821789653 | |
| 325 | +HD,3,0.8181919587256571,-0.002548260584611853,0.5294863977482251,0.16738590320402377 | |
| 326 | +HD,4,0.7752357268473165,0.003611116630823046,0.4775591143653331,0.1370291523344889 | |
| 327 | +HD,5,0.7600963059365593,-0.0013849445128538375,0.3961799993774602,0.1361028468802876 | |
| 328 | +HD,6,0.7392497170152056,-0.0017534322555517717,0.4032886458547081,0.08672962931298736 | |
| 329 | +HD,7,0.7185884776670011,-0.0012654140780202225,0.3986483761372386,0.06496355237558693 | |
| 330 | +HD,8,0.6986296931570192,-0.0016114143982310257,0.3800607258126723,0.05521489877382395 | |
| 331 | +HD,9,0.6785153994390317,-0.0014389319911622886,0.36566635501514155,0.04348199227774918 | |
| 332 | +HD,10,0.6596432700932603,-0.0016826058868612357,0.35090056201873226,0.03496476632622527 | |
| 333 | +HD,11,0.6411819135893655,-0.0017428976913521016,0.34010479377320246,0.026713396670926474 | |
| 334 | +HD,12,0.6231521856663965,-0.001724275950203735,0.3295541924717714,0.020762458724846625 | |
| 335 | +HD,13,0.6056814779480075,-0.0017432727467358352,0.31884595964490586,0.0164632060874634 | |
| 336 | +HD,14,0.5886783273468446,-0.0017308439780774698,0.3089120498998881,0.012832894046539893 | |
| 337 | +HD,15,0.5721760797136324,-0.0017229930016060234,0.2994370191259403,0.00998559892136535 | |
| 338 | +HD,16,0.5561357733232244,-0.0017038648954576883,0.29047908221563423,0.007700137666765594 | |
| 339 | +HD,17,0.5405409422472087,-0.0016759982433817676,0.28188332110323533,0.005914184647835429 | |
| 340 | +HD,18,0.5253872786761303,-0.001646968793694195,0.2735913630648211,0.004524521409687817 | |
| 341 | +HD,19,0.5106586560784486,-0.0016144432947123406,0.26562291814351546,0.0034181329327987943 | |
| 342 | +HON,0,1.0,0.0,0.0,1.0 | |
| 343 | +HON,1,0.8406507769938706,-0.0019419140899849933,0.610258110561454,0.19595794516449808 | |
| 344 | +HON,2,0.8528450340194691,-0.005467773523937914,0.5548642805092596,0.1076460992035044 | |
| 345 | +HON,3,0.7448939420434656,0.00013196973634813937,0.5664427982129981,0.16459734079058055 | |
| 346 | +HON,4,0.711507351303684,0.0037143579356993723,0.4372602658460686,0.1280294878428937 | |
| 347 | +HON,5,0.7017091319781299,0.0037894332130488165,0.34251951844008904,0.12498666588805649 | |
| 348 | +HON,6,0.6930767768857874,0.0040665773116060205,0.3660436493785853,0.07665080151358614 | |
| 349 | +HON,7,0.6835334503822222,0.004181451048997157,0.35573407805737484,0.059968244506150487 | |
| 350 | +HON,8,0.66858851199105,0.004687268611549819,0.3477523372545333,0.052898290573346426 | |
| 351 | +HON,9,0.6536314528410498,0.005033530104907024,0.3322600566446717,0.04144121310054376 | |
| 352 | +HON,10,0.6391567088471373,0.005169012687448632,0.31792723791848526,0.033443091145343176 | |
| 353 | +HON,11,0.6254677580844841,0.005269274180053978,0.3090349750618295,0.026229536278274734 | |
| 354 | +HON,12,0.6122375360398576,0.005317769854692451,0.2997788147208078,0.021256617025321875 | |
| 355 | +HON,13,0.5992124497388358,0.0053399878499525485,0.29146794806054893,0.017496030437506176 | |
| 356 | +HON,14,0.5864103851081081,0.005330784803334855,0.28365430230137856,0.014226923729004038 | |
| 357 | +HON,15,0.5738451074599737,0.005296411711720652,0.27629119766837595,0.011703941561642277 | |
| 358 | +HON,16,0.5615401175890827,0.005247567350658613,0.26943971029502717,0.009707014033304701 | |
| 359 | +HON,17,0.5494977086871412,0.005185865329091818,0.2628727780316124,0.008142322349018726 | |
| 360 | +HON,18,0.5377105797244068,0.005114547450872803,0.25661854955403235,0.006902412190642128 | |
| 361 | +HON,19,0.5261730276303707,0.005036055491959872,0.25063565844914193,0.005904468002214373 | |
| 362 | +INTC,0,1.0,0.0,0.0,1.0 | |
| 363 | +INTC,1,0.9233743828964347,-0.06326616558363858,0.6971859776243231,0.2801747234728094 | |
| 364 | +INTC,2,0.9193187866322734,-0.06317372483696333,0.7800264493821065,0.0918821874929686 | |
| 365 | +INTC,3,0.861007840691101,-0.061619029818594566,0.5019863012379547,0.08413242104222124 | |
| 366 | +INTC,4,0.8797610036342828,-0.06957425082161524,0.6927630875333044,0.06715638270188645 | |
| 367 | +INTC,5,0.8435380180354702,-0.06865207103821387,0.4686304775058173,0.07484758066552272 | |
| 368 | +INTC,6,0.8358248885826968,-0.0715383820699661,0.4616004148033911,0.03678712258152163 | |
| 369 | +INTC,7,0.8221211714533581,-0.0724209275644223,0.43800165927079815,0.01240806484005675 | |
| 370 | +INTC,8,0.8097266748194496,-0.07285775665555252,0.423308763547745,-5.4400756738837847e-05 | |
| 371 | +INTC,9,0.7982797148256406,-0.07289375261183231,0.40493389188172646,-0.005789073305353401 | |
| 372 | +INTC,10,0.7869325031498874,-0.07273774114057388,0.3870540757342693,-0.011421609799466582 | |
| 373 | +INTC,11,0.776263744589283,-0.07243523706881465,0.3747497586570771,-0.016970703506544726 | |
| 374 | +INTC,12,0.7658564061169486,-0.071973428456552,0.36501831949193325,-0.02109993541757362 | |
| 375 | +INTC,13,0.7557677639717707,-0.07140222371952051,0.35682064342928693,-0.023750415955562067 | |
| 376 | +INTC,14,0.7458921149484924,-0.07075128405935577,0.3491327571215105,-0.025471276146763307 | |
| 377 | +INTC,15,0.7362351821737172,-0.0700514754153492,0.34226648624480865,-0.0267486955607733 | |
| 378 | +INTC,16,0.7267678428150524,-0.06931503654679022,0.3361595935765484,-0.027689769955864158 | |
| 379 | +INTC,17,0.7174705421604375,-0.06855215936028052,0.3306291928126111,-0.02831148860944698 | |
| 380 | +INTC,18,0.708327673375497,-0.06777155167729723,0.3254844355216428,-0.028666404097347595 | |
| 381 | +INTC,19,0.6993275178625026,-0.06698055478502613,0.3206254988821546,-0.02883367483924308 | |
| 382 | +IWM,0,1.0,0.0,0.0,1.0 | |
| 383 | +IWM,1,0.8799338172912503,0.004295595321012941,0.8370296987436832,0.1826436626992096 | |
| 384 | +IWM,2,0.853276056423761,0.0005142133310007931,0.7479733586221404,0.1534065635723236 | |
| 385 | +IWM,3,0.7996068330255077,0.0018667161645754037,0.5868368469029062,0.1719679141834701 | |
| 386 | +IWM,4,0.7589544243525028,0.0030192962322176417,0.5228722533533112,0.1487027441783419 | |
| 387 | +IWM,5,0.7580622599986507,-0.0038956243510691723,0.4334153122847876,0.12527284199699726 | |
| 388 | +IWM,6,0.7441351621970449,-0.0040471509234051555,0.45298680320264634,0.07638569554183819 | |
| 389 | +IWM,7,0.7320165894546095,-0.004774397734324868,0.4291282144868192,0.0628383388305153 | |
| 390 | +IWM,8,0.7188190676788212,-0.005290660788912865,0.40649538437040256,0.0515986667330405 | |
| 391 | +IWM,9,0.7053603347067136,-0.005706258539521917,0.3907208978052811,0.03952973557952917 | |
| 392 | +IWM,10,0.6932637753197134,-0.006272157441258974,0.3750286805580575,0.03023539494829839 | |
| 393 | +IWM,11,0.6810410528859396,-0.006477717692151353,0.36433693203379613,0.022389334168284196 | |
| 394 | +IWM,12,0.669212713921887,-0.006651808488536069,0.35330606741680404,0.01708267720765848 | |
| 395 | +IWM,13,0.6576328859417067,-0.006768648645184916,0.3435529679592502,0.01276374109805629 | |
| 396 | +IWM,14,0.646266303653777,-0.006831576525795458,0.33496756049456256,0.00923959910921231 | |
| 397 | +IWM,15,0.635154521231383,-0.006862446511991431,0.3270090568737767,0.006523731486133068 | |
| 398 | +IWM,16,0.6242401627276648,-0.006854190521679557,0.3197426315269025,0.004390817500910793 | |
| 399 | +IWM,17,0.6135370280756557,-0.006825115939170505,0.312910625229322,0.0027480472445581394 | |
| 400 | +IWM,18,0.6030329768233876,-0.006778231890961859,0.30649849438524596,0.001457961064317062 | |
| 401 | +IWM,19,0.592719513932949,-0.006717051848190186,0.3004358674105542,0.0004508261440254236 | |
added
results/portfolio_sort_results.csv
+85 −0
@@ -0,0 +1,85 @@ | ||
| 1 | +sort_variable,return_horizon,quintile,mean_daily_bps,annualized_return_pct,annualized_vol_pct,sharpe_ratio,t_statistic,n_days,pct_positive,max_drawdown_pct | |
| 2 | +ATM IV (30d),1-Day,Q1,3.1655786125021326,7.977258103505375,12.965387404352487,0.6152734087087445,2.3819978650316136,3777,0.5411702409319565,-25.74126437728721 | |
| 3 | +ATM IV (30d),1-Day,Q2,3.6873736770561085,9.292181666181394,15.749604218738659,0.5899946142853346,2.284132373861591,3777,0.5401111993645751,-38.29442335918096 | |
| 4 | +ATM IV (30d),1-Day,Q3,4.499446829496948,11.338606010332311,18.096207541810696,0.6265736057753998,2.4257459693803773,3777,0.5390521577971935,-36.11907333248452 | |
| 5 | +ATM IV (30d),1-Day,Q4,6.017748072496828,15.164725142692006,21.28124300099886,0.7125864378307336,2.758740016288902,3777,0.5424940428911835,-46.12700743603197 | |
| 6 | +ATM IV (30d),1-Day,Q5,8.672541938636133,21.854805685363054,29.72560758006554,0.7352181322618023,2.846357402403459,3777,0.5459359279851734,-66.28459403796643 | |
| 7 | +ATM IV (30d),1-Day,L/S(5-1),5.506963326134,13.87754758185768,25.552488348717155,0.5430996540324963,2.102581060864931,3777,0.5316388668255229,-71.87583501606194 | |
| 8 | +ATM IV (30d),5-Day,Q1,29.29198398515538,15.231831672280796,11.823510817598113,1.288266396272902,10.979371980456447,3777,0.6078898596769923,-94.68900944307536 | |
| 9 | +ATM IV (30d),5-Day,Q2,27.470493545486523,14.284656643652994,15.048415907726007,0.9492465340700151,8.090043199811857,3777,0.6033889330156209,-156.8429628907121 | |
| 10 | +ATM IV (30d),5-Day,Q3,21.89562419449632,11.385724581138087,17.417083651355128,0.6537101623354852,5.571306571723571,3777,0.5740005295207837,-151.6474562308434 | |
| 11 | +ATM IV (30d),5-Day,Q4,17.873451256081033,9.294194653162137,20.848963351821702,0.445786895795471,3.799260903732077,3777,0.5766481334392375,-229.4826144504674 | |
| 12 | +ATM IV (30d),5-Day,Q5,25.900864265447343,13.468449418032618,29.530892070484306,0.4560800055035971,3.8869849029360624,3777,0.5745300503044745,-369.1346583743537 | |
| 13 | +ATM IV (30d),5-Day,L/S(5-1),-3.391119719708039,-1.7633822542481803,26.130106948087167,-0.06748469333675144,-0.5751446698251581,3777,0.5308445856499867,-487.63870160112435 | |
| 14 | +Volatility Skew (25d),1-Day,Q1,4.909633131749299,12.372275492008232,18.360220169441902,0.67386313332997,2.6091701623212233,3778,0.5457914240338804,-35.22680239456641 | |
| 15 | +Volatility Skew (25d),1-Day,Q2,4.352274787326383,10.967732464062486,17.21721535186998,0.6370212743416298,2.46652000913388,3778,0.5381154049761778,-30.714128697538435 | |
| 16 | +Volatility Skew (25d),1-Day,Q3,5.730771782809848,14.441544892680817,18.775848529688066,0.7691553790416493,2.9781377937493514,3778,0.5447326627845421,-47.57893487049204 | |
| 17 | +Volatility Skew (25d),1-Day,Q4,5.888756259614631,14.83966577422887,20.424694414069506,0.7265550942102027,2.8131912540279562,3778,0.5359978824775014,-43.28495925683635 | |
| 18 | +Volatility Skew (25d),1-Day,Q5,6.1331084770730335,15.455433362224044,24.215475558037,0.6382461217902641,2.4712625677608515,3778,0.5494970884065643,-48.31913497878628 | |
| 19 | +Volatility Skew (25d),1-Day,L/S(5-1),1.2234753453237353,3.0831578702158127,19.69935010184434,0.15651063889296296,0.6060027161114745,3778,0.5089994706193753,-53.80841684180327 | |
| 20 | +Volatility Skew (25d),5-Day,Q1,62.39954554166372,32.44776368166514,17.736835811578825,1.8293997884607374,15.593296234639942,3778,0.6357861302276336,-134.54539546706206 | |
| 21 | +Volatility Skew (25d),5-Day,Q2,33.23983991522568,17.284716755917355,16.367520260286877,1.0560375964742748,9.001371477470213,3778,0.6058761249338275,-126.10684493163396 | |
| 22 | +Volatility Skew (25d),5-Day,Q3,22.984227923524813,11.951798520232904,18.061757451424693,0.6617184707731837,5.64030465280697,3778,0.5878771836950768,-159.84984532784696 | |
| 23 | +Volatility Skew (25d),5-Day,Q4,14.247728659410713,7.408818902893572,19.624171785295665,0.37753536729865855,3.2180067246508957,3778,0.5629962943356274,-252.50178063194403 | |
| 24 | +Volatility Skew (25d),5-Day,Q5,-9.778719358916328,-5.084934066636491,23.98440533231165,-0.21201001218012677,-1.8071145221985416,3778,0.5381154049761778,-597.3410082690601 | |
| 25 | +Volatility Skew (25d),5-Day,L/S(5-1),-72.17826490058003,-37.53269774830162,20.0977643732778,-1.8675061091971745,-15.918103940098042,3778,0.3967707781895183,-2753.5424618269067 | |
| 26 | +Implied Skewness,1-Day,Q1,7.67159767951261,19.332426152371777,24.363037134621372,0.7935146199362482,3.07204911476073,3777,0.5501720942546995,-47.85742939112403 | |
| 27 | +Implied Skewness,1-Day,Q2,4.555788544784435,11.480587132856776,20.212741661664055,0.5679876250845832,2.198933500401454,3777,0.5382578766216574,-46.01684137621842 | |
| 28 | +Implied Skewness,1-Day,Q3,4.922931518400179,12.40578742636845,18.48883481617134,0.6709880611577359,2.5976941413634558,3777,0.5438178448504104,-30.613244548717546 | |
| 29 | +Implied Skewness,1-Day,Q4,4.98667692663672,12.566425855124535,17.74510782908165,0.7081628342956583,2.7416142734449043,3777,0.535875033095049,-41.07819814010891 | |
| 30 | +Implied Skewness,1-Day,Q5,4.366275404527225,11.003014019408607,16.83729750644633,0.6534905031639426,2.5299532879565887,3777,0.5371988350542759,-36.6462132864966 | |
| 31 | +Implied Skewness,1-Day,L/S(5-1),-3.3053222749853854,-8.32941213296317,17.912979278647555,-0.46499312054092046,-1.8001958230364172,3777,0.46783161239078636,-153.83813693142517 | |
| 32 | +Implied Skewness,5-Day,Q1,42.45414782733605,22.076156870214746,24.216489672781318,0.9116167193723269,7.76933955162476,3777,0.5890918718559703,-202.44565569404668 | |
| 33 | +Implied Skewness,5-Day,Q2,15.434643886945246,8.026014821211527,19.58127624429597,0.4098821098828789,3.493258976216541,3777,0.5724119671697114,-224.55899805684174 | |
| 34 | +Implied Skewness,5-Day,Q3,18.44374309726791,9.590746410579312,17.639855597990756,0.5436975579137808,4.633713764848223,3777,0.5729414879534022,-153.67406494643402 | |
| 35 | +Implied Skewness,5-Day,Q4,18.925246659198717,9.841128262783332,16.97817759382411,0.5796339570840092,4.939985119336399,3777,0.5830023828435266,-179.59261316136113 | |
| 36 | +Implied Skewness,5-Day,Q5,23.389756360504066,12.162673307462113,15.88062921219701,0.7658810708911115,6.5272937293340165,3777,0.6020651310563939,-170.44970329584598 | |
| 37 | +Implied Skewness,5-Day,L/S(5-1),-19.064391466831974,-9.913483562752628,18.806554155930858,-0.52712918488719,-4.4925082415991575,3777,0.45909451945988883,-842.0230994434794 | |
| 38 | +Implied Kurtosis,1-Day,Q1,7.900432619661885,19.90909020154795,24.262124609085216,0.8205831320350558,3.176843401522218,3777,0.5552025416997617,-59.02791584254232 | |
| 39 | +Implied Kurtosis,1-Day,Q2,4.792344174628643,12.07670732006418,20.674914482749358,0.584123689127744,2.261403403304437,3777,0.5374635954461212,-46.520367354683415 | |
| 40 | +Implied Kurtosis,1-Day,Q3,4.16291379082682,10.490542752883586,18.7680012135633,0.5589589766917885,2.163979574404729,3777,0.535875033095049,-36.38604107309538 | |
| 41 | +Implied Kurtosis,1-Day,Q4,4.225185779378482,10.647468164033777,17.33988379287723,0.6140449550421715,2.377241972822314,3777,0.5377283558379666,-36.35175776480487 | |
| 42 | +Implied Kurtosis,1-Day,Q5,4.786528964000653,12.062052989281646,15.651492460755495,0.7706647158107128,2.983586941566167,3777,0.5377283558379666,-30.81615130533013 | |
| 43 | +Implied Kurtosis,1-Day,L/S(5-1),-3.1139036556612303,-7.8470372122663,18.300397279621528,-0.4287905389356983,-1.6600394781144912,3777,0.47736298649722003,-141.74069567258002 | |
| 44 | +Implied Kurtosis,5-Day,Q1,-24.350520797928095,-12.66227081492261,23.877899960761322,-0.5302924811533084,-4.519467732656741,3777,0.5131056393963463,-1042.9516681141897 | |
| 45 | +Implied Kurtosis,5-Day,Q2,10.81847991424171,5.625609555405689,20.215173932435164,0.2782864779797626,2.3717227800946747,3777,0.5562615832671433,-246.3837774341045 | |
| 46 | +Implied Kurtosis,5-Day,Q3,30.120609919711082,15.662717158249762,17.930980819326898,0.8735003018556413,7.444488784975231,3777,0.5951813608684141,-179.31024429109038 | |
| 47 | +Implied Kurtosis,5-Day,Q4,47.43178183340775,24.664526553372028,16.32094339028247,1.5112194168908977,12.87951014645484,3777,0.6346306592533757,-150.28322025492517 | |
| 48 | +Implied Kurtosis,5-Day,Q5,60.333849623094444,31.37360180400911,15.148811114969106,2.0710273278810423,17.650525916287144,3777,0.6695790309769658,-125.21049120272671 | |
| 49 | +Implied Kurtosis,5-Day,L/S(5-1),84.68437042102255,44.03587261893173,18.913906695855363,2.3282272312668946,19.84253637373645,3777,0.6211278792692613,-109.38254764168884 | |
| 50 | +Put-Call Volume Ratio,1-Day,Q1,2.9870005407367515,7.527241362656614,18.093963120502405,0.4160084395290627,1.6623821112992205,4024,0.5362823061630219,-38.09054931426351 | |
| 51 | +Put-Call Volume Ratio,1-Day,Q2,6.0466735843228205,15.237617432493508,19.523630409214725,0.7804704920710694,3.118783325368585,4024,0.5519383697813122,-47.469613787493195 | |
| 52 | +Put-Call Volume Ratio,1-Day,Q3,6.22293388219269,15.681793383125578,19.740736934075123,0.794387435256114,3.1743958447227008,4024,0.5494532803180915,-40.704191957028634 | |
| 53 | +Put-Call Volume Ratio,1-Day,Q4,6.282523553715319,15.831959355362605,19.298697789629518,0.8203641265303495,3.278199476528625,4024,0.5410039761431411,-44.227671333276234 | |
| 54 | +Put-Call Volume Ratio,1-Day,Q5,5.461441718807346,13.762833131394512,18.533004229106705,0.7426120968439387,2.9675000507808798,4024,0.5407554671968191,-41.20683993124155 | |
| 55 | +Put-Call Volume Ratio,1-Day,L/S(5-1),2.474441178070595,6.235591768737899,12.035122043654784,0.5181162057285044,2.0704077853620584,4024,0.5233598409542743,-23.196483201892658 | |
| 56 | +Put-Call Volume Ratio,5-Day,Q1,58.1940319772822,30.260896628186746,17.47372970670458,1.7317937919444748,15.234334693620722,4024,0.6570576540755467,-139.78767640304602 | |
| 57 | +Put-Call Volume Ratio,5-Day,Q2,37.295684785904605,19.393756088670393,18.711691205346686,1.0364512686661276,9.117509020954989,4024,0.606858846918489,-176.86397714652261 | |
| 58 | +Put-Call Volume Ratio,5-Day,Q3,26.603897527586334,13.834026714344894,19.31702705201899,0.7161571331391274,6.299928727204474,4024,0.5889662027833003,-193.07693354468745 | |
| 59 | +Put-Call Volume Ratio,5-Day,Q4,12.213281578922274,6.350906421039582,18.660287277139563,0.3403434430947899,2.9939510968356258,4024,0.5683399602385686,-203.58338340194888 | |
| 60 | +Put-Call Volume Ratio,5-Day,Q5,-0.053222099651141656,-0.02767549181859366,17.675453469268167,-0.0015657585174101638,-0.013773746859798533,4024,0.5357852882703777,-219.36559674373748 | |
| 61 | +Put-Call Volume Ratio,5-Day,L/S(5-1),-58.247254076933345,-30.288572120005337,12.2244451508235,-2.4777052656631167,-21.79600796863729,4024,0.3605864811133201,-2343.484273590955 | |
| 62 | +Put-Call OI Ratio,1-Day,Q1,4.715482709165023,11.883016427095857,18.649484210952693,0.6371766796701572,2.546176984341454,4024,0.5370278330019881,-45.79279171007299 | |
| 63 | +Put-Call OI Ratio,1-Day,Q2,4.201105333984404,10.586785441640696,17.868212256930452,0.592492706568026,2.3676184973289107,4024,0.5472166998011928,-39.35198540699585 | |
| 64 | +Put-Call OI Ratio,1-Day,Q3,4.534873123829001,11.427880272049084,19.008390751057615,0.601201880880592,2.4024206172036573,4024,0.5283300198807157,-35.904134180717904 | |
| 65 | +Put-Call OI Ratio,1-Day,Q4,6.719476346910547,16.933080394214578,19.64310922888189,0.8620366662380177,3.444724186029366,4024,0.562375745526839,-45.9275340311692 | |
| 66 | +Put-Call OI Ratio,1-Day,Q5,6.751668685552591,17.01420508759253,20.12186468624968,0.8455580709286463,3.378875228511464,4024,0.5482107355864811,-39.18013119493553 | |
| 67 | +Put-Call OI Ratio,1-Day,L/S(5-1),2.0361859763875683,5.131188660496671,13.284148089423589,0.38626403635035955,1.5435225905367975,4024,0.5129224652087475,-37.86774876467454 | |
| 68 | +Put-Call OI Ratio,5-Day,Q1,24.256278852034058,12.61326500305771,18.302882508941224,0.6891409042753756,6.06227094451446,4024,0.5999005964214712,-209.6151740596394 | |
| 69 | +Put-Call OI Ratio,5-Day,Q2,18.545662380280827,9.643744437746031,17.37134436049582,0.5551524532365424,4.883594292767436,4024,0.5822564612326043,-178.77991802824528 | |
| 70 | +Put-Call OI Ratio,5-Day,Q3,25.6534913731121,13.33981551401829,17.533253734087737,0.7608294339620111,6.692904372131451,4024,0.5859840954274353,-156.26534941900178 | |
| 71 | +Put-Call OI Ratio,5-Day,Q4,31.82086588280227,16.54685025905718,19.014215244632798,0.8702357707730225,7.655335788813296,4024,0.5974155069582505,-205.4043521175057 | |
| 72 | +Put-Call OI Ratio,5-Day,Q5,34.382629546078704,17.878967363960925,19.444291868678288,0.9194969652127647,8.088679254411437,4024,0.5939363817097415,-181.53714063306882 | |
| 73 | +Put-Call OI Ratio,5-Day,L/S(5-1),10.126350694044644,5.265702360903215,13.266792032405183,0.3969084876013223,3.4915454547669516,4024,0.5270874751491054,-147.95316519525147 | |
| 74 | +IV Term Structure Slope,1-Day,Q1,7.721055136593458,19.457058944215515,25.807462137170116,0.7539315117774325,2.456827586180563,2676,0.5377428998505231,-44.12163770030708 | |
| 75 | +IV Term Structure Slope,1-Day,Q2,1.8529810708297083,4.669512298490865,19.880246680812654,0.23488200993992836,0.7654071921698744,2676,0.5302690582959642,-51.953388721385906 | |
| 76 | +IV Term Structure Slope,1-Day,Q3,2.4725302802839457,6.230776306315542,18.810495894862065,0.33123934324439736,1.0794056799570522,2676,0.5265321375186846,-49.228056922209475 | |
| 77 | +IV Term Structure Slope,1-Day,Q4,4.158928968234807,10.480500999951715,18.14171092701101,0.5777019070647522,1.8825502843351078,2676,0.5291479820627802,-46.493495598547355 | |
| 78 | +IV Term Structure Slope,1-Day,Q5,5.8060268593166775,14.631187685478029,20.14204854107331,0.7264001799837969,2.3671115650589236,2676,0.5497010463378177,-37.033136012323254 | |
| 79 | +IV Term Structure Slope,1-Day,L/S(5-1),-1.9150282772767782,-4.8258712587374815,20.460466759541166,-0.23586320465964303,-0.7686045996494033,2676,0.5067264573991032,-65.1469634930808 | |
| 80 | +IV Term Structure Slope,5-Day,Q1,20.448102589217843,10.633013346393279,25.987576385980738,0.4091575600766436,2.9351612339346556,2676,0.5717488789237668,-263.5019195444096 | |
| 81 | +IV Term Structure Slope,5-Day,Q2,9.712203656224531,5.0503459012367555,20.02027177695885,0.25226160551172705,1.8096414622509738,2676,0.5590433482810164,-188.92682208373196 | |
| 82 | +IV Term Structure Slope,5-Day,Q3,24.573632524402857,12.778288912689487,18.554064992791616,0.6887056242205651,4.9405467405424695,2676,0.5732436472346786,-116.34516620656599 | |
| 83 | +IV Term Structure Slope,5-Day,Q4,34.50630383909705,17.943277996330465,17.716844168728233,1.01278070888053,7.265354389702951,2676,0.5833333333333334,-99.28017256020922 | |
| 84 | +IV Term Structure Slope,5-Day,Q5,42.23436562508011,21.961870125041656,19.523690293003387,1.1248831442953195,8.069540245629742,2676,0.5881913303437967,-109.47715148251618 | |
| 85 | +IV Term Structure Slope,5-Day,L/S(5-1),21.786263035862277,11.328856778648385,20.29619648729625,0.5581763452940217,4.004172793726316,2676,0.5213004484304933,-167.57669850265913 | |
added
results/pre_post_covid.csv
+9 −0
@@ -0,0 +1,9 @@ | ||
| 1 | +label,n_obs,r2,adj_r2,n_significant,period,target | |
| 2 | +Pre-COVID|1D,60246,0.0019943591218688494,0.0018286737826345156,3,Pre-COVID,1D | |
| 3 | +Pre-COVID|5D,60246,0.07088392237210583,0.07072967383261419,10,Pre-COVID,5D | |
| 4 | +Pre-COVID|HAR-RV,163535,0.34630319026414835,0.34629119810101594,3,Pre-COVID,HAR-RV | |
| 5 | +Pre-COVID|HAR+IV,60251,0.3814415046616798,0.3813593615063612,6,Pre-COVID,HAR+IV | |
| 6 | +Post-COVID|1D,58835,0.0011772683140017781,0.0010074698080032585,4,Post-COVID,1D | |
| 7 | +Post-COVID|5D,58835,0.05177017194489808,0.05160897416371091,8,Post-COVID,5D | |
| 8 | +Post-COVID|HAR-RV,100810,0.462937696674553,0.46292171362880197,3,Post-COVID,HAR-RV | |
| 9 | +Post-COVID|HAR+IV,58842,0.5705808383715292,0.5705224467665961,8,Post-COVID,HAR+IV | |
added
results/regime_results.csv
+16 −0
@@ -0,0 +1,16 @@ | ||
| 1 | +label,n_obs,r2,adj_r2,n_significant,regime,target | |
| 2 | +VIX_VeryLow|1D,43971,0.0007352767569274166,0.0005079644904936176,1,VeryLow,1D | |
| 3 | +VIX_VeryLow|5D,43971,0.027205971700466347,0.026984680975193354,8,VeryLow,5D | |
| 4 | +VIX_VeryLow|RV_1D,43975,0.3589511852497953,0.35883454078548194,7,VeryLow,RV_1D | |
| 5 | +VIX_Low|1D,40221,0.0005568303108642869,0.000308274436780942,2,Low,1D | |
| 6 | +VIX_Low|5D,40221,0.0399643090088605,0.03972555355225982,9,Low,5D | |
| 7 | +VIX_Low|RV_1D,40224,0.34067645294647086,0.3405452932205868,7,Low,RV_1D | |
| 8 | +VIX_Medium|1D,19210,0.002129809970192853,0.001610058842514528,3,Medium,1D | |
| 9 | +VIX_Medium|5D,19210,0.07271896638527897,0.07223598235818651,10,Medium,5D | |
| 10 | +VIX_Medium|RV_1D,19212,0.3944507700622143,0.39419849730069256,6,Medium,RV_1D | |
| 11 | +VIX_High|1D,13139,0.010035406004030412,0.009281319628347884,3,High,1D | |
| 12 | +VIX_High|5D,13139,0.07962259773412605,0.07892151805537395,9,High,5D | |
| 13 | +VIX_High|RV_1D,13142,0.3846935886773011,0.3843187732283875,6,High,RV_1D | |
| 14 | +VIX_Crisis|1D,2540,0.02328452671702219,0.0194224647427913,4,Crisis,1D | |
| 15 | +VIX_Crisis|5D,2540,0.19835587721799763,0.19518607048497272,6,Crisis,5D | |
| 16 | +VIX_Crisis|RV_1D,2540,0.6177902537150386,0.6165821628536085,7,Crisis,RV_1D | |
added
results/robustness_double_clustered.csv
+23 −0
@@ -0,0 +1,23 @@ | ||
| 1 | +variable,coefficient,dc_se,dc_t_stat,dc_sig_5pct,target | |
| 2 | +const,0.00041763446448038824,0.00019097294713725055,2.18687762188766,True,1-Day | |
| 3 | +iv_atm_30d,0.0002801036146791042,0.00030605540452658406,0.9152055821800537,False,1-Day | |
| 4 | +iv_term_slope,8.139424135398084e-05,0.00018775568382054363,0.43351146392871515,False,1-Day | |
| 5 | +iv_skew_25d,0.0005589362280265604,0.0003104434494398842,1.8004445867194745,False,1-Day | |
| 6 | +implied_skewness,-0.000274319558538343,0.00021556444911768725,-1.2725640042277029,False,1-Day | |
| 7 | +implied_kurtosis_proxy,3.198378790915099e-05,0.00016132035542532674,0.19826256782552096,False,1-Day | |
| 8 | +pc_volume_ratio,-1.4646140356723332e-06,7.976075275412609e-05,-0.018362590435765005,False,1-Day | |
| 9 | +pc_oi_ratio,-6.372110421016923e-05,7.55862653581354e-05,-0.8430249054937715,False,1-Day | |
| 10 | +net_gamma_exposure,5.053427056372953e-06,4.404763270659589e-05,0.11472641651446186,False,1-Day | |
| 11 | +rv_daily,-0.0003205381939735492,0.00032940803542973906,-0.9730733907428261,False,1-Day | |
| 12 | +rv_w,-4.7339039740473006e-05,0.00040137248341110985,-0.11794291262359785,False,1-Day | |
| 13 | +const,0.0022494731376496314,0.0005731957527072355,3.924441392011794,True,5-Day | |
| 14 | +iv_atm_30d,0.0013216839369709578,0.0009426816020927818,1.4020470263096037,False,5-Day | |
| 15 | +iv_term_slope,0.0011337202055724507,0.000533974185535623,2.123174183851659,True,5-Day | |
| 16 | +iv_skew_25d,-0.00037312837912515176,0.0009622817684762431,-0.38775376542360795,False,5-Day | |
| 17 | +implied_skewness,-0.004685263679195305,0.000948856063116825,-4.93780232989716,True,5-Day | |
| 18 | +implied_kurtosis_proxy,0.006342337908904521,0.00070283055866189,9.023992811268219,True,5-Day | |
| 19 | +pc_volume_ratio,-0.0021326351951543566,0.0002679112104486308,-7.96023127058831,True,5-Day | |
| 20 | +pc_oi_ratio,0.002634042353104671,0.0005715184402461656,4.608849282221114,True,5-Day | |
| 21 | +net_gamma_exposure,0.0030205764876359066,0.0005599042221712135,5.394809269204337,True,5-Day | |
| 22 | +rv_daily,-0.005554035996188909,0.0007643278728968247,-7.266562156288965,True,5-Day | |
| 23 | +rv_w,0.00348308295756233,0.000987470938426879,3.5272764210267926,True,5-Day | |
added
results/robustness_newey_west.csv
+23 −0
@@ -0,0 +1,23 @@ | ||
| 1 | +variable,coefficient,nw_se,nw_t_stat,nw_sig_5pct,target,method | |
| 2 | +const,0.00041763446448038824,4.316283685055031e-05,9.675788130572414,True,1-Day,Newey-West(5) | |
| 3 | +iv_atm_30d,0.0002801036146791042,0.00010701580073313487,2.617404278248575,True,1-Day,Newey-West(5) | |
| 4 | +iv_term_slope,8.139424135398084e-05,6.585570762361785e-05,1.2359481704937356,False,1-Day,Newey-West(5) | |
| 5 | +iv_skew_25d,0.0005589362280265604,0.00011006402431832819,5.078282676726411,True,1-Day,Newey-West(5) | |
| 6 | +implied_skewness,-0.000274319558538343,0.00010096100162072611,-2.7170843606411728,True,1-Day,Newey-West(5) | |
| 7 | +implied_kurtosis_proxy,3.198378790915099e-05,6.549824600209478e-05,0.48831518187720746,False,1-Day,Newey-West(5) | |
| 8 | +pc_volume_ratio,-1.4646140356723332e-06,4.70930140424354e-05,-0.031100452274143528,False,1-Day,Newey-West(5) | |
| 9 | +pc_oi_ratio,-6.372110421016923e-05,5.385638511816159e-05,-1.1831671225308629,False,1-Day,Newey-West(5) | |
| 10 | +net_gamma_exposure,5.053427056372953e-06,4.451452862931777e-05,0.11352309486311643,False,1-Day,Newey-West(5) | |
| 11 | +rv_daily,-0.0003205381939735492,0.00011473836742861566,-2.7936443681140193,True,1-Day,Newey-West(5) | |
| 12 | +rv_w,-4.7339039740473006e-05,0.00011438945571031518,-0.41384093880432865,False,1-Day,Newey-West(5) | |
| 13 | +const,0.0022494731376496314,0.00017116879437253463,13.141841337935935,True,5-Day,Newey-West(5) | |
| 14 | +iv_atm_30d,0.0013216839369709578,0.0003975016333988221,3.324977373476308,True,5-Day,Newey-West(5) | |
| 15 | +iv_term_slope,0.0011337202055724507,0.00024696584090778235,4.590595207034258,True,5-Day,Newey-West(5) | |
| 16 | +iv_skew_25d,-0.00037312837912515176,0.000402413945635202,-0.927225269333488,False,5-Day,Newey-West(5) | |
| 17 | +implied_skewness,-0.004685263679195305,0.00034308868527516096,-13.656129975366781,True,5-Day,Newey-West(5) | |
| 18 | +implied_kurtosis_proxy,0.006342337908904521,0.00024733718565062436,25.6424762504712,True,5-Day,Newey-West(5) | |
| 19 | +pc_volume_ratio,-0.0021326351951543566,0.00012777310920573273,-16.690798309685906,True,5-Day,Newey-West(5) | |
| 20 | +pc_oi_ratio,0.002634042353104671,0.00020078707992520257,13.118584891447734,True,5-Day,Newey-West(5) | |
| 21 | +net_gamma_exposure,0.0030205764876359066,0.00016940745025374946,17.830245854662774,True,5-Day,Newey-West(5) | |
| 22 | +rv_daily,-0.005554035996188909,0.00031078475930153846,-17.871005028274613,True,5-Day,Newey-West(5) | |
| 23 | +rv_w,0.00348308295756233,0.00043804408916016125,7.951443801559474,True,5-Day,Newey-West(5) | |
added
results/robustness_quantile_regression.csv
+56 −0
@@ -0,0 +1,56 @@ | ||
| 1 | +target,tau,variable,coefficient | |
| 2 | +5-Day,0.1,const,-0.03644256919308925 | |
| 3 | +5-Day,0.1,iv_atm_30d,-0.010547011640209655 | |
| 4 | +5-Day,0.1,iv_term_slope,0.00019575372630210676 | |
| 5 | +5-Day,0.1,iv_skew_25d,-0.0012908960196656748 | |
| 6 | +5-Day,0.1,implied_skewness,-0.001947967109688327 | |
| 7 | +5-Day,0.1,implied_kurtosis_proxy,0.0045090050836815105 | |
| 8 | +5-Day,0.1,pc_volume_ratio,-0.0012226704525396188 | |
| 9 | +5-Day,0.1,pc_oi_ratio,0.001984764483567175 | |
| 10 | +5-Day,0.1,net_gamma_exposure,0.0029422991902574524 | |
| 11 | +5-Day,0.1,rv_daily,-0.007980650731533204 | |
| 12 | +5-Day,0.1,rv_w,-0.0034869989320195837 | |
| 13 | +5-Day,0.25,const,-0.01828573590465208 | |
| 14 | +5-Day,0.25,iv_atm_30d,-0.004896693349371038 | |
| 15 | +5-Day,0.25,iv_term_slope,0.0006762916815459343 | |
| 16 | +5-Day,0.25,iv_skew_25d,-0.0008104030746726128 | |
| 17 | +5-Day,0.25,implied_skewness,-0.002419173463078245 | |
| 18 | +5-Day,0.25,implied_kurtosis_proxy,0.004276947566478688 | |
| 19 | +5-Day,0.25,pc_volume_ratio,-0.0014957443052624636 | |
| 20 | +5-Day,0.25,pc_oi_ratio,0.0019506171091430186 | |
| 21 | +5-Day,0.25,net_gamma_exposure,0.0028080716840669976 | |
| 22 | +5-Day,0.25,rv_daily,-0.010143123118263795 | |
| 23 | +5-Day,0.25,rv_w,0.000952765932427168 | |
| 24 | +5-Day,0.5,const,0.0021606822183559563 | |
| 25 | +5-Day,0.5,iv_atm_30d,0.0019414313992837343 | |
| 26 | +5-Day,0.5,iv_term_slope,0.0013342851187313472 | |
| 27 | +5-Day,0.5,iv_skew_25d,-0.0004644472963037347 | |
| 28 | +5-Day,0.5,implied_skewness,-0.003373255512278814 | |
| 29 | +5-Day,0.5,implied_kurtosis_proxy,0.0048376998507626045 | |
| 30 | +5-Day,0.5,pc_volume_ratio,-0.001684639123642353 | |
| 31 | +5-Day,0.5,pc_oi_ratio,0.002010434168078036 | |
| 32 | +5-Day,0.5,net_gamma_exposure,0.002398880477297468 | |
| 33 | +5-Day,0.5,rv_daily,-0.007690087326290107 | |
| 34 | +5-Day,0.5,rv_w,0.004120597533240779 | |
| 35 | +5-Day,0.75,const,0.023322996819406444 | |
| 36 | +5-Day,0.75,iv_atm_30d,0.007600056589821959 | |
| 37 | +5-Day,0.75,iv_term_slope,0.0020570007168977163 | |
| 38 | +5-Day,0.75,iv_skew_25d,-0.0005621606391916226 | |
| 39 | +5-Day,0.75,implied_skewness,-0.0038645858987798 | |
| 40 | +5-Day,0.75,implied_kurtosis_proxy,0.005015186784675284 | |
| 41 | +5-Day,0.75,pc_volume_ratio,-0.0018773034092467674 | |
| 42 | +5-Day,0.75,pc_oi_ratio,0.002242678921069006 | |
| 43 | +5-Day,0.75,net_gamma_exposure,0.002155847382349168 | |
| 44 | +5-Day,0.75,rv_daily,-0.003220240624486815 | |
| 45 | +5-Day,0.75,rv_w,0.009847666418296744 | |
| 46 | +5-Day,0.9,const,0.040952186118840425 | |
| 47 | +5-Day,0.9,iv_atm_30d,0.013137307123713525 | |
| 48 | +5-Day,0.9,iv_term_slope,0.0032893526955145905 | |
| 49 | +5-Day,0.9,iv_skew_25d,0.00018913432774535108 | |
| 50 | +5-Day,0.9,implied_skewness,-0.005053484061727455 | |
| 51 | +5-Day,0.9,implied_kurtosis_proxy,0.0052325482325611345 | |
| 52 | +5-Day,0.9,pc_volume_ratio,-0.002134592044479843 | |
| 53 | +5-Day,0.9,pc_oi_ratio,0.002179555708667724 | |
| 54 | +5-Day,0.9,net_gamma_exposure,0.0020462142657435758 | |
| 55 | +5-Day,0.9,rv_daily,-0.0007943647391827855 | |
| 56 | +5-Day,0.9,rv_w,0.010162726223918813 | |
added
results/robustness_ticker_r2.csv
+70 −0
@@ -0,0 +1,70 @@ | ||
| 1 | +ticker,r2_5d,n_obs | |
| 2 | +AAPL,0.10930794149604595,2552 | |
| 3 | +ABBV,0.18858228467521654,1331 | |
| 4 | +ABT,0.10136835934967914,1182 | |
| 5 | +ADBE,0.08129109560792169,1385 | |
| 6 | +AMD,0.10874473792475259,1365 | |
| 7 | +AMZN,0.06822508014557305,2167 | |
| 8 | +AVGO,0.12670643882602517,1305 | |
| 9 | +BA,0.15469075804535382,2012 | |
| 10 | +BAC,0.14989153742732542,2123 | |
| 11 | +CAT,0.09951842066727523,1919 | |
| 12 | +COST,0.14117217994696174,1214 | |
| 13 | +CRM,0.051514692952278174,2005 | |
| 14 | +CSCO,0.10046073955144286,1910 | |
| 15 | +CVX,0.1348841537107086,1675 | |
| 16 | +DIA,0.2207335936640452,2422 | |
| 17 | +DIS,0.17021511761457242,1933 | |
| 18 | +GE,0.07566403218176165,1699 | |
| 19 | +GLD,0.14617795339397244,2925 | |
| 20 | +GOOG,0.11938910072232989,2117 | |
| 21 | +GOOGL,0.14973065168319155,1770 | |
| 22 | +GS,0.10145767885541701,1620 | |
| 23 | +HD,0.08495957550485367,1908 | |
| 24 | +HON,0.1595290118371573,871 | |
| 25 | +INTC,0.11532371671384323,2173 | |
| 26 | +IWM,0.243880344323123,2982 | |
| 27 | +JNJ,0.1471516773536603,1577 | |
| 28 | +JPM,0.15381013064488436,2180 | |
| 29 | +KO,0.11710918735419407,1722 | |
| 30 | +LLY,0.06767289173582025,1716 | |
| 31 | +LMT,0.15439869128002282,924 | |
| 32 | +LOW,0.10887091847615948,1126 | |
| 33 | +MA,0.09024798001355028,1475 | |
| 34 | +MCD,0.05462804499820717,1628 | |
| 35 | +META,0.2612893184089482,626 | |
| 36 | +MRK,0.14677511659690923,1898 | |
| 37 | +MSFT,0.053613440553136105,2367 | |
| 38 | +NDX,0.1980941865826138,2374 | |
| 39 | +NFLX,0.10795257771082156,2116 | |
| 40 | +NVDA,0.07916676778786702,1921 | |
| 41 | +PEP,0.13190136785475604,1137 | |
| 42 | +PFE,0.09253878036737706,1764 | |
| 43 | +PG,0.09156209684443828,1664 | |
| 44 | +QCOM,0.09797257878609322,1873 | |
| 45 | +QQQ,0.2503228869956333,2882 | |
| 46 | +RTX,0.12024800197416874,616 | |
| 47 | +RUT,0.22627548845282952,2937 | |
| 48 | +SPX,0.2684293782621828,3675 | |
| 49 | +SPY,0.28687437035402374,3151 | |
| 50 | +TLT,0.11012543114215845,2606 | |
| 51 | +TMO,0.09775674367943454,626 | |
| 52 | +TSLA,0.19128452637504367,1900 | |
| 53 | +TXN,0.12296111731873316,1442 | |
| 54 | +UNH,0.10016412178893697,1374 | |
| 55 | +UPS,0.12363139118064015,1190 | |
| 56 | +V,0.08925344356686127,1512 | |
| 57 | +WFC,0.13435219410360566,1909 | |
| 58 | +WMT,0.13323070179691499,1636 | |
| 59 | +XLB,0.19019353185125032,1062 | |
| 60 | +XLC,0.2129469407884068,556 | |
| 61 | +XLE,0.18408100021866758,2172 | |
| 62 | +XLF,0.17613964914347813,2098 | |
| 63 | +XLI,0.19078968595688595,1214 | |
| 64 | +XLK,0.16639055249550472,1214 | |
| 65 | +XLP,0.11038431874620036,1023 | |
| 66 | +XLRE,0.08266990779277739,289 | |
| 67 | +XLU,0.17927287171987716,1110 | |
| 68 | +XLV,0.22364513340253067,1277 | |
| 69 | +XLY,0.17822753558192672,1169 | |
| 70 | +XOM,0.16388457918602228,1788 | |
added
results/robustness_with_controls.csv
+33 −0
@@ -0,0 +1,33 @@ | ||
| 1 | +target,variable,coefficient,t_stat,r2 | |
| 2 | +1-Day,const,0.00041786971535009846,9.33306040461559,0.002292639930098983 | |
| 3 | +1-Day,iv_atm_30d,0.0004131811147810219,3.6272662732139977,0.002292639930098983 | |
| 4 | +1-Day,iv_term_slope,9.680422774074841e-05,1.398060519272135,0.002292639930098983 | |
| 5 | +1-Day,iv_skew_25d,0.0005758991720821507,4.794816806573573,0.002292639930098983 | |
| 6 | +1-Day,implied_skewness,-0.0003325302575861574,-3.030611301232064,0.002292639930098983 | |
| 7 | +1-Day,implied_kurtosis_proxy,8.449158003884472e-05,1.1903176623890437,0.002292639930098983 | |
| 8 | +1-Day,pc_volume_ratio,-1.4520894824576354e-05,-0.3007213708100116,0.002292639930098983 | |
| 9 | +1-Day,pc_oi_ratio,-5.765561300598814e-05,-0.9785002504192402,0.002292639930098983 | |
| 10 | +1-Day,net_gamma_exposure,2.7968023434491232e-05,0.5908739392586276,0.002292639930098983 | |
| 11 | +1-Day,rv_daily,-0.00012263025918350992,-0.9997251181259608,0.002292639930098983 | |
| 12 | +1-Day,rv_w,-9.895569143140774e-05,-0.8454003846587748,0.002292639930098983 | |
| 13 | +1-Day,log_volume,0.00015491238132303006,1.375385284361558,0.002292639930098983 | |
| 14 | +1-Day,log_oi,-9.424369332255472e-05,-0.8479374944221849,0.002292639930098983 | |
| 15 | +1-Day,abs_return,-0.0005160303825767257,-6.355529100259122,0.002292639930098983 | |
| 16 | +1-Day,ret_lag1,0.00027170969891507336,3.898182458783995,0.002292639930098983 | |
| 17 | +1-Day,ret_lag5,-0.000407898133549299,-5.763568545631185,0.002292639930098983 | |
| 18 | +5-Day,const,0.002248732809448056,28.52366774027743,0.3801095743149804 | |
| 19 | +5-Day,iv_atm_30d,-0.0005619658321864997,-2.7655557616417537,0.3801095743149804 | |
| 20 | +5-Day,iv_term_slope,0.00033970558389948664,2.765023296199762,0.3801095743149804 | |
| 21 | +5-Day,iv_skew_25d,0.0008816791127037503,4.114773305685486,0.3801095743149804 | |
| 22 | +5-Day,implied_skewness,-0.002003456037719144,-10.44165776277188,0.3801095743149804 | |
| 23 | +5-Day,implied_kurtosis_proxy,0.0027048693641365056,21.94765026747307,0.3801095743149804 | |
| 24 | +5-Day,pc_volume_ratio,-0.0017914279673155273,-22.14610695613228,0.3801095743149804 | |
| 25 | +5-Day,pc_oi_ratio,0.0011434977171620219,11.161117935951712,0.3801095743149804 | |
| 26 | +5-Day,net_gamma_exposure,0.0009664932669329864,11.626744800480505,0.3801095743149804 | |
| 27 | +5-Day,rv_daily,-0.003107999034948828,-12.491601298147138,0.3801095743149804 | |
| 28 | +5-Day,rv_w,0.0034325921908959305,14.189657517645106,0.3801095743149804 | |
| 29 | +5-Day,log_volume,0.0018369897488412323,9.350640453111938,0.3801095743149804 | |
| 30 | +5-Day,log_oi,-0.0017163962809186675,-8.80376893448227,0.3801095743149804 | |
| 31 | +5-Day,abs_return,2.415834377889079e-05,0.14724009771678506,0.3801095743149804 | |
| 32 | +5-Day,ret_lag1,0.007346992376224531,59.039680655259424,0.3801095743149804 | |
| 33 | +5-Day,ret_lag5,0.01617175969638261,126.66401933285977,0.3801095743149804 | |
added
results/rolling_r2.csv
+121 −0
@@ -0,0 +1,121 @@ | ||
| 1 | +date,target,r2,n_obs | |
| 2 | +2011-01-03,5D_Return,0.021351965676438933,2315 | |
| 3 | +2011-01-03,1D_RV,0.2864740483018766,2315 | |
| 4 | +2011-04-04,5D_Return,0.02199931413894729,2459 | |
| 5 | +2011-04-04,1D_RV,0.30378421478832585,2459 | |
| 6 | +2011-07-05,5D_Return,0.039248193583349855,2591 | |
| 7 | +2011-07-05,1D_RV,0.35627908197911584,2591 | |
| 8 | +2011-10-03,5D_Return,0.07538739850541887,3031 | |
| 9 | +2011-10-03,1D_RV,0.43407488100049196,3031 | |
| 10 | +2012-01-03,5D_Return,0.05900390036556136,3280 | |
| 11 | +2012-01-03,1D_RV,0.4540219314901528,3281 | |
| 12 | +2012-04-03,5D_Return,0.047687200310321254,3345 | |
| 13 | +2012-04-03,1D_RV,0.47855565792266996,3346 | |
| 14 | +2012-07-03,5D_Return,0.04533878066895103,3359 | |
| 15 | +2012-07-03,1D_RV,0.45155559479733864,3360 | |
| 16 | +2012-10-02,5D_Return,0.0360666906390017,3078 | |
| 17 | +2012-10-02,1D_RV,0.42425334779910673,3079 | |
| 18 | +2013-01-04,5D_Return,0.042024392556716306,2985 | |
| 19 | +2013-01-04,1D_RV,0.3684172077868817,2985 | |
| 20 | +2013-04-08,5D_Return,0.041870237391314236,3077 | |
| 21 | +2013-04-08,1D_RV,0.40392126666754014,3077 | |
| 22 | +2013-07-08,5D_Return,0.05464755079654027,3324 | |
| 23 | +2013-07-08,1D_RV,0.3994316971578241,3324 | |
| 24 | +2013-10-04,5D_Return,0.0506322878986214,3898 | |
| 25 | +2013-10-04,1D_RV,0.40243916675586144,3898 | |
| 26 | +2014-01-06,5D_Return,0.03254597285933136,4818 | |
| 27 | +2014-01-06,1D_RV,0.4250799638364804,4818 | |
| 28 | +2014-04-07,5D_Return,0.03463414940038079,5531 | |
| 29 | +2014-04-07,1D_RV,0.4035451958102082,5531 | |
| 30 | +2014-07-08,5D_Return,0.027273047499392855,6140 | |
| 31 | +2014-07-08,1D_RV,0.3920868427943285,6140 | |
| 32 | +2014-10-06,5D_Return,0.03619255340250016,6592 | |
| 33 | +2014-10-06,1D_RV,0.40491950565501345,6592 | |
| 34 | +2015-01-06,5D_Return,0.09008809488023084,6686 | |
| 35 | +2015-01-06,1D_RV,0.3743804983306632,6686 | |
| 36 | +2015-04-08,5D_Return,0.08856876324807483,6757 | |
| 37 | +2015-04-08,1D_RV,0.33866563689412854,6757 | |
| 38 | +2015-07-08,5D_Return,0.08855394148092877,6880 | |
| 39 | +2015-07-08,1D_RV,0.3133509621139585,6880 | |
| 40 | +2015-10-06,5D_Return,0.1613671723971778,6872 | |
| 41 | +2015-10-06,1D_RV,0.2878358987062901,6872 | |
| 42 | +2016-01-06,5D_Return,0.11518406367935452,6975 | |
| 43 | +2016-01-06,1D_RV,0.2576791876064187,6975 | |
| 44 | +2016-04-07,5D_Return,0.13131863877949268,7128 | |
| 45 | +2016-04-07,1D_RV,0.318318122522638,7128 | |
| 46 | +2016-07-07,5D_Return,0.15004103410760783,7103 | |
| 47 | +2016-07-07,1D_RV,0.27488652682668135,7103 | |
| 48 | +2016-10-05,5D_Return,0.0813561144138053,7398 | |
| 49 | +2016-10-05,1D_RV,0.30954821841079294,7398 | |
| 50 | +2017-01-05,5D_Return,0.09056799958207484,7483 | |
| 51 | +2017-01-05,1D_RV,0.3359918139941088,7483 | |
| 52 | +2017-04-06,5D_Return,0.06620427550875507,7668 | |
| 53 | +2017-04-06,1D_RV,0.2655959604773547,7668 | |
| 54 | +2017-07-07,5D_Return,0.059186298128760195,7956 | |
| 55 | +2017-07-07,1D_RV,0.3316982724568045,7956 | |
| 56 | +2017-10-05,5D_Return,0.054807372047663394,7998 | |
| 57 | +2017-10-05,1D_RV,0.36203860891414485,7998 | |
| 58 | +2018-01-05,5D_Return,0.037096558497779375,8147 | |
| 59 | +2018-01-05,1D_RV,0.3066197493084042,8147 | |
| 60 | +2018-04-09,5D_Return,0.06525674770187628,8181 | |
| 61 | +2018-04-09,1D_RV,0.31857185451024295,8181 | |
| 62 | +2018-07-09,5D_Return,0.07173327925022444,8398 | |
| 63 | +2018-07-09,1D_RV,0.3246150293332297,8398 | |
| 64 | +2018-10-05,5D_Return,0.07164018971166897,8356 | |
| 65 | +2018-10-05,1D_RV,0.3149489798898225,8356 | |
| 66 | +2019-01-08,5D_Return,0.16831741729931038,8169 | |
| 67 | +2019-01-08,1D_RV,0.4343156491274691,8171 | |
| 68 | +2019-04-09,5D_Return,0.15212660842687864,8291 | |
| 69 | +2019-04-09,1D_RV,0.4472303551800254,8293 | |
| 70 | +2019-07-10,5D_Return,0.17658819829700811,8109 | |
| 71 | +2019-07-10,1D_RV,0.46233863031404077,8111 | |
| 72 | +2019-10-08,5D_Return,0.17889265058239823,8076 | |
| 73 | +2019-10-08,1D_RV,0.4473240698476526,8078 | |
| 74 | +2020-01-08,5D_Return,0.08365574631367734,8376 | |
| 75 | +2020-01-08,1D_RV,0.3618574654714575,8378 | |
| 76 | +2020-04-08,5D_Return,0.17438089206684393,8397 | |
| 77 | +2020-04-08,1D_RV,0.7560253540697512,8399 | |
| 78 | +2020-07-09,5D_Return,0.1616524175298979,8556 | |
| 79 | +2020-07-09,1D_RV,0.7387867300637314,8558 | |
| 80 | +2020-10-07,5D_Return,0.14790255783658168,8820 | |
| 81 | +2020-10-07,1D_RV,0.7289648174455741,8822 | |
| 82 | +2021-01-07,5D_Return,0.14499418212878656,8906 | |
| 83 | +2021-01-07,1D_RV,0.72087580758492,8906 | |
| 84 | +2021-04-09,5D_Return,0.054316653565192,9002 | |
| 85 | +2021-04-09,1D_RV,0.4911865866388201,9002 | |
| 86 | +2021-07-09,5D_Return,0.040231000056973554,9280 | |
| 87 | +2021-07-09,1D_RV,0.4595323868789245,9280 | |
| 88 | +2021-10-07,5D_Return,0.040430006647859895,9515 | |
| 89 | +2021-10-07,1D_RV,0.4256409626305525,9518 | |
| 90 | +2022-01-06,5D_Return,0.03763780612931866,9802 | |
| 91 | +2022-01-06,1D_RV,0.44573326701660765,9805 | |
| 92 | +2022-04-07,5D_Return,0.061797653654088625,10068 | |
| 93 | +2022-04-07,1D_RV,0.47636588180970385,10071 | |
| 94 | +2022-07-11,5D_Return,0.11783330782021773,9839 | |
| 95 | +2022-07-11,1D_RV,0.525977781280833,9842 | |
| 96 | +2022-10-07,5D_Return,0.11217431591772808,10050 | |
| 97 | +2022-10-07,1D_RV,0.49080008175735634,10052 | |
| 98 | +2023-01-09,5D_Return,0.08392090026160703,9962 | |
| 99 | +2023-01-09,1D_RV,0.47016160268834595,9964 | |
| 100 | +2023-04-11,5D_Return,0.08226584330582876,9838 | |
| 101 | +2023-04-11,1D_RV,0.4473394336875208,9840 | |
| 102 | +2023-07-12,5D_Return,0.08859536228344689,9994 | |
| 103 | +2023-07-12,1D_RV,0.41327665031900584,9996 | |
| 104 | +2023-10-10,5D_Return,0.08832429425930266,9742 | |
| 105 | +2023-10-10,1D_RV,0.43348651667187643,9742 | |
| 106 | +2024-01-10,5D_Return,0.0975739372040173,9738 | |
| 107 | +2024-01-10,1D_RV,0.39378883009088395,9739 | |
| 108 | +2024-04-11,5D_Return,0.08596217222832447,10072 | |
| 109 | +2024-04-11,1D_RV,0.39163580025876676,10073 | |
| 110 | +2024-07-12,5D_Return,0.08626966456481489,10344 | |
| 111 | +2024-07-12,1D_RV,0.38716945093956234,10345 | |
| 112 | +2024-10-10,5D_Return,0.06966933278429732,10600 | |
| 113 | +2024-10-10,1D_RV,0.3775303805749274,10602 | |
| 114 | +2025-01-13,5D_Return,0.03852552912948948,10815 | |
| 115 | +2025-01-13,1D_RV,0.39310299563074236,10816 | |
| 116 | +2025-04-14,5D_Return,0.0542218319103438,10707 | |
| 117 | +2025-04-14,1D_RV,0.4072013812208505,10708 | |
| 118 | +2025-07-16,5D_Return,0.03995382505301126,10815 | |
| 119 | +2025-07-16,1D_RV,0.39895286667176666,10816 | |
| 120 | +2025-10-14,5D_Return,0.03940523037013821,10916 | |
| 121 | +2025-10-14,1D_RV,0.39656328003243346,10916 | |
added
results/rq1_meta.csv
+13 −0
@@ -0,0 +1,13 @@ | ||
| 1 | +label,target,n_obs,n_tickers,r_squared,adj_r_squared,n_periods | |
| 2 | +Stocks | 1-Day,ret_1d,79943.0,49,0.0007920872397515488,0.0006670799944981098, | |
| 3 | +Stocks | 1-Day,ret_1d,,49,,,2415.0 | |
| 4 | +Stocks | 5-Day,ret_5d,79943.0,49,0.047584162165434485,0.04746500890543415, | |
| 5 | +Stocks | 5-Day,ret_5d,,49,,,2415.0 | |
| 6 | +ETFs | 1-Day,ret_1d,30152.0,17,0.0013818787764086071,0.001050563252297354, | |
| 7 | +ETFs | 5-Day,ret_5d,30152.0,17,0.12417340136711796,0.12388282487707691, | |
| 8 | +Indices | 1-Day,ret_1d,8986.0,3,0.004265737828671234,0.0031562846117672017, | |
| 9 | +Indices | 5-Day,ret_5d,8986.0,3,0.19295348533980317,0.1920542691674798, | |
| 10 | +All | 1-Day,ret_1d,119081.0,69,0.0010269049901033833,0.0009430070229403675, | |
| 11 | +All | 1-Day,ret_1d,,69,,,2747.0 | |
| 12 | +All | 5-Day,ret_5d,119081.0,69,0.05291603110227727,0.05283649100242871, | |
| 13 | +All | 5-Day,ret_5d,,69,,,2747.0 | |
added
results/rq1_regression_results.csv
+133 −0
@@ -0,0 +1,133 @@ | ||
| 1 | +variable,coefficient,std_error,t_stat,p_value,significant_5pct,significant_1pct,group,horizon,method,fm_coefficient,fm_std_error,fm_t_stat,fm_significant_5pct,fm_significant_1pct | |
| 2 | +const,0.000474932616763485,6.162181567921933e-05,7.707215562030999,1.9999999999998992,True,True,Stocks,1-Day,Pooled OLS,,,,, | |
| 3 | +iv_atm_30d,0.00035455189599640634,0.00014772580677565472,2.400067420412536,1.955218186198448,True,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 4 | +iv_term_slope,0.0001337037724583662,9.031763495795387e-05,1.4803728255352362,1.7332766243587603,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 5 | +iv_skew_25d,0.00046873042686361156,0.0001620729700748604,2.8920950029305206,1.9878192458998507,True,True,Stocks,1-Day,Pooled OLS,,,,, | |
| 6 | +implied_skewness,-0.00015858867442038435,0.00014143423994979204,-1.1212891197823243,1.5744768805728322,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 7 | +implied_kurtosis_proxy,4.48979833319166e-05,9.23248524272986e-05,0.4863044148082621,1.2910975461061942,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 8 | +pc_volume_ratio,0.00010182969163875522,6.138084275049604e-05,1.6589816476237986,1.7984870045690193,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 9 | +pc_oi_ratio,-3.8676878325755606e-05,6.788058646276207e-05,-0.5697781993526672,1.321665636345357,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 10 | +net_gamma_exposure,1.8752855129314922e-05,5.816636875875159e-05,0.3224003067321167,1.242523171522562,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 11 | +rv_daily,-0.00028357991626498587,0.00014983861258386076,-1.8925690205938979,1.866906062290026,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 12 | +rv_w,-0.00010427602066402549,0.0001475790120177198,-0.706577576569662,1.3783743948807272,False,False,Stocks,1-Day,Pooled OLS,,,,, | |
| 13 | +const,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0005206125501497901,0.00020804551602204784,2.502397360463264,True,False | |
| 14 | +iv_atm_30d,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0003251412661700667,0.0003840623039447049,0.846584689073986,False,False | |
| 15 | +iv_term_slope,,,,,,,Stocks,1-Day,Fama-MacBeth,0.00010238512746974467,0.0001989943963502724,0.5145126161719906,False,False | |
| 16 | +iv_skew_25d,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0004206714326659521,0.0003747705436733475,1.12247731249821,False,False | |
| 17 | +implied_skewness,,,,,,,Stocks,1-Day,Fama-MacBeth,-0.00013551298475038956,0.00038248570078159937,-0.35429555790836725,False,False | |
| 18 | +implied_kurtosis_proxy,,,,,,,Stocks,1-Day,Fama-MacBeth,-0.00022594310047698103,0.0002379965138150703,-0.9493546642979187,False,False | |
| 19 | +pc_volume_ratio,,,,,,,Stocks,1-Day,Fama-MacBeth,0.00014033929167979575,0.00017860227653546188,0.7857642937262956,False,False | |
| 20 | +pc_oi_ratio,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0001981586340207331,0.0002611521554982688,0.7587861323321405,False,False | |
| 21 | +net_gamma_exposure,,,,,,,Stocks,1-Day,Fama-MacBeth,0.00036414134612425156,0.0002031270329057981,1.792677916450073,False,False | |
| 22 | +rv_daily,,,,,,,Stocks,1-Day,Fama-MacBeth,0.0005762857353465481,0.0006180100527575335,0.9324860215059395,False,False | |
| 23 | +rv_w,,,,,,,Stocks,1-Day,Fama-MacBeth,-0.0013274298575132058,0.0007405214180403771,-1.7925610592411352,False,False | |
| 24 | +const,0.0027061188053752005,0.00013432330834326907,20.14630847581267,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 25 | +iv_atm_30d,0.0005912653544219688,0.00031959915015051247,1.8500216729096979,1.855876030110964,False,False,Stocks,5-Day,Pooled OLS,,,,, | |
| 26 | +iv_term_slope,0.00027043383017297587,0.00019265202440833657,1.4037424781988093,1.7021120366838733,False,False,Stocks,5-Day,Pooled OLS,,,,, | |
| 27 | +iv_skew_25d,-0.0003691227931167262,0.0003470167292962963,-1.0637031645859207,1.5468461397520685,False,False,Stocks,5-Day,Pooled OLS,,,,, | |
| 28 | +implied_skewness,-0.004823247690304923,0.0003076099642172168,-15.67975115038542,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 29 | +implied_kurtosis_proxy,0.00685030663037184,0.00020700965914978624,33.09172460119436,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 30 | +pc_volume_ratio,-0.0022401638478081643,0.00012729944249734382,-17.597593546844532,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 31 | +pc_oi_ratio,0.00200644595075205,0.00014790606790470687,13.565677048792654,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 32 | +net_gamma_exposure,0.002748993885189219,0.00013224248226984198,20.787524840768434,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 33 | +rv_daily,-0.005391455115447301,0.00036083936844073626,-14.941427091907755,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 34 | +rv_w,0.0034757002401655753,0.00038693176700024497,8.982721338988368,2.0,True,True,Stocks,5-Day,Pooled OLS,,,,, | |
| 35 | +const,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0026507805795847224,0.0004504778016310442,5.884375589622942,True,True | |
| 36 | +iv_atm_30d,,,,,,,Stocks,5-Day,Fama-MacBeth,0.00021234814973553797,0.0010326016107086292,0.2056438296564468,False,False | |
| 37 | +iv_term_slope,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0007620600421148093,0.000659712884378851,1.1551389402259784,False,False | |
| 38 | +iv_skew_25d,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0010283112083582571,0.0007593869106956063,1.3541334382710302,False,False | |
| 39 | +implied_skewness,,,,,,,Stocks,5-Day,Fama-MacBeth,-0.004076540006758636,0.000793511915806533,-5.137339371413474,True,True | |
| 40 | +implied_kurtosis_proxy,,,,,,,Stocks,5-Day,Fama-MacBeth,0.004970419343752162,0.00041118094828401113,12.088155748692403,True,True | |
| 41 | +pc_volume_ratio,,,,,,,Stocks,5-Day,Fama-MacBeth,-0.0013239231015417872,0.00031987969871793927,-4.138815644906508,True,True | |
| 42 | +pc_oi_ratio,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0015882860087037634,0.00043227802342823437,3.6742233530811133,True,True | |
| 43 | +net_gamma_exposure,,,,,,,Stocks,5-Day,Fama-MacBeth,0.002346410924205401,0.00028655943225633834,8.188217382097712,True,True | |
| 44 | +rv_daily,,,,,,,Stocks,5-Day,Fama-MacBeth,-0.002665424305429692,0.0027846154779436684,-0.9571965416919989,False,False | |
| 45 | +rv_w,,,,,,,Stocks,5-Day,Fama-MacBeth,0.0015220864438043314,0.002348369736143261,0.648145996934904,False,False | |
| 46 | +const,0.00020662881302969998,6.452265041421152e-05,3.202422896505638,1.9952686634925516,True,True,ETFs,1-Day,Pooled OLS,,,,, | |
| 47 | +iv_atm_30d,-8.538059110035151e-05,0.00018727687437503155,-0.4559056818161782,1.280872313489378,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 48 | +iv_term_slope,-0.00012595632511888948,0.00010708402144885775,-1.1762382792006456,1.6005072243318272,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 49 | +iv_skew_25d,0.0007263652992749296,0.00021146693358568215,3.434888315437841,1.997812553117713,True,True,ETFs,1-Day,Pooled OLS,,,,, | |
| 50 | +implied_skewness,-0.0004639499027583751,0.0001611718369976396,-2.878604050192527,1.9873357471624093,True,True,ETFs,1-Day,Pooled OLS,,,,, | |
| 51 | +implied_kurtosis_proxy,4.204684792508878e-05,9.431583529850443e-05,0.4458089968880922,1.2775912636884144,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 52 | +pc_volume_ratio,-0.00010369639795364441,7.007262267860164e-05,-1.479841826803931,1.7330669146942486,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 53 | +pc_oi_ratio,-4.182733258083947e-05,8.252043710215951e-05,-0.5068724070021301,1.298301301238922,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 54 | +net_gamma_exposure,-8.13966530104468e-05,7.84490449694536e-05,-1.037573536327191,1.5342334678113938,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 55 | +rv_daily,-0.0002072757835089407,0.0001721376251345032,-1.2041282859977973,1.613550398733288,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 56 | +rv_w,-0.00017838904042191916,0.00019082977493507455,-0.9348071624703846,1.484554430123175,False,False,ETFs,1-Day,Pooled OLS,,,,, | |
| 57 | +const,0.0010308927248672006,0.00013159892884786692,7.833595105161909,1.9999999999999623,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 58 | +iv_atm_30d,-0.00036640376368043883,0.00038966390517105725,-0.940307169378679,1.4872055206015122,False,False,ETFs,5-Day,Pooled OLS,,,,, | |
| 59 | +iv_term_slope,0.004283241521837185,0.0002259919004448612,18.953075368655675,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 60 | +iv_skew_25d,0.002480755191793038,0.00044204526589799266,5.611993574353769,1.9999998843881401,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 61 | +implied_skewness,-0.004664820927670824,0.0003399744279015444,-13.721093543605411,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 62 | +implied_kurtosis_proxy,0.0041012410958793976,0.00020577790096052312,19.930425360234327,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 63 | +pc_volume_ratio,-0.0013799828658628117,0.00014133249273191607,-9.7640877846852,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 64 | +pc_oi_ratio,0.002161714105211538,0.0001704957035500346,12.67899460338688,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 65 | +net_gamma_exposure,0.003767604389154926,0.00015741482374876124,23.934241384840192,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 66 | +rv_daily,-0.006848528775634996,0.0003721779427463065,-18.401221536933654,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 67 | +rv_w,0.006252444500217706,0.000431762676693989,14.481206546366476,2.0,True,True,ETFs,5-Day,Pooled OLS,,,,, | |
| 68 | +const,0.0005333294384410453,0.00011906230226928457,4.479414796085566,1.9999649371997115,True,True,Indices,1-Day,Pooled OLS,,,,, | |
| 69 | +iv_atm_30d,8.421668977903808e-05,0.000592503352667127,0.14213706876077656,1.2101346774214155,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 70 | +iv_term_slope,-0.0002762448822661015,0.00021191705542886817,-1.3035519095291768,1.658843902688442,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 71 | +iv_skew_25d,0.0005634362016035403,0.0005654644728853093,0.9964130880381935,1.514322703040474,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 72 | +implied_skewness,-4.523812649431471e-05,0.0004652115596140649,-0.09724205162022162,1.2058789400818677,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 73 | +implied_kurtosis_proxy,-0.00027814493839385874,0.00029287232893186505,-0.9497139569596125,1.4917438126249247,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 74 | +pc_volume_ratio,-0.0002310689053383369,0.00013512828047038675,-1.7099966382608964,1.815080670188512,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 75 | +pc_oi_ratio,0.00010636959815468899,0.00014555432481376852,0.730789677948663,1.389097635822485,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 76 | +net_gamma_exposure,0.00017803134914497163,0.00014282155049038473,1.2465300126885077,1.6331161217052528,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 77 | +rv_daily,-0.00047865392149875924,0.0003135866340013785,-1.5263849590498015,1.7511031870552054,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 78 | +rv_w,-7.944179859493122e-05,0.00035635914879863893,-0.2229262216579709,1.22169702515993,False,False,Indices,1-Day,Pooled OLS,,,,, | |
| 79 | +const,0.002555193205189299,0.0002319015604420927,11.018439032139877,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 80 | +iv_atm_30d,-0.010269678734085418,0.0011976008876859584,-8.575209687702229,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 81 | +iv_term_slope,0.005261942797308747,0.0004296967117880226,12.245713436840452,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 82 | +iv_skew_25d,0.011483100058852296,0.0011769604910730313,9.756572243460091,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 83 | +implied_skewness,-0.018733318801635174,0.0009511367161098348,-19.695716172386618,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 84 | +implied_kurtosis_proxy,0.013347061870456868,0.0005822158566772383,22.924593546163152,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 85 | +pc_volume_ratio,-0.0025103995907148333,0.0002570545123851268,-9.766020317720303,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 86 | +pc_oi_ratio,-0.001079734828077311,0.00027217034442134156,-3.9671288595857996,1.999694892702129,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 87 | +net_gamma_exposure,0.0001574589910413332,0.00024393074075834865,0.6455069605077812,1.3521725964645284,False,False,Indices,5-Day,Pooled OLS,,,,, | |
| 88 | +rv_daily,-0.006898841239676293,0.0007235393546656855,-9.534852797141811,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 89 | +rv_w,0.008441113820457176,0.0007816760527470257,10.79873662598818,2.0,True,True,Indices,5-Day,Pooled OLS,,,,, | |
| 90 | +const,0.0004176344644803883,4.47995863539856e-05,9.322283942097902,2.0,True,True,All,1-Day,Pooled OLS,,,,, | |
| 91 | +iv_atm_30d,0.0002801047907919166,0.00011337197236012893,2.470670527828136,1.9622925571593284,True,False,All,1-Day,Pooled OLS,,,,, | |
| 92 | +iv_term_slope,8.139458311611633e-05,6.934094708787371e-05,1.1738314305538315,1.5993758072647923,False,False,All,1-Day,Pooled OLS,,,,, | |
| 93 | +iv_skew_25d,0.0005589385749154346,0.00011991456612637132,4.661139951308336,1.9999847190587423,True,True,All,1-Day,Pooled OLS,,,,, | |
| 94 | +implied_skewness,-0.0002743207103647737,0.00010918059267334453,-2.512540953001684,1.9660281273891782,True,False,All,1-Day,Pooled OLS,,,,, | |
| 95 | +implied_kurtosis_proxy,3.198392220424989e-05,7.05171069893689e-05,0.45356259735771287,1.2801056886264495,False,False,All,1-Day,Pooled OLS,,,,, | |
| 96 | +pc_volume_ratio,-1.4646201853654451e-06,4.806643969104855e-05,-0.030470744136229473,1.2024857576757706,False,False,All,1-Day,Pooled OLS,,,,, | |
| 97 | +pc_oi_ratio,-6.372137176547058e-05,5.574728819572048e-05,-1.1430398469205223,1.5848275896789725,False,False,All,1-Day,Pooled OLS,,,,, | |
| 98 | +net_gamma_exposure,5.053448274950564e-06,4.575733672819504e-05,0.11044017498152814,1.2069665437522432,False,False,All,1-Day,Pooled OLS,,,,, | |
| 99 | +rv_daily,-0.0003205395398650559,0.00011649992773262157,-2.751414066116201,1.981883479718538,True,True,All,1-Day,Pooled OLS,,,,, | |
| 100 | +rv_w,-4.733923850995692e-05,0.00011700280574635599,-0.4045991735666671,1.2648212398634209,False,False,All,1-Day,Pooled OLS,,,,, | |
| 101 | +const,,,,,,,All,1-Day,Fama-MacBeth,0.0004413041094819202,0.0001808697891170869,2.4398995080170076,True,False | |
| 102 | +iv_atm_30d,,,,,,,All,1-Day,Fama-MacBeth,0.0006181471672674394,0.00028381610833640007,2.1779847905417866,True,False | |
| 103 | +iv_term_slope,,,,,,,All,1-Day,Fama-MacBeth,-4.081336525737279e-07,0.00014294855969499375,-0.0028551085330594016,False,False | |
| 104 | +iv_skew_25d,,,,,,,All,1-Day,Fama-MacBeth,-0.0013001812251797235,0.0013075659278649022,-0.9943523286070652,False,False | |
| 105 | +implied_skewness,,,,,,,All,1-Day,Fama-MacBeth,0.0004697753320753678,0.0005765573956343808,0.81479369726665,False,False | |
| 106 | +implied_kurtosis_proxy,,,,,,,All,1-Day,Fama-MacBeth,0.00082315215920257,0.0007074854043177244,1.1634899521303776,False,False | |
| 107 | +pc_volume_ratio,,,,,,,All,1-Day,Fama-MacBeth,9.181748761099694e-05,0.00018024556909157158,0.5094021898776895,False,False | |
| 108 | +pc_oi_ratio,,,,,,,All,1-Day,Fama-MacBeth,-0.00041127183128026565,0.0004774786675521109,-0.861340745103299,False,False | |
| 109 | +net_gamma_exposure,,,,,,,All,1-Day,Fama-MacBeth,-1.3270592915753665e-05,0.00013772364267009075,-0.09635667964100125,False,False | |
| 110 | +rv_daily,,,,,,,All,1-Day,Fama-MacBeth,0.0005739521885663322,0.000870886727559515,0.6590434443463363,False,False | |
| 111 | +rv_w,,,,,,,All,1-Day,Fama-MacBeth,0.00016385563561749285,0.00033958429755600027,0.4825182930917814,False,False | |
| 112 | +const,0.0022494731376496314,9.744195685448007e-05,23.085262347604505,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 113 | +iv_atm_30d,0.0013216894865223886,0.000244859863518787,5.39773839423455,1.9999996239641074,True,True,All,5-Day,Pooled OLS,,,,, | |
| 114 | +iv_term_slope,0.0011337249658925099,0.0001494041142035314,7.588311553107903,1.99999999999975,True,True,All,5-Day,Pooled OLS,,,,, | |
| 115 | +iv_skew_25d,-0.00037312994583490734,0.0002595318279233912,-1.437703994999211,1.7161438664738873,False,False,All,5-Day,Pooled OLS,,,,, | |
| 116 | +implied_skewness,-0.004685283351910469,0.0002373842080273202,-19.73713159289537,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 117 | +implied_kurtosis_proxy,0.006342364539424329,0.00015829484255366755,40.06677941685967,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 118 | +pc_volume_ratio,-0.002132644149767726,9.927152874459024e-05,-21.48293852968335,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 119 | +pc_oi_ratio,0.0026340534130510273,0.00012007776063765929,21.936230314949132,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 120 | +net_gamma_exposure,0.003020589170580747,0.00010150654768395594,29.757579579845956,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 121 | +rv_daily,-0.005554059316747935,0.00028478073801420275,-19.502931818622297,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 122 | +rv_w,0.003483097582502059,0.00030310500997495795,11.491389016598,2.0,True,True,All,5-Day,Pooled OLS,,,,, | |
| 123 | +const,,,,,,,All,5-Day,Fama-MacBeth,0.002323011347847269,0.00039754974848221243,5.843322393527329,True,True | |
| 124 | +iv_atm_30d,,,,,,,All,5-Day,Fama-MacBeth,0.0019895227580191705,0.0008178968950930981,2.432486013769145,True,False | |
| 125 | +iv_term_slope,,,,,,,All,5-Day,Fama-MacBeth,-0.0001790619787337875,0.0004063020112275045,-0.4407115243973618,False,False | |
| 126 | +iv_skew_25d,,,,,,,All,5-Day,Fama-MacBeth,-0.005148340935837986,0.004263900455580346,-1.2074252177018192,False,False | |
| 127 | +implied_skewness,,,,,,,All,5-Day,Fama-MacBeth,-0.00044319883202346044,0.0018345447539487546,-0.2415851840460691,False,False | |
| 128 | +implied_kurtosis_proxy,,,,,,,All,5-Day,Fama-MacBeth,0.006308505476171523,0.00228922171502034,2.7557424581373375,True,True | |
| 129 | +pc_volume_ratio,,,,,,,All,5-Day,Fama-MacBeth,-0.0006773779408859124,0.0005625090923140673,-1.2042079855088104,False,False | |
| 130 | +pc_oi_ratio,,,,,,,All,5-Day,Fama-MacBeth,0.000549945619487073,0.001539565707662154,0.35720828071844424,False,False | |
| 131 | +net_gamma_exposure,,,,,,,All,5-Day,Fama-MacBeth,0.001751342008917153,0.0003664082298005351,4.779756202175226,True,True | |
| 132 | +rv_daily,,,,,,,All,5-Day,Fama-MacBeth,0.002703563259831964,0.002807836068549604,0.9628636408351637,False,False | |
| 133 | +rv_w,,,,,,,All,5-Day,Fama-MacBeth,0.0003930840057780338,0.001036841442690807,0.3791167960627651,False,False | |
added
results/rq2_diebold_mariano.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +ticker,target,mse_har,mse_har_iv,mse_improvement_pct,dm_statistic,dm_significant_5pct | |
| 2 | +AAPL,1-Day RV,1.7950043241009343e-07,1.6098906658129363e-07,10.312713780269918,2.543036809565022,True | |
| 3 | +ADBE,1-Day RV,5.0580415716854e-07,5.11374314723003e-07,-1.1012478793460985,-0.30704809442856834,False | |
| 4 | +AMD,1-Day RV,6.382801960919758e-07,5.635915584653393e-07,11.701543943229884,3.1289962195643373,True | |
| 5 | +AMZN,1-Day RV,4.187879818586951e-07,3.941619383189849e-07,5.880312856737939,0.2623425547306825,False | |
| 6 | +BA,1-Day RV,3.3021759735206715e-07,4.5906911839460483e-07,-39.02018610630263,-6.393673579939354,True | |
| 7 | +BAC,1-Day RV,1.262583125268149e-07,1.254460189593778e-07,0.64335848561622,0.05682340405268784,False | |
| 8 | +CAT,1-Day RV,3.398498139380265e-07,2.2865488041076963e-07,32.718844903511965,4.265490241030367,True | |
| 9 | +COST,1-Day RV,5.349085325868792e-08,4.0459715223583013e-08,24.36143235944438,2.9356654663275203,True | |
| 10 | +CRM,1-Day RV,4.419190919691864e-07,4.0221932089176675e-07,8.98349308705309,1.6119334725050594,False | |
| 11 | +CSCO,1-Day RV,1.597641169260778e-07,2.147281038401937e-07,-34.403211416708494,-3.765543575617672,True | |
| 12 | +AAPL,5-Day RV,6.932414484979052e-07,6.66216554866902e-07,3.8983378286973402,1.6977469113851318,False | |
| 13 | +ADBE,5-Day RV,1.347337010667358e-06,1.340664351287823e-06,0.4952479837416442,0.18932941274139264,False | |
| 14 | +AMD,5-Day RV,2.4977672031107997e-06,2.3543821148822547e-06,5.740530504603016,1.6768237805174921,False | |
| 15 | +AMZN,5-Day RV,1.4805343348789213e-06,1.8383077529782716e-06,-24.16515508426957,-7.506642917460537,True | |
| 16 | +BA,5-Day RV,8.837292833948632e-07,1.1298098649007272e-06,-27.845697333977736,-5.064795983807979,True | |
| 17 | +BAC,5-Day RV,2.966368532716739e-07,3.014497204224181e-07,-1.622477820156875,-0.44173668015808965,False | |
| 18 | +CAT,5-Day RV,9.781952519109975e-07,9.976767482155355e-07,-1.991575431027601,-0.3351531468587768,False | |
| 19 | +COST,5-Day RV,1.1909117963209526e-07,1.0552693312306167e-07,11.38979943849511,2.318175289030817,True | |
| 20 | +CRM,5-Day RV,9.623117337437032e-07,1.0087392939978663e-06,-4.824586319190453,-1.884617805428551,False | |
| 21 | +CSCO,5-Day RV,3.561119258698909e-07,4.028011471819589e-07,-13.11082778202895,-2.5356271322697874,True | |
added
results/rq2_insample.csv
+11 −0
@@ -0,0 +1,11 @@ | ||
| 1 | +target,model,r2,adj_r2,n_obs,n_features | |
| 2 | +1-Day RV,HAR-RV,0.3585199062249016,0.3585126260818995,264345,3 | |
| 3 | +1-Day RV,GARCH_proxy,0.3258294941832208,0.32582439411395747,264380,2 | |
| 4 | +1-Day RV,IV_only,0.3904191647845503,0.3903988918821112,120280,4 | |
| 5 | +1-Day RV,IV_surface,0.3908328083987763,0.39080211626746275,119093,6 | |
| 6 | +1-Day RV,HAR-RV + IV_surface,0.44201904790040747,0.44197687707359845,119093,9 | |
| 7 | +5-Day RV,HAR-RV,0.8881115552871761,0.8881102854677605,264345,3 | |
| 8 | +5-Day RV,GARCH_proxy,0.6480986274956819,0.6480959653375,264376,2 | |
| 9 | +5-Day RV,IV_only,0.495379967560757,0.4953631853522369,120280,4 | |
| 10 | +5-Day RV,IV_surface,0.4957706353949066,0.4957452304254927,119093,6 | |
| 11 | +5-Day RV,HAR-RV + IV_surface,0.8961652931746857,0.896157445603148,119093,9 | |
added
results/rq2_oos_results.csv
+301 −0
@@ -0,0 +1,301 @@ | ||
| 1 | +ticker,model,target,avg_mse,avg_mae,avg_r2_oos,avg_qlike,n_windows | |
| 2 | +AAPL,HAR-RV,1-Day RV,1.820838610866292e-07,0.0002213306899747562,0.0433813282195928,0.33746037308231047,14 | |
| 3 | +AAPL,GARCH_proxy,1-Day RV,1.9137838933094958e-07,0.0002237248992393853,0.027634128052043818,0.34348011473497203,14 | |
| 4 | +AAPL,IV_only,1-Day RV,1.4344480026757476e-07,0.00019447717422126326,0.0704728560009054,46525.12085572757,9 | |
| 5 | +AAPL,IV_surface,1-Day RV,1.456231494233464e-07,0.00019506572232304466,0.045108262487556026,112302.47643624288,9 | |
| 6 | +AAPL,HAR-RV + IV_surface,1-Day RV,1.3791191066669803e-07,0.00018664036117828646,0.08870983785579627,75479.50388494253,9 | |
| 7 | +ADBE,HAR-RV,1-Day RV,3.9028645490386254e-07,0.00033405261264561105,0.042975330110303904,0.3859645232556237,14 | |
| 8 | +ADBE,GARCH_proxy,1-Day RV,4.095169965517809e-07,0.0003467466647712206,0.0003063919590394521,0.3975730445386746,14 | |
| 9 | +ADBE,IV_only,1-Day RV,5.220835762137973e-07,0.00040320388083853236,0.028505511561891878,2333.592189925587,4 | |
| 10 | +ADBE,IV_surface,1-Day RV,5.404288134156759e-07,0.0004191907134674524,0.03947275457279753,18463.52975178049,4 | |
| 11 | +ADBE,HAR-RV + IV_surface,1-Day RV,5.108315464974141e-07,0.0004012745295834209,0.0830595411136198,35872.76489000161,4 | |
| 12 | +AMD,HAR-RV,1-Day RV,1.537918008011768e-06,0.0007511295334867977,0.09790104489005873,0.21734014557878037,14 | |
| 13 | +AMD,GARCH_proxy,1-Day RV,1.5680982014621236e-06,0.0007770919062253604,0.03947104792905271,0.2276877958577572,14 | |
| 14 | +AMD,IV_only,1-Day RV,5.971061540846137e-07,0.0005187733605628204,0.0012089614386184555,371998.3655094763,4 | |
| 15 | +AMD,IV_surface,1-Day RV,5.444511745390536e-07,0.0004932022907278468,0.06398588042853365,381099.4560284309,4 | |
| 16 | +AMD,HAR-RV + IV_surface,1-Day RV,5.60581767831595e-07,0.0004783512844438954,0.02144228628175779,127581.56418480266,4 | |
| 17 | +AMZN,HAR-RV,1-Day RV,4.796715775967195e-07,0.00035128233272762276,0.007885335947463514,0.39868187078305145,14 | |
| 18 | +AMZN,GARCH_proxy,1-Day RV,4.660988063784013e-07,0.0003532807493839547,0.022766244658606556,0.40408870636644767,14 | |
| 19 | +AMZN,IV_only,1-Day RV,3.6862786944969867e-07,0.0003124578150951396,0.06898791917236592,136012.98734901246,7 | |
| 20 | +AMZN,IV_surface,1-Day RV,3.902587261414621e-07,0.0003293102707696318,0.04080747667813034,98352.72704039492,7 | |
| 21 | +AMZN,HAR-RV + IV_surface,1-Day RV,3.6014294875435917e-07,0.0003028642875166384,0.08610633953868149,92349.83791990338,7 | |
| 22 | +BA,HAR-RV,1-Day RV,3.384517867326112e-07,0.00029017592708229656,0.01467367346769266,0.31036640460980774,14 | |
| 23 | +BA,GARCH_proxy,1-Day RV,3.495481475692749e-07,0.0003093287855659355,-0.15321643075040184,0.3453271075446688,14 | |
| 24 | +BA,IV_only,1-Day RV,3.4395435672539116e-07,0.00035621115783414137,0.15414706515375998,20355.41840541059,6 | |
| 25 | +BA,IV_surface,1-Day RV,3.4080529528835455e-07,0.00035464198835656407,0.16522082458083248,22367.476682657103,6 | |
| 26 | +BA,HAR-RV + IV_surface,1-Day RV,3.686817787917627e-07,0.00034957870668559456,0.14745373094808154,20843.206961515025,6 | |
| 27 | +BAC,HAR-RV,1-Day RV,2.0846021436081818e-07,0.0002337167865719596,0.004388351949147646,0.2532056965493739,14 | |
| 28 | +BAC,GARCH_proxy,1-Day RV,1.861755078704616e-07,0.00023279783702724613,-0.010313707334884832,0.2400406656318022,14 | |
| 29 | +BAC,IV_only,1-Day RV,1.481418372211009e-07,0.00020570640716168233,0.23674814898245597,1445.954476192857,7 | |
| 30 | +BAC,IV_surface,1-Day RV,1.5111016973840522e-07,0.00021076247167838103,0.2050176866122242,51139.406563612094,7 | |
| 31 | +BAC,HAR-RV + IV_surface,1-Day RV,1.4564657205458205e-07,0.00020224668564180898,0.24030697046164473,48691.534655435724,7 | |
| 32 | +CAT,HAR-RV,1-Day RV,3.4258450661293403e-07,0.0002790976396535242,-0.28918664153944806,0.3466725179147753,14 | |
| 33 | +CAT,GARCH_proxy,1-Day RV,2.3986792912866716e-07,0.0002578212885043374,-0.07614973791632408,0.34630609618190766,14 | |
| 34 | +CAT,IV_only,1-Day RV,2.4509124426677667e-07,0.0002620387202976792,0.04128611921021619,48289.298974305064,6 | |
| 35 | +CAT,IV_surface,1-Day RV,2.5926941615334543e-07,0.0002684765155883105,-0.030155904044544195,54289.71372397832,6 | |
| 36 | +CAT,HAR-RV + IV_surface,1-Day RV,2.583942585764667e-07,0.0002693844253658648,-0.019472410437920123,90574.71605127689,6 | |
| 37 | +COST,HAR-RV,1-Day RV,6.998817892011683e-08,0.00014732789197019862,0.07972013225198496,0.3269594610996608,14 | |
| 38 | +COST,GARCH_proxy,1-Day RV,7.786116278835057e-08,0.00015947837723085805,-0.008615056791003979,0.35414622936865164,14 | |
| 39 | +COST,IV_only,1-Day RV,4.5104668528192156e-08,0.00012323805230780619,0.3121222812196027,0.23210260986043843,3 | |
| 40 | +COST,IV_surface,1-Day RV,4.4858152243847e-08,0.00012387261869348622,0.3042277491851734,0.20859174860007332,3 | |
| 41 | +COST,HAR-RV + IV_surface,1-Day RV,3.971059163808138e-08,0.00012045012387606849,0.3477034913760571,0.20649163645341415,3 | |
| 42 | +CRM,HAR-RV,1-Day RV,3.838703764836172e-07,0.00035317071968719627,0.04513557400707276,0.3022120872619042,14 | |
| 43 | +CRM,GARCH_proxy,1-Day RV,4.055993548224333e-07,0.0003672816992009692,-0.017098584171107743,0.32303493006629497,14 | |
| 44 | +CRM,IV_only,1-Day RV,4.4688714732828517e-07,0.00040590648553847763,0.10589306570306008,97966.83912509364,6 | |
| 45 | +CRM,IV_surface,1-Day RV,4.445346468972879e-07,0.0004131177512460158,0.0869636669605961,174687.05595359695,6 | |
| 46 | +CRM,HAR-RV + IV_surface,1-Day RV,4.213544124182853e-07,0.00038344963619965693,0.13663811502351983,121641.09622909594,6 | |
| 47 | +CSCO,HAR-RV,1-Day RV,2.052280835930492e-07,0.00024286319605616217,-0.002195047368953738,0.33928957783839164,14 | |
| 48 | +CSCO,GARCH_proxy,1-Day RV,2.1177658780376252e-07,0.00025235855811181626,-0.01731502454638543,0.344315801765943,14 | |
| 49 | +CSCO,IV_only,1-Day RV,1.5998267568921887e-07,0.00020979644562862642,0.10666762706817767,69858.62214758746,6 | |
| 50 | +CSCO,IV_surface,1-Day RV,1.5334419541645544e-07,0.00021010502776290182,0.1287147081529769,56657.218984423525,6 | |
| 51 | +CSCO,HAR-RV + IV_surface,1-Day RV,1.5393158918905103e-07,0.00021017842436627993,0.12890216042583055,59174.73893019191,6 | |
| 52 | +CVX,HAR-RV,1-Day RV,1.3937369218609526e-07,0.00019303580815779785,-0.023082042071931676,0.29011583174263395,14 | |
| 53 | +CVX,GARCH_proxy,1-Day RV,1.3230240118497774e-07,0.00020241240612375858,-0.13650831460345123,0.3225449284142211,14 | |
| 54 | +CVX,IV_only,1-Day RV,1.0082066915965e-07,0.00018816622674793442,0.22398365492754962,46464.02544854707,5 | |
| 55 | +CVX,IV_surface,1-Day RV,1.0522068244717368e-07,0.00020197823745044837,0.10596772615917385,42462.20234316886,5 | |
| 56 | +CVX,HAR-RV + IV_surface,1-Day RV,9.794337956041206e-08,0.00019123702336238142,0.12916088222656855,27217.47642852749,5 | |
| 57 | +DIA,HAR-RV,1-Day RV,1.4419335675398693e-08,5.583220353529952e-05,-0.034757683127430175,0.3021579864927713,14 | |
| 58 | +DIA,GARCH_proxy,1-Day RV,1.1895141805131124e-08,5.554495106035616e-05,-0.15115044049545887,0.30768127691808467,14 | |
| 59 | +DIA,IV_only,1-Day RV,1.6824214111509758e-08,5.9196352432357936e-05,0.09868923641381289,11228.338692156349,8 | |
| 60 | +DIA,IV_surface,1-Day RV,1.5070769254984723e-08,5.98818013695743e-05,0.06951369726233914,27767.172607878972,8 | |
| 61 | +DIA,HAR-RV + IV_surface,1-Day RV,1.4940994157122017e-08,5.885845193148836e-05,0.13908803796138564,23056.934642731972,8 | |
| 62 | +DIS,HAR-RV,1-Day RV,1.9045826313567175e-07,0.00021319386394092548,-0.029512999803938345,0.3450459723930021,14 | |
| 63 | +DIS,GARCH_proxy,1-Day RV,1.8088588093637026e-07,0.00021107655376056183,-0.021892436470877536,0.3347856552499838,14 | |
| 64 | +DIS,IV_only,1-Day RV,1.2868409748508227e-07,0.00018030120262423557,0.10223032237216413,22449.445169433293,6 | |
| 65 | +DIS,IV_surface,1-Day RV,1.2513457838436774e-07,0.00018283779020702748,0.09362512457225798,95104.38265009275,6 | |
| 66 | +DIS,HAR-RV + IV_surface,1-Day RV,1.1835691693821005e-07,0.00017835075925694516,0.09431922170403813,89583.37110292846,6 | |
| 67 | +GLD,HAR-RV,1-Day RV,7.1345948496517625e-09,5.1686765496240926e-05,0.000686774420593339,0.22011985822754074,14 | |
| 68 | +GLD,GARCH_proxy,1-Day RV,8.119871075799431e-09,5.529223383186411e-05,-0.09810176207811545,0.24483073673300454,14 | |
| 69 | +GLD,IV_only,1-Day RV,7.696978059077645e-09,5.164309019953698e-05,0.12125523054533563,1104.527636057435,10 | |
| 70 | +GLD,IV_surface,1-Day RV,7.851761237433458e-09,5.2247708601498086e-05,0.11096515169543023,2579.326429249388,10 | |
| 71 | +GLD,HAR-RV + IV_surface,1-Day RV,7.878858594213956e-09,5.191581780534763e-05,0.11624547770651841,3490.105173795991,10 | |
| 72 | +GOOG,HAR-RV,1-Day RV,2.138716463172848e-07,0.00023323210854955372,0.03486214583465179,0.3575924887213877,14 | |
| 73 | +GOOG,GARCH_proxy,1-Day RV,2.1714088328576996e-07,0.0002425054829560453,0.024578210029891207,0.36778350406702404,14 | |
| 74 | +GOOG,IV_only,1-Day RV,2.118198318723779e-07,0.0002453813873403459,0.15563834670787782,32163.64706030875,7 | |
| 75 | +GOOG,IV_surface,1-Day RV,2.0850345573360704e-07,0.00024583488945631763,0.19119852815750873,8306.414184498024,7 | |
| 76 | +GOOG,HAR-RV + IV_surface,1-Day RV,1.9666424408077786e-07,0.00023414437947998556,0.22030810167259937,21263.184521685198,7 | |
| 77 | +GS,HAR-RV,1-Day RV,1.1845103959899045e-07,0.0001862811173127301,0.03968745651275123,0.24192609458638553,14 | |
| 78 | +GS,GARCH_proxy,1-Day RV,1.16596587116831e-07,0.00019653770044855714,-0.039233529823255585,0.25168283664212565,14 | |
| 79 | +GS,IV_only,1-Day RV,9.45556337760871e-08,0.00019987846778391885,0.2656614876698923,7323.788869415973,5 | |
| 80 | +GS,IV_surface,1-Day RV,1.0891315675262009e-07,0.00020472998833253263,0.2534197014626081,3836.3979230199047,5 | |
| 81 | +GS,HAR-RV + IV_surface,1-Day RV,1.0432199724791372e-07,0.00019939324568233474,0.2692595225990186,3836.4266898850183,5 | |
| 82 | +HD,HAR-RV,1-Day RV,1.0541747078309012e-07,0.00016532584593530902,0.006535539095566455,0.3095642524273844,14 | |
| 83 | +HD,GARCH_proxy,1-Day RV,1.0960182610467352e-07,0.0001745761030038731,-0.05076255793150296,0.33006740893353903,14 | |
| 84 | +HD,IV_only,1-Day RV,1.2864396503993647e-07,0.00022398362234533203,0.11147415959739754,20725.581259495597,6 | |
| 85 | +HD,IV_surface,1-Day RV,1.552690419670829e-07,0.00024579219794406825,-0.06712404382397735,26276.514241169993,6 | |
| 86 | +HD,HAR-RV + IV_surface,1-Day RV,1.425722461337372e-07,0.0002303768542360709,0.02403153518884532,17917.93462989779,6 | |
| 87 | +HON,HAR-RV,1-Day RV,1.4959769502559884e-07,0.0001930132162859047,-0.0843008315997351,0.4662911793044847,14 | |
| 88 | +HON,GARCH_proxy,1-Day RV,1.4434201620739066e-07,0.00019772785646555933,-0.10417532849099506,0.4818705302209939,14 | |
| 89 | +HON,IV_only,1-Day RV,1.1102679576255229e-07,0.00017452112897698804,0.07050071244326839,0.38357676251377926,2 | |
| 90 | +HON,IV_surface,1-Day RV,1.1064998773134263e-07,0.00017924574159835783,0.07962854617490178,0.37619594896237335,2 | |
| 91 | +HON,HAR-RV + IV_surface,1-Day RV,1.1611699159744318e-07,0.00018445249275924713,0.03642371506259712,0.38388407291610327,2 | |
| 92 | +INTC,HAR-RV,1-Day RV,4.96142341347655e-07,0.0003428204810161347,-0.019298787333094376,24288.069411020457,14 | |
| 93 | +INTC,GARCH_proxy,1-Day RV,5.228069849140048e-07,0.00035119779497191217,-0.07467441008434954,0.3451375347589705,14 | |
| 94 | +INTC,IV_only,1-Day RV,6.917060674270715e-07,0.0005046638881867875,-0.03828594957366127,49574.41833741307,7 | |
| 95 | +INTC,IV_surface,1-Day RV,7.226287307437874e-07,0.0005259059280322069,-0.04923363327270707,68096.01441053815,7 | |
| 96 | +INTC,HAR-RV + IV_surface,1-Day RV,7.124098094825643e-07,0.0004984979253778016,-0.006382266876371493,43525.30583034529,7 | |
| 97 | +IWM,HAR-RV,1-Day RV,8.415776190578042e-08,0.000135608832109036,-0.07756461051963219,0.31436063036039824,14 | |
| 98 | +IWM,GARCH_proxy,1-Day RV,7.458033545060637e-08,0.00013736377144206704,-0.09170006410140329,0.33349367180177675,14 | |
| 99 | +IWM,IV_only,1-Day RV,6.150878427214595e-08,0.00011133901441857529,0.20755105955581402,16100.244079225775,10 | |
| 100 | +IWM,IV_surface,1-Day RV,6.123348745877276e-08,0.00011086772132235217,0.1995292923091247,29036.370450237144,10 | |
| 101 | +IWM,HAR-RV + IV_surface,1-Day RV,6.392424010792028e-08,0.00011410537308474695,0.15763789171752496,57909.184939687526,10 | |
| 102 | +JPM,HAR-RV,1-Day RV,1.460673169064423e-07,0.0001982372347017853,-0.04500701553868085,0.30086458048836323,14 | |
| 103 | +JPM,GARCH_proxy,1-Day RV,1.5170846138695374e-07,0.00020922176662487114,-0.06767370821679855,0.30820021355760335,14 | |
| 104 | +JPM,IV_only,1-Day RV,1.5641615956549842e-07,0.00019788436195122697,0.18857035864839342,13750.47896765612,7 | |
| 105 | +JPM,IV_surface,1-Day RV,1.5100933319797663e-07,0.00019784264354374582,0.18779534620139154,1536.224456824251,7 | |
| 106 | +JPM,HAR-RV + IV_surface,1-Day RV,1.5737185732700927e-07,0.00020318842628359355,0.16038360254355138,57035.28471244515,7 | |
| 107 | +KO,HAR-RV,1-Day RV,4.384591777984601e-08,0.0001074739924491253,-0.046209149405957176,0.31272105981876974,14 | |
| 108 | +KO,GARCH_proxy,1-Day RV,4.0962700520521285e-08,0.00010938957956782587,-0.0673682378153821,0.3065750297220548,14 | |
| 109 | +KO,IV_only,1-Day RV,4.3081993217808755e-08,0.00011626055870540045,0.14472318167998008,2523.5420096813896,5 | |
| 110 | +KO,IV_surface,1-Day RV,4.5114194297532775e-08,0.00012072268119266189,0.10727665963621376,0.4043496845193714,5 | |
| 111 | +KO,HAR-RV + IV_surface,1-Day RV,4.515213044851228e-08,0.00011837028250882755,0.12197868982224727,12522.611784881363,5 | |
| 112 | +LLY,HAR-RV,1-Day RV,2.7756775102793796e-07,0.00026960198087381003,-0.029042903922437673,0.4608932236384467,14 | |
| 113 | +LLY,GARCH_proxy,1-Day RV,2.980575709781624e-07,0.00027307637407766774,-0.04941753714817432,0.4853493459780906,14 | |
| 114 | +LLY,IV_only,1-Day RV,0.0066607752679780875,0.006486080766256727,-18453.04046894582,19769.86676987401,5 | |
| 115 | +LLY,IV_surface,1-Day RV,0.006353499081840038,0.006516398202442253,-17220.04214939455,20868.174152399522,5 | |
| 116 | +LLY,HAR-RV + IV_surface,1-Day RV,0.0059670669616301115,0.006321314446128684,-16172.624273090561,20868.175494898875,5 | |
| 117 | +LMT,HAR-RV,1-Day RV,1.0822208956442961e-07,0.00016794230888674634,-0.06176692860417561,0.4000032994159707,14 | |
| 118 | +LMT,GARCH_proxy,1-Day RV,9.299039095248324e-08,0.0001613717053805515,-0.055151843653833174,0.40066996733081695,14 | |
| 119 | +LMT,IV_only,1-Day RV,8.865045191673294e-08,0.0001673832224070002,0.17438244354126453,13551.90709892795,2 | |
| 120 | +LMT,IV_surface,1-Day RV,9.932604653694487e-08,0.00016788888775978028,0.18805604687553634,61221.93953261501,2 | |
| 121 | +LMT,HAR-RV + IV_surface,1-Day RV,9.812507043038143e-08,0.00016548785448269865,0.19669105396120018,47421.975446375305,2 | |
| 122 | +LOW,HAR-RV,1-Day RV,3.1664659449341046e-07,0.0002753711693798239,-0.033693850482502744,0.4311620983034447,14 | |
| 123 | +LOW,GARCH_proxy,1-Day RV,3.2114527254364866e-07,0.0002902811073241535,-0.09988754876300276,0.4526516313815344,14 | |
| 124 | +LOW,IV_only,1-Day RV,4.020578746747348e-07,0.000275098921405676,0.04275440806937517,810155.5425076933,3 | |
| 125 | +LOW,IV_surface,1-Day RV,4.0123724157148604e-07,0.00027986244408961775,0.06359189598884492,810155.6580800116,3 | |
| 126 | +LOW,HAR-RV + IV_surface,1-Day RV,4.0101699611478475e-07,0.0002815010525364337,0.0976592747792165,829520.3292195671,3 | |
| 127 | +MA,HAR-RV,1-Day RV,1.355927299879869e-07,0.00019495247614699117,-0.022632617974097213,0.34187497981366743,14 | |
| 128 | +MA,GARCH_proxy,1-Day RV,1.302504995533665e-07,0.00020137619357697998,-0.030547539280745124,0.3602755882730887,14 | |
| 129 | +MA,IV_only,1-Day RV,1.4825744293019802e-07,0.00019747428416346094,0.04211184720622982,70724.25344315225,4 | |
| 130 | +MA,IV_surface,1-Day RV,1.4138000440067136e-07,0.0001944750661475634,0.05238062722657458,96888.40003585926,4 | |
| 131 | +MA,HAR-RV + IV_surface,1-Day RV,1.2431898112384413e-07,0.0001908866803723154,0.00028863533626552473,50990.19715462989,4 | |
| 132 | +MCD,HAR-RV,1-Day RV,5.340997638848088e-08,0.00011754359397211929,-0.0492823213689116,0.3537500814837657,14 | |
| 133 | +MCD,GARCH_proxy,1-Day RV,5.307431393440568e-08,0.00012109642633912199,-0.059644856538367715,0.34660915580872403,14 | |
| 134 | +MCD,IV_only,1-Day RV,5.082283850683626e-08,0.00012674465063460655,0.05861984508639688,1384.327759739836,5 | |
| 135 | +MCD,IV_surface,1-Day RV,5.163695704573293e-08,0.00013231112183047865,-0.11935337485932158,25109.03960559367,5 | |
| 136 | +MCD,HAR-RV + IV_surface,1-Day RV,4.989407656508192e-08,0.0001264436666833162,-0.12309377835084476,24526.515224463994,5 | |
| 137 | +MRK,HAR-RV,1-Day RV,1.2501923376179958e-07,0.00018677032956567683,-0.07627670568131698,0.3490273500539484,14 | |
| 138 | +MRK,GARCH_proxy,1-Day RV,1.19863457331909e-07,0.00018644946266969923,-0.07744830124133252,0.3427042307632349,14 | |
| 139 | +MRK,IV_only,1-Day RV,1.2065352123390375e-07,0.00021914242687884743,-0.0375535111631202,38115.06750770544,6 | |
| 140 | +MRK,IV_surface,1-Day RV,1.2794236863105197e-07,0.00022363223162061337,-0.12215308524081876,24181.472757020383,6 | |
| 141 | +MRK,HAR-RV + IV_surface,1-Day RV,1.1809774959785064e-07,0.000208171620292066,-0.06387755529109068,42287.67618753774,6 | |
| 142 | +MSFT,HAR-RV,1-Day RV,1.4132786532247266e-07,0.00020846035696246132,0.009199262134636883,0.31169019152434,14 | |
| 143 | +MSFT,GARCH_proxy,1-Day RV,1.4666868621876002e-07,0.000214300439588743,-0.015575421506940856,0.31147788818920674,14 | |
| 144 | +MSFT,IV_only,1-Day RV,1.6374169295895263e-07,0.00022368073340012045,0.18062824281128143,10299.793857013183,8 | |
| 145 | +MSFT,IV_surface,1-Day RV,1.667884072666832e-07,0.00022911027066435037,0.1725721426845959,41076.21897728862,8 | |
| 146 | +MSFT,HAR-RV + IV_surface,1-Day RV,1.6512158842417062e-07,0.00022588504446784238,0.16355518759020482,50039.258601985006,8 | |
| 147 | +NVDA,HAR-RV,1-Day RV,9.495097896936876e-07,0.0005470776715678033,0.08000860506137406,0.3133222178113166,14 | |
| 148 | +NVDA,GARCH_proxy,1-Day RV,1.0030811271843449e-06,0.0005822609393084007,0.019302504949521578,0.33426486484752826,14 | |
| 149 | +NVDA,IV_only,1-Day RV,9.193281144615092e-07,0.0005896936126841693,-0.01064344525859127,19059.13695614064,6 | |
| 150 | +NVDA,IV_surface,1-Day RV,9.238859327136409e-07,0.0005912063723040833,-0.002856724325428791,128997.15241599099,6 | |
| 151 | +NVDA,HAR-RV + IV_surface,1-Day RV,8.210873899816382e-07,0.0005507260377725196,0.10674159885101409,112984.82611891835,6 | |
| 152 | +AAPL,HAR-RV,5-Day RV,7.352626368473693e-07,0.0003564313290833214,0.7900387662546072,0.05628173634500624,14 | |
| 153 | +AAPL,GARCH_proxy,5-Day RV,2.191506499281001e-06,0.0007760029263791714,0.322303143580919,0.14739545264478385,14 | |
| 154 | +AAPL,IV_only,5-Day RV,2.972651791462555e-06,0.0008846392944043777,0.0137214386695774,220369.5076441046,9 | |
| 155 | +AAPL,IV_surface,5-Day RV,2.9889926076159353e-06,0.0009046715521333319,-0.16748410288630758,423047.901216318,9 | |
| 156 | +AAPL,HAR-RV + IV_surface,5-Day RV,6.786810950421792e-07,0.000343822045885652,0.7859917819890296,31041.995267065624,9 | |
| 157 | +ADBE,HAR-RV,5-Day RV,9.965221246099087e-07,0.0004772355638006304,0.7933280357994195,0.05320466224355669,14 | |
| 158 | +ADBE,GARCH_proxy,5-Day RV,2.9209793039692353e-06,0.0010816235164020026,0.37633952240827334,0.16006698061908678,14 | |
| 159 | +ADBE,IV_only,5-Day RV,6.8548161939394635e-06,0.0018253716335380507,0.031716484696030056,0.25589061894547627,4 | |
| 160 | +ADBE,IV_surface,5-Day RV,7.470956202697637e-06,0.0018434461269157439,-0.010984175192182477,0.2578633009352726,4 | |
| 161 | +ADBE,HAR-RV + IV_surface,5-Day RV,1.2572473462259706e-06,0.00061129270034895,0.8223537611944218,0.05171866751265447,4 | |
| 162 | +AMD,HAR-RV,5-Day RV,5.7161088671772834e-06,0.0011404404383289996,0.8268119063620464,0.027221439771585598,14 | |
| 163 | +AMD,GARCH_proxy,5-Day RV,1.8785020174153964e-05,0.0025593090639989915,0.3335633684361704,0.0973504444963841,14 | |
| 164 | +AMD,IV_only,5-Day RV,1.3003657762364721e-05,0.002254681306347529,-0.08468411839081152,2276481.478737907,4 | |
| 165 | +AMD,IV_surface,5-Day RV,1.2446787280973795e-05,0.0020755496684531916,0.06864013003123176,2592651.9743583687,4 | |
| 166 | +AMD,HAR-RV + IV_surface,5-Day RV,2.7552424490038036e-06,0.0007817700650705321,0.830899602116926,0.05438953050334867,4 | |
| 167 | +AMZN,HAR-RV,5-Day RV,2.1386474733261842e-06,0.0005787548528873838,0.778148504428241,0.06933803651177624,14 | |
| 168 | +AMZN,GARCH_proxy,5-Day RV,5.518138024715615e-06,0.0012827693322990685,0.3201097075189068,0.199428355830759,14 | |
| 169 | +AMZN,IV_only,5-Day RV,7.482631284389637e-06,0.0016177730974560993,0.09109592397463184,206334.25539451273,7 | |
| 170 | +AMZN,IV_surface,5-Day RV,8.021909155933475e-06,0.0017384434365917694,-0.0508966685530426,52930.83085214325,7 | |
| 171 | +AMZN,HAR-RV + IV_surface,5-Day RV,1.4922328079300458e-06,0.0005337621739155799,0.7310547954003022,275489.67197767727,7 | |
| 172 | +BA,HAR-RV,5-Day RV,8.694156161868652e-07,0.00041274088643389583,0.7887075035902814,0.03930286554838723,14 | |
| 173 | +BA,GARCH_proxy,5-Day RV,3.2173123351111613e-06,0.0009482941795367183,-0.011150520157321517,0.1339894265320223,14 | |
| 174 | +BA,IV_only,5-Day RV,7.210471024778675e-06,0.0016984550695910887,0.2111719847077227,44543.12970590831,6 | |
| 175 | +BA,IV_surface,5-Day RV,1.0392407805679447e-05,0.0019161640025165579,0.12761947777127178,97327.83336713957,6 | |
| 176 | +BA,HAR-RV + IV_surface,5-Day RV,9.148023855716353e-07,0.000530519024339968,0.8532167482801541,0.052190225398218826,6 | |
| 177 | +BAC,HAR-RV,5-Day RV,5.517674093489786e-07,0.0003152468299329301,0.7869746442462217,0.026897097734646595,14 | |
| 178 | +BAC,GARCH_proxy,5-Day RV,1.97755836764179e-06,0.0007418424564124993,0.2306519857775453,0.09543233262514574,14 | |
| 179 | +BAC,IV_only,5-Day RV,2.209116508776127e-06,0.0008785232484337065,0.32252181738173363,9888.739001296519,7 | |
| 180 | +BAC,IV_surface,5-Day RV,2.0815638004314376e-06,0.0009026940345946893,0.22727046666482148,287276.49898405955,7 | |
| 181 | +BAC,HAR-RV + IV_surface,5-Day RV,3.250890568360158e-07,0.0003142988684858508,0.8636085728878993,12391.959849590741,7 | |
| 182 | +CAT,HAR-RV,5-Day RV,8.938820455492177e-07,0.00038164775954198767,0.7388418692055928,0.04926763002929454,14 | |
| 183 | +CAT,GARCH_proxy,5-Day RV,2.595529673170563e-06,0.0008813255744195449,0.170632984358236,0.1603704741241216,14 | |
| 184 | +CAT,IV_only,5-Day RV,2.8364501740036943e-05,0.001248535815971279,-6.052579976232394,80018.24010844145,6 | |
| 185 | +CAT,IV_surface,5-Day RV,1.8708014991019552e-05,0.0012579027695629943,-3.332905186787118,89961.31752878259,6 | |
| 186 | +CAT,HAR-RV + IV_surface,5-Day RV,1.81392164250695e-06,0.0005583430317204897,0.6400231100897011,208744.91535686745,6 | |
| 187 | +COST,HAR-RV,5-Day RV,1.9746021266783987e-07,0.00021088317427734752,0.8033880706616197,0.041806140078589245,14 | |
| 188 | +COST,GARCH_proxy,5-Day RV,6.648199376640112e-07,0.0004903567816127541,0.3313456023063182,0.12933414540537122,14 | |
| 189 | +COST,IV_only,5-Day RV,8.832041978229808e-07,0.0005772068902119523,0.3613457950623786,0.14327632273117372,3 | |
| 190 | +COST,IV_surface,5-Day RV,8.458790324002253e-07,0.0005652837211161051,0.3766471653782566,0.13507928290944707,3 | |
| 191 | +COST,HAR-RV + IV_surface,5-Day RV,1.0886598793644769e-07,0.00019348806088446144,0.8932107515547943,0.024811553903409948,3 | |
| 192 | +CRM,HAR-RV,5-Day RV,9.891252507561125e-07,0.0005051645513362554,0.8083120888548717,0.0387924395407661,14 | |
| 193 | +CRM,GARCH_proxy,5-Day RV,2.995034557354953e-06,0.0011056056652523564,0.3801746671945256,0.12003509239976852,14 | |
| 194 | +CRM,IV_only,5-Day RV,3.895437520076448e-06,0.001377904574477203,0.23615347521994726,576703.3106982671,6 | |
| 195 | +CRM,IV_surface,5-Day RV,3.763968392492914e-06,0.0013898230542158333,0.251392404360061,707129.3033452727,6 | |
| 196 | +CRM,HAR-RV + IV_surface,5-Day RV,9.78505859966182e-07,0.0005724579517323965,0.7687558917552266,68027.0651965925,6 | |
| 197 | +CSCO,HAR-RV,5-Day RV,5.804121233101256e-07,0.0003508366559034911,0.7755298531474264,0.04518856089746765,14 | |
| 198 | +CSCO,GARCH_proxy,5-Day RV,1.7305695126036045e-06,0.0007812532709563023,0.351583127443191,0.1308073835495068,14 | |
| 199 | +CSCO,IV_only,5-Day RV,2.1168192673850967e-06,0.0009236873650458937,0.0650998410647209,358221.0374903252,6 | |
| 200 | +CSCO,IV_surface,5-Day RV,2.1712301350983996e-06,0.000959683495827607,0.09178672370045349,318516.8673852713,6 | |
| 201 | +CSCO,HAR-RV + IV_surface,5-Day RV,3.6053268630577923e-07,0.0003216876299614031,0.7944321610443784,0.05514701365708955,6 | |
| 202 | +CVX,HAR-RV,5-Day RV,4.030600401246923e-07,0.00026714463746531385,0.7905947293720966,0.03739111199575508,14 | |
| 203 | +CVX,GARCH_proxy,5-Day RV,1.3581979225843827e-06,0.0006359512403075412,0.00371917356578616,0.13864249530844358,14 | |
| 204 | +CVX,IV_only,5-Day RV,1.3155735643838804e-06,0.0007020543937024138,0.32739034635820474,360740.44261346606,5 | |
| 205 | +CVX,IV_surface,5-Day RV,1.3520563917793263e-06,0.0007281797946263777,0.20805719157602215,311531.69380475226,5 | |
| 206 | +CVX,HAR-RV + IV_surface,5-Day RV,3.5682092536461535e-07,0.0002732721285568394,0.751801485695329,21952.441541708344,5 | |
| 207 | +DIA,HAR-RV,5-Day RV,5.481592565461863e-08,8.073726599411081e-05,0.8253637793694957,0.03556646442806362,14 | |
| 208 | +DIA,GARCH_proxy,5-Day RV,1.7955217703915113e-07,0.00018381460201748648,0.1906560426916717,0.13522876463901598,14 | |
| 209 | +DIA,IV_only,5-Day RV,6.443087425660943e-07,0.0003012302661521477,0.10016009776824239,681397.1885474472,8 | |
| 210 | +DIA,IV_surface,5-Day RV,6.234930817434078e-07,0.0003056132244935978,-0.0964239878472758,155499.9638689339,8 | |
| 211 | +DIA,HAR-RV + IV_surface,5-Day RV,8.460087428822326e-08,0.00010516298050952097,0.837703482382736,16701.80736298935,8 | |
| 212 | +DIS,HAR-RV,5-Day RV,4.7016312877877743e-07,0.0002969416283096306,0.7794168081504058,0.039056759751171496,14 | |
| 213 | +DIS,GARCH_proxy,5-Day RV,1.4122229635310422e-06,0.0006534035136326282,0.26786631399999616,0.13265442395346336,14 | |
| 214 | +DIS,IV_only,5-Day RV,1.7791424684309133e-06,0.0007653358590640987,0.2649568632168751,137094.87604065597,6 | |
| 215 | +DIS,IV_surface,5-Day RV,1.8523661460842504e-06,0.0008035534714930895,0.21353408453403575,242658.3891827373,6 | |
| 216 | +DIS,HAR-RV + IV_surface,5-Day RV,4.2023300928651795e-07,0.00032116233882363614,0.8030797357746186,1718.0839161000365,6 | |
| 217 | +GLD,HAR-RV,5-Day RV,2.1450574493092668e-08,7.33993531309103e-05,0.8021986493717597,0.024313730407334252,14 | |
| 218 | +GLD,GARCH_proxy,5-Day RV,8.094211561580832e-08,0.0001695315639203958,0.18932763493331015,0.0885194744944194,14 | |
| 219 | +GLD,IV_only,5-Day RV,1.1721792500449579e-07,0.00019534509958113946,0.2673471347095352,56263.83055438049,10 | |
| 220 | +GLD,IV_surface,5-Day RV,1.1787220954062671e-07,0.0002011308895191688,0.243298006483124,37228.266825776096,10 | |
| 221 | +GLD,HAR-RV + IV_surface,5-Day RV,2.461804063049997e-08,8.130025646586977e-05,0.8267721276886244,5783.892138511381,10 | |
| 222 | +GOOG,HAR-RV,5-Day RV,6.652788257074675e-07,0.0003595981963384278,0.7868581942028351,0.05294556283775227,14 | |
| 223 | +GOOG,GARCH_proxy,5-Day RV,1.8198139696112773e-06,0.000785263516052603,0.3529278551306884,0.15789691215155668,14 | |
| 224 | +GOOG,IV_only,5-Day RV,2.973550849931066e-06,0.0010450304848481295,0.1629482877304827,1793.404545087964,7 | |
| 225 | +GOOG,IV_surface,5-Day RV,3.009047434210295e-06,0.0010800548978404918,0.18200971583688233,22292.761122859953,7 | |
| 226 | +GOOG,HAR-RV + IV_surface,5-Day RV,5.738810499508098e-07,0.0003708630534488825,0.8229349428297813,23695.682352432534,7 | |
| 227 | +GS,HAR-RV,5-Day RV,5.37527834068559e-07,0.0002814940716901892,0.764523646097614,0.033432591969509005,14 | |
| 228 | +GS,GARCH_proxy,5-Day RV,1.6974235232127378e-06,0.0006445294170048624,0.15127076897639125,0.11041790184606932,14 | |
| 229 | +GS,IV_only,5-Day RV,2.3234369661307164e-06,0.000892482072391805,0.2362004533211289,17704.180020184,5 | |
| 230 | +GS,IV_surface,5-Day RV,2.0506552141675174e-06,0.0008277144324776983,0.34129659671844825,0.1366303094964067,5 | |
| 231 | +GS,HAR-RV + IV_surface,5-Day RV,4.834214817233695e-07,0.00036982745306838514,0.7238055583823613,15063.088025176348,5 | |
| 232 | +HD,HAR-RV,5-Day RV,3.9083961919710173e-07,0.0002459338415295458,0.7737687141976377,0.04383714812578395,14 | |
| 233 | +HD,GARCH_proxy,5-Day RV,1.2982904451263336e-06,0.0005900850068558137,0.21272145121273495,0.14362552415566915,14 | |
| 234 | +HD,IV_only,5-Day RV,2.457537674283881e-06,0.0010577553468774715,-0.005904760810455804,44546.49143167363,6 | |
| 235 | +HD,IV_surface,5-Day RV,3.010285877222793e-06,0.001152585130906569,-0.2412099373798757,109743.95698525972,6 | |
| 236 | +HD,HAR-RV + IV_surface,5-Day RV,4.817689767286631e-07,0.0003595391003142053,0.796210478981321,0.06010129388602778,6 | |
| 237 | +HON,HAR-RV,5-Day RV,4.261246020464928e-07,0.0002779109772163332,0.7332229459551198,0.06460452126754306,14 | |
| 238 | +HON,GARCH_proxy,5-Day RV,1.2510610479693704e-06,0.0006287010970507017,0.12099221258832141,0.20355296752566793,14 | |
| 239 | +HON,IV_only,5-Day RV,1.6903367414920526e-06,0.0007037403574007149,0.057531194618750114,0.27092510702164035,2 | |
| 240 | +HON,IV_surface,5-Day RV,1.6391397531641857e-06,0.0007908866682887984,-0.0038016794704964774,0.2586374927617714,2 | |
| 241 | +HON,HAR-RV + IV_surface,5-Day RV,4.878574983852207e-07,0.0002941439708113563,0.7466666103682975,0.05141137809338309,2 | |
| 242 | +INTC,HAR-RV,5-Day RV,1.2984675100457855e-06,0.0005193666571668955,0.7730940665414208,0.04248066501512129,14 | |
| 243 | +INTC,GARCH_proxy,5-Day RV,3.8630721301570075e-06,0.0010904093157446603,0.2727363476595529,0.13237679013941592,14 | |
| 244 | +INTC,IV_only,5-Day RV,9.438726038600392e-06,0.002200428014950837,-0.09492450023149142,146047.54879924786,7 | |
| 245 | +INTC,IV_surface,5-Day RV,9.962308359704076e-06,0.002299543303516989,-0.0952032660362768,258001.4194027479,7 | |
| 246 | +INTC,HAR-RV + IV_surface,5-Day RV,1.6818777640122832e-06,0.0006879762146118074,0.8273087047030092,58429.80996430493,7 | |
| 247 | +IWM,HAR-RV,5-Day RV,2.0526722988067044e-07,0.00017659488203972316,0.7722282304894675,0.043393235956421604,14 | |
| 248 | +IWM,GARCH_proxy,5-Day RV,7.338339203590719e-07,0.00043628671456570715,0.04332239908178787,0.1517610307504978,14 | |
| 249 | +IWM,IV_only,5-Day RV,1.0706175840975176e-06,0.000480859828314238,0.3174993851934388,105771.21928506873,10 | |
| 250 | +IWM,IV_surface,5-Day RV,1.027797385394842e-06,0.0004859418814223389,0.29624678760436207,149677.07540512647,10 | |
| 251 | +IWM,HAR-RV + IV_surface,5-Day RV,2.638604937679466e-07,0.00020504349581577314,0.8037796517784992,33643.15336786203,10 | |
| 252 | +JPM,HAR-RV,5-Day RV,6.435705776301348e-07,0.0003056261695192844,0.7868655427373518,11921.299509583565,14 | |
| 253 | +JPM,GARCH_proxy,5-Day RV,2.0727105950617462e-06,0.000717192213105519,0.07870157395428969,0.17055927945201196,14 | |
| 254 | +JPM,IV_only,5-Day RV,3.7952326145074604e-06,0.0010280355150913756,0.21509040978286892,110231.78157590092,7 | |
| 255 | +JPM,IV_surface,5-Day RV,4.025172707877141e-06,0.001031053263123045,0.1935976983095554,129992.17162408424,7 | |
| 256 | +JPM,HAR-RV + IV_surface,5-Day RV,9.857401516008555e-07,0.000403835997909728,0.7905749227431985,169980.78343948355,7 | |
| 257 | +KO,HAR-RV,5-Day RV,1.461363314940565e-07,0.00015761053890852946,0.767564775836574,0.07332369031363127,14 | |
| 258 | +KO,GARCH_proxy,5-Day RV,5.001629312061652e-07,0.00036260153375111437,0.18412950220574348,0.14160511144756155,14 | |
| 259 | +KO,IV_only,5-Day RV,8.048970796935165e-07,0.000521859160274,0.06505706117567929,80800.1010241088,5 | |
| 260 | +KO,IV_surface,5-Day RV,8.94415665041427e-07,0.0005525671874387823,-0.031193527289363487,0.3348685090195581,5 | |
| 261 | +KO,HAR-RV + IV_surface,5-Day RV,2.0712847982089067e-07,0.00019396987655875893,0.687407611738718,48409.458600496655,5 | |
| 262 | +LLY,HAR-RV,5-Day RV,1.279038570383903e-06,0.0004542156879613442,0.727370903119082,0.07022249948553462,14 | |
| 263 | +LLY,GARCH_proxy,5-Day RV,3.94745507735754e-06,0.0009882536180285345,0.13968857594093856,0.20454213646613506,14 | |
| 264 | +LLY,IV_only,5-Day RV,0.15959931726671273,0.03184255036238546,-14055.218408320437,137578.48746503002,5 | |
| 265 | +LLY,IV_surface,5-Day RV,0.15670067410091199,0.03242830088323515,-13206.747982190911,145221.7208367806,5 | |
| 266 | +LLY,HAR-RV + IV_surface,5-Day RV,0.07809850236818974,0.022406586178045123,-6581.529984800183,145221.55528035003,5 | |
| 267 | +LMT,HAR-RV,5-Day RV,2.618822066935083e-07,0.00023441003841636183,0.7755119239183511,0.056419890910285264,14 | |
| 268 | +LMT,GARCH_proxy,5-Day RV,8.300749811258459e-07,0.0005034107500327826,0.20779079034624443,0.16123632630065038,14 | |
| 269 | +LMT,IV_only,5-Day RV,1.1909105137537888e-06,0.0007733798528024268,0.3111306945019623,0.19559490660048717,2 | |
| 270 | +LMT,IV_surface,5-Day RV,1.3406629533244885e-06,0.0007531527625302952,0.33444486383229843,36543.31044376663,2 | |
| 271 | +LMT,HAR-RV + IV_surface,5-Day RV,3.721441499521646e-07,0.0003112724627441179,0.8176316132294159,0.054760990277686286,2 | |
| 272 | +LOW,HAR-RV,5-Day RV,1.6175012702558308e-06,0.0004582016172375154,0.7438068447738484,0.07291442196019401,14 | |
| 273 | +LOW,GARCH_proxy,5-Day RV,4.937381256122117e-06,0.0010548124731288718,0.06343500134506505,0.22707772891244907,14 | |
| 274 | +LOW,IV_only,5-Day RV,1.3722460830014217e-05,0.0016881782033060912,-0.0347993203764753,3414702.4339133594,3 | |
| 275 | +LOW,IV_surface,5-Day RV,1.181105307621006e-05,0.0017269694991037651,0.031070660532588185,1220750.188895697,3 | |
| 276 | +LOW,HAR-RV + IV_surface,5-Day RV,3.363680328452487e-06,0.0006549154654958383,0.8193335639653495,0.059609987283031886,3 | |
| 277 | +MA,HAR-RV,5-Day RV,5.254138821945239e-07,0.00029270375750087383,0.7775281066169161,0.04957594311171103,14 | |
| 278 | +MA,GARCH_proxy,5-Day RV,1.7210693007836424e-06,0.0006869148441160236,0.15634007063256372,0.15812425743660927,14 | |
| 279 | +MA,IV_only,5-Day RV,2.613743499950329e-06,0.0007988964733316241,0.36471427651913146,293782.35389877285,4 | |
| 280 | +MA,IV_surface,5-Day RV,2.6443352235415715e-06,0.0008157806408660028,0.3349458492762105,474060.3778988852,4 | |
| 281 | +MA,HAR-RV + IV_surface,5-Day RV,6.536860475706633e-07,0.0003075215382943214,0.8397256416669174,6146.247946147566,4 | |
| 282 | +MCD,HAR-RV,5-Day RV,2.8700376714937857e-07,0.00019274100007430698,0.7629636059650683,0.05191726245140444,14 | |
| 283 | +MCD,GARCH_proxy,5-Day RV,9.201484126225757e-07,0.00043797106717262727,0.2021723557349256,0.15876709097474337,14 | |
| 284 | +MCD,IV_only,5-Day RV,1.9916100158128494e-06,0.0006904291580859745,-0.6331170344829751,31368.677081914902,5 | |
| 285 | +MCD,IV_surface,5-Day RV,1.9443629629575827e-06,0.0006966108461171972,-1.1547191264212062,57062.82403095045,5 | |
| 286 | +MCD,HAR-RV + IV_surface,5-Day RV,3.351348811132088e-07,0.00022888442756863675,0.6101250006838776,14632.308782504824,5 | |
| 287 | +MRK,HAR-RV,5-Day RV,4.394512043311315e-07,0.00028236477535023905,0.7425902640649039,0.04219207029899978,14 | |
| 288 | +MRK,GARCH_proxy,5-Day RV,1.3140974668919869e-06,0.0006123220936928955,0.13889335229791552,0.13628489797414858,14 | |
| 289 | +MRK,IV_only,5-Day RV,2.1117804293897888e-06,0.0009234962846928933,-0.08500173819119598,235250.52718629665,6 | |
| 290 | +MRK,IV_surface,5-Day RV,2.478640271226877e-06,0.000972845723007149,-0.5114198820686501,59366.277461397105,6 | |
| 291 | +MRK,HAR-RV + IV_surface,5-Day RV,4.480046739599881e-07,0.000324809593178208,0.7682919671726162,45254.682971393406,6 | |
| 292 | +MSFT,HAR-RV,5-Day RV,4.2492370145989585e-07,0.00030474786834290064,0.791625307440486,0.04301515139433065,14 | |
| 293 | +MSFT,GARCH_proxy,5-Day RV,1.2796514986318381e-06,0.0006681866389437704,0.26472012146109575,0.12453346124134305,14 | |
| 294 | +MSFT,IV_only,5-Day RV,1.821133757879691e-06,0.0008581835858700235,0.2844708548639855,1585.8844445077311,8 | |
| 295 | +MSFT,IV_surface,5-Day RV,1.8759395488037023e-06,0.0009006994341787176,0.24735208101831266,0.21156961264507212,8 | |
| 296 | +MSFT,HAR-RV + IV_surface,5-Day RV,4.962412557759788e-07,0.00035131934253917357,0.7505468226094971,37859.32694451409,8 | |
| 297 | +NVDA,HAR-RV,5-Day RV,2.5434838856007668e-06,0.0007824487947657085,0.8090715031993198,0.040704217230748505,14 | |
| 298 | +NVDA,GARCH_proxy,5-Day RV,8.239755158319784e-06,0.0018213828914256075,0.32994157481814196,0.13587518552748418,14 | |
| 299 | +NVDA,IV_only,5-Day RV,1.540580904175584e-05,0.0026325431323118175,-0.4448463612972839,8861.379699332558,6 | |
| 300 | +NVDA,IV_surface,5-Day RV,1.4570855048055552e-05,0.002533691378670197,-0.29475399603646696,180094.53474446616,6 | |
| 301 | +NVDA,HAR-RV + IV_surface,5-Day RV,2.1151240053101204e-06,0.0007937287981988871,0.849595780491038,0.03545141938295454,6 | |
added
results/rq3_crisis_analysis.csv
+10 −0
@@ -0,0 +1,10 @@ | ||
| 1 | +crisis,pre_impl_corr,pre_real_corr,pre_divergence,post_impl_corr,post_real_corr,post_divergence,divergence_change,pre_vix,post_vix | |
| 2 | +Flash Crash (2010-05-06),0.22274111823476653,,,0.40397480335090574,,,,17.73,28.119999999999997 | |
| 3 | +Euro Crisis (2011-08-05),0.31293397535822115,,,0.46846842965311036,,,,20.291999999999998,40.282000000000004 | |
| 4 | +China Deval (2015-08-24),0.23087948366373237,,,0.4890957081112426,,,,14.306000000000001,30.64375 | |
| 5 | +Volmageddon (2018-02-05),0.1083633365548244,0.2567523415953064,-0.148389005040482,0.4358218572107293,0.637937595963062,-0.20211573875233266,-0.05372673371185066,11.880526315789474,28.423750000000002 | |
| 6 | +COVID Crash (2020-03-16),0.4727631016226523,0.6110824551214713,-0.13831935349881896,0.6477989549594869,0.7878468351540882,-0.14004788019460124,-0.0017285266957822731,36.54263157894737,70.0375 | |
| 7 | +Meme Stocks (2021-01-27),0.22745918696370868,0.15975554962271596,0.06770363734099269,0.32597068609412533,0.348543166049957,-0.022572479955831656,-0.09027611729682435,23.154,27.7325 | |
| 8 | +Rate Shock (2022-06-13),0.4167670557527853,0.5528973786248663,-0.136130322872081,0.4471984750633315,0.61018100703949,-0.16298253197615856,-0.026852209104077568,26.90052631578947,31.364285714285717 | |
| 9 | +SVB Crisis (2023-03-10),0.32789031448814016,0.32730777484729134,0.000582539640848871,0.37294088094818356,0.370926888173291,0.0020139927748925126,0.0014314531340436417,20.32095238095238,24.948333333333334 | |
| 10 | +Aug VIX Spike (2024-08-05),0.1381696258025622,0.09255988497489984,0.04560974082766236,0.3160409800406513,0.2599876813373995,0.056053298703251805,0.010443557875589447,15.574999999999998,24.16375 | |
added
results/rq3_stress_prediction.csv
+22 −0
@@ -0,0 +1,22 @@ | ||
| 1 | +horizon,variable,coefficient,t_stat,significant | |
| 2 | +5d,const,0.3563958165728076,42.153869884264445,True | |
| 3 | +5d,corr_divergence,0.004908223399681173,2.025856619774201e-08,False | |
| 4 | +5d,corr_ratio,0.06035655562155618,4.067778964895136,True | |
| 5 | +5d,implied_corr,0.05217631820038249,7.72473250953712e-07,False | |
| 6 | +5d,realized_corr,0.0317140943480606,1.2688785340947962e-07,False | |
| 7 | +5d,spx_iv_atm,-0.13133409436416282,-2.229995593085423,True | |
| 8 | +5d,vix_close,0.2779692995961029,5.2707128272038855,True | |
| 9 | +10d,const,0.49294639258363476,53.36597415904335,True | |
| 10 | +10d,corr_divergence,-0.019748186701119122,-4.4803544044767844e-08,False | |
| 11 | +10d,corr_ratio,0.10366631011029162,8.302889118164122,True | |
| 12 | +10d,implied_corr,0.02499247918758651,5.8031538513620276e-08,False | |
| 13 | +10d,realized_corr,0.03170980489219221,5.0734457372276724e-08,False | |
| 14 | +10d,spx_iv_atm,-0.2326570646182706,-4.066182728131753,True | |
| 15 | +10d,vix_close,0.3521955352125285,6.686486816330109,True | |
| 16 | +20d,const,0.6928369081343593,78.08179646066122,True | |
| 17 | +20d,corr_divergence,0.005557692583213242,6.233548052167061e-09,False | |
| 18 | +20d,corr_ratio,0.04382202623839836,3.9133743993480903,True | |
| 19 | +20d,implied_corr,0.013266439474072099,1.7136659225831048e-08,False | |
| 20 | +20d,realized_corr,0.004849095978245041,3.990515788667912e-09,False | |
| 21 | +20d,spx_iv_atm,-0.361901881404913,-7.298945452616478,True | |
| 22 | +20d,vix_close,0.44873143574017266,9.555520074781297,True | |
added
results/rq4_greeks_decay.csv
+13 −0
@@ -0,0 +1,13 @@ | ||
| 1 | +dte_bucket,target,r_squared,n_obs,n_significant,gamma_t,vega_t,theta_t,iv_t | |
| 2 | +01_1w,Return,2.0533571869485456e-05,34660,5,3.0887721371669943,-2.0889806610760924,-3.684407158025477,-0.13264027833631895 | |
| 3 | +01_1w,RV,0.03765774374751629,34660,3,-1.1249786535728212,-1.7614034500313624,-6.252093490870679,33.118923449268 | |
| 4 | +02_2w,Return,0.0003363912137548386,31912,6,-156.94078976483442,127.98342763288508,153.45274029269328,1.9797508304047773 | |
| 5 | +02_2w,RV,0.06697426191782552,31912,6,9.815481362165443,-12.943904057242882,-7.050060806110226,31.76191558898822 | |
| 6 | +03_1m,Return,0.00023794833820889316,33715,0,-2.7716935237816593e-06,7.05770356459166e-06,1.780878957949652e-06,1.8652077971398724 | |
| 7 | +03_1m,RV,0.06851384048805065,33715,1,-6.8919723813693766e-06,9.59182393720008e-07,-1.7915684155233385e-06,32.034662964663575 | |
| 8 | +04_2m,Return,0.00046586699619022287,36449,6,7.79963105388653,-126.93300309779232,62.009544432787145,2.550749950663104 | |
| 9 | +04_2m,RV,0.07524138690040005,36449,5,-52.98678967431732,2.0907804386033297,0.6422085258212287,34.001115474871746 | |
| 10 | +05_3m,Return,0.0016994115118111885,31354,3,1.870238629286599e-05,-0.0006357244112917797,1.5189987503513099e-05,2.2804548385541303 | |
| 11 | +05_3m,RV,0.09470403565711705,31354,2,2.8653130795446588e-05,-0.0012026642542147493,2.2766898124875504e-05,35.14205904841721 | |
| 12 | +06_6m,Return,0.0004410468541744539,36719,5,-42.831709256151605,42.83170925615252,42.83170925615319,2.041608634479025 | |
| 13 | +06_6m,RV,0.0818206346918886,36719,6,-31.596190195553422,31.596190195550946,31.596190195553735,35.910992081174044 | |
added
results/rq4_price_magnet.csv
+6 −0
@@ -0,0 +1,6 @@ | ||
| 1 | +oi_conc_quintile,pct_moved_toward,avg_dist_open,avg_dist_close,n_obs | |
| 2 | +Q1_Low,0.4728,0.0407,0.0424,2096 | |
| 3 | +Q2,0.4804,0.0398,0.0416,2096 | |
| 4 | +Q3,0.458,0.0413,0.0434,2096 | |
| 5 | +Q4,0.4614,0.0372,0.0387,2096 | |
| 6 | +Q5_High,0.4781,0.0333,0.0341,2096 | |
added
results/rq5_feature_importance.csv
+25 −0
@@ -0,0 +1,25 @@ | ||
| 1 | +feature,importance | |
| 2 | +iv_atm_2w,0.5076489891440703 | |
| 3 | +iv_atm_1w,0.15066956468143466 | |
| 4 | +total_volume,0.08251128542024651 | |
| 5 | +pc_vol_ratio,0.06696765769403976 | |
| 6 | +net_gamma,0.037373960459984756 | |
| 7 | +iv_atm_1m,0.023469101481042982 | |
| 8 | +rv_w,0.022214537022989124 | |
| 9 | +skew_25d_3m,0.013182394481508609 | |
| 10 | +avg_theta,0.0120763385838419 | |
| 11 | +iv_atm_2m,0.011347948800054228 | |
| 12 | +avg_spread_pct,0.007789293233217772 | |
| 13 | +ts_slope_6m_1m,0.007254537287190107 | |
| 14 | +skew_25d_1m,0.007015074364753732 | |
| 15 | +skew_10d_1m,0.006185359097790001 | |
| 16 | +rv_m,0.006161389218495476 | |
| 17 | +pc_oi_ratio,0.006005510738973598 | |
| 18 | +rv_lag1,0.005495134792687054 | |
| 19 | +total_gamma_oi,0.005383046724753157 | |
| 20 | +butterfly_1m,0.0051734148672489535 | |
| 21 | +ts_slope_3m_1m,0.004110741926591565 | |
| 22 | +iv_atm_3m,0.003516893897630767 | |
| 23 | +total_oi,0.003112140104194631 | |
| 24 | +iv_atm_6m,0.0029516562318988087 | |
| 25 | +total_vega_oi,0.0023840297453613882 | |
added
results/rq5_model_comparison.csv
+19 −0
@@ -0,0 +1,19 @@ | ||
| 1 | +Model,Target,MSE,MAE,R²_OOS | |
| 2 | +VIX (benchmark),1-Day RV,1.8354898166915323e-07,0.0001370566676679575,0.33548317946986683 | |
| 3 | +OLS: HAR-RV,1-Day RV,1.556101069980116e-07,0.00010183008727700095,0.43663248575761193 | |
| 4 | +OLS: IV Surface,1-Day RV,1.4123296316726837e+60,2.1223946042564297e+29,-5.113168091944531e+66 | |
| 5 | +OLS: HAR + IV Surface,1-Day RV,1.1295446635072303e+60,1.898059407933492e+29,-4.089379421311973e+66 | |
| 6 | +Random Forest,1-Day RV,2.3678047921607625e-07,0.00011479149396503862,0.14276500048427565 | |
| 7 | +Gradient Boosting,1-Day RV,2.500662530462015e-07,0.00012818487544666185,0.09466546812189591 | |
| 8 | +VIX (benchmark),5-Day RV,1.8870322389877113e-06,0.0005425211878621192,0.5974104438292482 | |
| 9 | +OLS: HAR-RV,5-Day RV,2.452162286605996e-07,0.00014312074057870415,0.947684257522121 | |
| 10 | +OLS: IV Surface,5-Day RV,7.364371760134164e+60,4.8464746934267545e+29,-1.5711544811652463e+66 | |
| 11 | +OLS: HAR + IV Surface,5-Day RV,2.6814852401530494e+60,2.9244607891348172e+29,-5.72082410892328e+65 | |
| 12 | +Random Forest,5-Day RV,3.160463899461795e-06,0.0002967220076842,0.32572971871399325 | |
| 13 | +Gradient Boosting,5-Day RV,3.0657517724840487e-06,0.0003145214263699527,0.3459361107279493 | |
| 14 | +VIX (benchmark),22-Day RV,2.111080782413802e-05,0.002160767281830546,0.6178591079440243 | |
| 15 | +OLS: HAR-RV,22-Day RV,3.518034908471207e-07,0.0001708624021174313,0.9936317690473688 | |
| 16 | +OLS: IV Surface,22-Day RV,6.077728481906348e+18,292924364.5428955,-1.1001703975980064e+23 | |
| 17 | +OLS: HAR + IV Surface,22-Day RV,1.2399527460097137e+60,1.988660578447203e+29,-2.2445216327800854e+64 | |
| 18 | +Random Forest,22-Day RV,3.7075071131017465e-05,0.0010244326639557342,0.3288792701316602 | |
| 19 | +Gradient Boosting,22-Day RV,3.586097345936983e-05,0.0010316730008989516,0.35085646641668466 | |
added
results/subperiod_results.csv
+37 −0
@@ -0,0 +1,37 @@ | ||
| 1 | +label,n_obs,r2,adj_r2,n_significant,subperiod,horizon,model | |
| 2 | +Pre-GFC Recovery (2010-2012)|1D,8565,0.004552905202339419,0.0033891840253489347,2,Pre-GFC Recovery (2010-2012),1D, | |
| 3 | +Pre-GFC Recovery (2010-2012)|5D,8565,0.030907361593650817,0.02977444992845757,7,Pre-GFC Recovery (2010-2012),5D, | |
| 4 | +Bull Market (2013-2016)|1D,25950,0.0045850351632718,0.004201282911898585,3,Bull Market (2013-2016),1D, | |
| 5 | +Bull Market (2013-2016)|5D,25950,0.07544053819778163,0.0750841021509786,10,Bull Market (2013-2016),5D, | |
| 6 | +Low Vol Era (2017-2018)|1D,16271,0.0015128231993405405,0.0008987474448506338,0,Low Vol Era (2017-2018),1D, | |
| 7 | +Low Vol Era (2017-2018)|5D,16271,0.13619124336696764,0.13565999566916143,9,Low Vol Era (2017-2018),5D, | |
| 8 | +Pre-COVID (2019)|1D,8374,0.003227085308238342,0.0020352009190337528,0,Pre-COVID (2019),1D, | |
| 9 | +Pre-COVID (2019)|5D,8374,0.07974443561365019,0.07864404632226385,6,Pre-COVID (2019),5D, | |
| 10 | +COVID Period (2020)|1D,8892,0.01785829262057237,0.016752401721597754,5,COVID Period (2020),1D, | |
| 11 | +COVID Period (2020)|5D,8892,0.14443680510427104,0.14347344152483654,9,COVID Period (2020),5D, | |
| 12 | +Post-COVID Bull (2021)|1D,9734,0.007536697510129753,0.006515959772302016,3,Post-COVID Bull (2021),1D, | |
| 13 | +Post-COVID Bull (2021)|5D,9734,0.035705411752916194,0.0347136452320409,8,Post-COVID Bull (2021),5D, | |
| 14 | +Rate Hiking (2022)|1D,10068,0.010037764943731542,0.009053413511837083,7,Rate Hiking (2022),1D, | |
| 15 | +Rate Hiking (2022)|5D,10068,0.0842917499691005,0.08338123167335532,10,Rate Hiking (2022),5D, | |
| 16 | +Recovery (2023-2024)|1D,20396,0.005715442722233122,0.005227689689474846,4,Recovery (2023-2024),1D, | |
| 17 | +Recovery (2023-2024)|5D,20396,0.051809404910611034,0.051344263583611105,8,Recovery (2023-2024),5D, | |
| 18 | +Recent (2025)|1D,10831,0.007011355136322672,0.006093620714082704,5,Recent (2025),1D, | |
| 19 | +Recent (2025)|5D,10831,0.03748861736517284,0.03659905046809819,7,Recent (2025),5D, | |
| 20 | +Pre-GFC Recovery (2010-2012)|HAR-RV,46284,0.3437582713844408,0.34371573194654437,3,Pre-GFC Recovery (2010-2012),,HAR-RV | |
| 21 | +Pre-GFC Recovery (2010-2012)|HAR+IV,8566,0.39209536492927854,0.39152703057371396,5,Pre-GFC Recovery (2010-2012),,HAR+IV | |
| 22 | +Bull Market (2013-2016)|HAR-RV,64469,0.3416382129845429,0.34160757488074944,3,Bull Market (2013-2016),,HAR-RV | |
| 23 | +Bull Market (2013-2016)|HAR+IV,25950,0.33604997367760203,0.3358452167210245,5,Bull Market (2013-2016),,HAR+IV | |
| 24 | +Low Vol Era (2017-2018)|HAR-RV,33220,0.3094019493581206,0.3093395759792693,3,Low Vol Era (2017-2018),,HAR-RV | |
| 25 | +Low Vol Era (2017-2018)|HAR+IV,16273,0.4191842780751921,0.41889858416376824,6,Low Vol Era (2017-2018),,HAR+IV | |
| 26 | +Pre-COVID (2019)|HAR-RV,16882,0.2795077235062906,0.279379658757536,3,Pre-COVID (2019),,HAR-RV | |
| 27 | +Pre-COVID (2019)|HAR+IV,8376,0.3632548270691244,0.3626460113187423,4,Pre-COVID (2019),,HAR+IV | |
| 28 | +COVID Period (2020)|HAR-RV,17125,0.6038433566127657,0.6037739406948777,3,COVID Period (2020),,HAR-RV | |
| 29 | +COVID Period (2020)|HAR+IV,8892,0.7209268159687201,0.7206754835953946,8,COVID Period (2020),,HAR+IV | |
| 30 | +Post-COVID Bull (2021)|HAR-RV,17254,0.37617226183833463,0.3760637700577847,3,Post-COVID Bull (2021),,HAR-RV | |
| 31 | +Post-COVID Bull (2021)|HAR+IV,9737,0.43962411547853397,0.4391632800471841,5,Post-COVID Bull (2021),,HAR+IV | |
| 32 | +Rate Hiking (2022)|HAR-RV,17229,0.3865626087872044,0.3864557691835099,3,Rate Hiking (2022),,HAR-RV | |
| 33 | +Rate Hiking (2022)|HAR+IV,10070,0.4708060118276649,0.47038522344625366,6,Rate Hiking (2022),,HAR+IV | |
| 34 | +Recovery (2023-2024)|HAR-RV,34632,0.29036963810700844,0.2903081592146185,3,Recovery (2023-2024),,HAR-RV | |
| 35 | +Recovery (2023-2024)|HAR+IV,20398,0.3901717390276379,0.38993246166789597,7,Recovery (2023-2024),,HAR+IV | |
| 36 | +Recent (2025)|HAR-RV,17250,0.3208273099604191,0.3207091655750475,3,Recent (2025),,HAR-RV | |
| 37 | +Recent (2025)|HAR+IV,10831,0.4019013811251536,0.40145924575729197,5,Recent (2025),,HAR+IV | |
added
results/transaction_cost_analysis.csv
+8 −0
@@ -0,0 +1,8 @@ | ||
| 1 | +tc_bps,net_daily_bps,net_ann_ret_pct,net_sharpe | |
| 2 | +0,-19.064391466831974,-9.913483562752628,-0.52712918488719 | |
| 3 | +5,-21.064391466831974,-10.953483562752627,-0.5824290548887353 | |
| 4 | +10,-23.064391466831978,-11.993483562752628,-0.6377289248902807 | |
| 5 | +15,-25.064391466831978,-13.033483562752629,-0.6930287948918262 | |
| 6 | +20,-27.064391466831974,-14.073483562752626,-0.7483286648933715 | |
| 7 | +30,-31.064391466831974,-16.153483562752626,-0.8589284048964624 | |
| 8 | +50,-39.06439146683198,-20.31348356275263,-1.080127884902644 | |
added
results/var_results.csv
+21 −0
@@ -0,0 +1,21 @@ | ||
| 1 | +ticker,r2_iv_eq,r2_rv_eq,n_obs | |
| 2 | +AAPL,0.9196697728623443,0.35191523639253475,3791 | |
| 3 | +ADBE,0.9199919322527133,0.2796434984309628,3376 | |
| 4 | +AMD,0.8993426594070298,0.32790010831716765,3121 | |
| 5 | +AMZN,0.9266448716789508,0.29023317507392565,3773 | |
| 6 | +BA,0.9752839777543116,0.5379390149229806,3702 | |
| 7 | +BAC,0.9439422732095171,0.5419728354375741,3589 | |
| 8 | +CAT,0.9322674755937141,0.3391903996354383,3693 | |
| 9 | +COST,0.9236283123223755,0.3303127801972263,3548 | |
| 10 | +CRM,0.9275025960540634,0.34138677652494875,3714 | |
| 11 | +CSCO,0.9188095514942977,0.3446222492742932,3565 | |
| 12 | +CVX,0.95744357083379,0.5152052411228472,3494 | |
| 13 | +DIA,0.9363978123307808,0.6159261384057868,3831 | |
| 14 | +DIS,0.945656936116281,0.41559322669554644,3685 | |
| 15 | +GLD,0.9500296482231443,0.40124370857044045,3867 | |
| 16 | +GOOG,0.9298779671849265,0.28195713606770256,3792 | |
| 17 | +GS,0.9371875423392613,0.487147325272134,3737 | |
| 18 | +HD,0.9297070407254776,0.387656965645227,3629 | |
| 19 | +HON,0.935625284277047,0.3623313109259484,3071 | |
| 20 | +INTC,0.9668636911810091,0.34895373467106183,3609 | |
| 21 | +IWM,0.950535736607303,0.45305306825768055,3872 | |
added
scripts/01_extract_data.py
+259 −0
@@ -0,0 +1,259 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 01 — Data extraction pipeline (raw → processed). | |
| 7 | + | |
| 8 | +Extracts option-implied surface features and 5-minute realized volatility | |
| 9 | +from the raw DuckDB stores, then merges them into the master analysis panel. | |
| 10 | + | |
| 11 | +Inputs (raw, external — see data/raw/README.md): | |
| 12 | + options.duckdb, stock_5min.duckdb, etf_5min.duckdb, index_5min.duckdb | |
| 13 | + | |
| 14 | +Outputs (data/processed/): | |
| 15 | + options_features.parquet, realized_vol.parquet, merged_options_rv.parquet | |
| 16 | + | |
| 17 | +This step is the only producer of the processed datasets; every other script | |
| 18 | +runs from its outputs. If the raw stores are unavailable the script exits | |
| 19 | +with a clear message and the shipped parquets remain authoritative. | |
| 20 | +""" | |
| 21 | + | |
| 22 | +import sys | |
| 23 | +import warnings | |
| 24 | + | |
| 25 | +import pandas as pd | |
| 26 | + | |
| 27 | +import _bootstrap # noqa: F401 | |
| 28 | +from wp7 import config | |
| 29 | +from wp7.data_io import RawDataUnavailableError, open_raw_db, raw_db_path | |
| 30 | + | |
| 31 | +warnings.filterwarnings('ignore') | |
| 32 | + | |
| 33 | + | |
| 34 | +# -------------------------------------------------------------------------- | |
| 35 | +# 1A. Option-surface features per ticker per day | |
| 36 | +# -------------------------------------------------------------------------- | |
| 37 | +def extract_options_features(con, tickers, batch_label=""): | |
| 38 | + """Aggregate the daily option chain into ten implied-moment features.""" | |
| 39 | + ticker_str = ",".join([f"'{t}'" for t in tickers]) | |
| 40 | + query = f""" | |
| 41 | + WITH base AS ( | |
| 42 | + SELECT ticker, trade_date, strike, expiry_date, call_put, | |
| 43 | + bid_price, ask_price, bid_iv, ask_iv, | |
| 44 | + open_interest, volume, delta, gamma, vega, theta, rho, | |
| 45 | + (expiry_date - trade_date) AS dte, | |
| 46 | + (bid_price + ask_price) / 2.0 AS mid_price, | |
| 47 | + CASE WHEN bid_iv > 0 AND ask_iv > 0 THEN (bid_iv + ask_iv) / 2.0 | |
| 48 | + WHEN ask_iv > 0 THEN ask_iv | |
| 49 | + ELSE bid_iv END AS mid_iv | |
| 50 | + FROM option_chain | |
| 51 | + WHERE ticker IN ({ticker_str}) | |
| 52 | + AND (expiry_date - trade_date) BETWEEN 7 AND 180 | |
| 53 | + AND ask_price > 0 | |
| 54 | + ) | |
| 55 | + SELECT | |
| 56 | + ticker, | |
| 57 | + trade_date, | |
| 58 | + | |
| 59 | + -- Implied Volatility: ATM (|delta| closest to 0.5) | |
| 60 | + AVG(CASE WHEN call_put='c' AND ABS(delta - 0.5) < 0.1 AND dte BETWEEN 20 AND 40 | |
| 61 | + THEN mid_iv END) AS iv_atm_30d, | |
| 62 | + AVG(CASE WHEN call_put='c' AND ABS(delta - 0.5) < 0.1 AND dte BETWEEN 80 AND 100 | |
| 63 | + THEN mid_iv END) AS iv_atm_90d, | |
| 64 | + | |
| 65 | + -- IV Term Structure slope (90d - 30d) | |
| 66 | + AVG(CASE WHEN call_put='c' AND ABS(delta - 0.5) < 0.1 AND dte BETWEEN 80 AND 100 | |
| 67 | + THEN mid_iv END) - | |
| 68 | + AVG(CASE WHEN call_put='c' AND ABS(delta - 0.5) < 0.1 AND dte BETWEEN 20 AND 40 | |
| 69 | + THEN mid_iv END) AS iv_term_slope, | |
| 70 | + | |
| 71 | + -- Volatility Skew (25d put IV - 25d call IV, ~30d expiry) | |
| 72 | + AVG(CASE WHEN call_put='p' AND ABS(delta + 0.25) < 0.07 AND dte BETWEEN 20 AND 40 | |
| 73 | + THEN mid_iv END) - | |
| 74 | + AVG(CASE WHEN call_put='c' AND ABS(delta - 0.25) < 0.07 AND dte BETWEEN 20 AND 40 | |
| 75 | + THEN mid_iv END) AS iv_skew_25d, | |
| 76 | + | |
| 77 | + -- Implied Skewness proxy (OTM put IV - OTM call IV normalized by ATM) | |
| 78 | + (AVG(CASE WHEN call_put='p' AND ABS(delta + 0.10) < 0.05 AND dte BETWEEN 20 AND 40 | |
| 79 | + THEN mid_iv END) - | |
| 80 | + AVG(CASE WHEN call_put='c' AND ABS(delta - 0.10) < 0.05 AND dte BETWEEN 20 AND 40 | |
| 81 | + THEN mid_iv END)) / | |
| 82 | + NULLIF(AVG(CASE WHEN call_put='c' AND ABS(delta - 0.5) < 0.1 AND dte BETWEEN 20 AND 40 | |
| 83 | + THEN mid_iv END), 0) AS implied_skewness, | |
| 84 | + | |
| 85 | + -- Implied Kurtosis proxy (wing IV avg / ATM IV) | |
| 86 | + (AVG(CASE WHEN ABS(delta) < 0.15 AND ABS(delta) > 0.03 AND dte BETWEEN 20 AND 40 | |
| 87 | + THEN mid_iv END)) / | |
| 88 | + NULLIF(AVG(CASE WHEN call_put='c' AND ABS(delta - 0.5) < 0.1 AND dte BETWEEN 20 AND 40 | |
| 89 | + THEN mid_iv END), 0) AS implied_kurtosis_proxy, | |
| 90 | + | |
| 91 | + -- Put-Call Volume Ratio | |
| 92 | + SUM(CASE WHEN call_put='p' THEN volume ELSE 0 END)::DOUBLE / | |
| 93 | + NULLIF(SUM(CASE WHEN call_put='c' THEN volume ELSE 0 END), 0) AS pc_volume_ratio, | |
| 94 | + | |
| 95 | + -- Put-Call OI Ratio | |
| 96 | + SUM(CASE WHEN call_put='p' THEN open_interest ELSE 0 END)::DOUBLE / | |
| 97 | + NULLIF(SUM(CASE WHEN call_put='c' THEN open_interest ELSE 0 END), 0) AS pc_oi_ratio, | |
| 98 | + | |
| 99 | + -- Aggregate Greeks | |
| 100 | + SUM(CASE WHEN call_put='c' THEN gamma * open_interest ELSE 0 END) - | |
| 101 | + SUM(CASE WHEN call_put='p' THEN gamma * open_interest ELSE 0 END) AS net_gamma_exposure, | |
| 102 | + | |
| 103 | + AVG(CASE WHEN dte BETWEEN 20 AND 40 THEN vega END) AS avg_vega_30d, | |
| 104 | + AVG(CASE WHEN dte BETWEEN 20 AND 40 THEN theta END) AS avg_theta_30d, | |
| 105 | + | |
| 106 | + -- Total volume and OI | |
| 107 | + SUM(volume) AS total_option_volume, | |
| 108 | + SUM(open_interest) AS total_oi, | |
| 109 | + | |
| 110 | + -- Max OI strike (price magnet proxy) | |
| 111 | + (SELECT b2.strike FROM base b2 | |
| 112 | + WHERE b2.ticker = base.ticker AND b2.trade_date = base.trade_date | |
| 113 | + GROUP BY b2.strike ORDER BY SUM(b2.open_interest) DESC LIMIT 1) AS max_oi_strike | |
| 114 | + | |
| 115 | + FROM base | |
| 116 | + GROUP BY ticker, trade_date | |
| 117 | + HAVING COUNT(*) >= 10 | |
| 118 | + ORDER BY ticker, trade_date | |
| 119 | + """ | |
| 120 | + print(f" Extracting options features for {batch_label} ({len(tickers)} tickers)...") | |
| 121 | + df = con.execute(query).fetchdf() | |
| 122 | + print(f" -> {len(df):,} rows extracted") | |
| 123 | + return df | |
| 124 | + | |
| 125 | + | |
| 126 | +# -------------------------------------------------------------------------- | |
| 127 | +# 1B. Realized volatility from 5-minute OHLCV | |
| 128 | +# -------------------------------------------------------------------------- | |
| 129 | +def compute_realized_vol(db_name, table_name, id_col, tickers, label=""): | |
| 130 | + """Daily realized variance, skewness and kurtosis from 5-minute bars.""" | |
| 131 | + ticker_str = ",".join([f"'{t}'" for t in tickers]) | |
| 132 | + con = open_raw_db(db_name) | |
| 133 | + | |
| 134 | + query = f""" | |
| 135 | + WITH bars AS ( | |
| 136 | + SELECT {id_col} AS ticker, | |
| 137 | + CAST(datetime AS DATE) AS trade_date, | |
| 138 | + datetime, | |
| 139 | + close, | |
| 140 | + LAG(close) OVER (PARTITION BY {id_col} ORDER BY datetime) AS prev_close | |
| 141 | + FROM {table_name} | |
| 142 | + WHERE {id_col} IN ({ticker_str}) | |
| 143 | + ), | |
| 144 | + returns AS ( | |
| 145 | + SELECT ticker, trade_date, datetime, | |
| 146 | + LN(close / NULLIF(prev_close, 0)) AS log_ret | |
| 147 | + FROM bars | |
| 148 | + WHERE prev_close IS NOT NULL AND prev_close > 0 AND close > 0 | |
| 149 | + ) | |
| 150 | + SELECT | |
| 151 | + ticker, | |
| 152 | + trade_date, | |
| 153 | + SUM(log_ret * log_ret) AS rv_daily, | |
| 154 | + SQRT(SUM(log_ret * log_ret)) AS rvol_daily, | |
| 155 | + COUNT(*) AS n_obs, | |
| 156 | + FIRST(log_ret) AS open_ret, | |
| 157 | + SUM(log_ret) AS daily_return, | |
| 158 | + (SQRT(COUNT(*)) * SUM(POWER(log_ret, 3))) / | |
| 159 | + NULLIF(POWER(SUM(log_ret * log_ret), 1.5), 0) AS realized_skew, | |
| 160 | + (COUNT(*) * SUM(POWER(log_ret, 4))) / | |
| 161 | + NULLIF(POWER(SUM(log_ret * log_ret), 2), 0) AS realized_kurt | |
| 162 | + FROM returns | |
| 163 | + GROUP BY ticker, trade_date | |
| 164 | + HAVING COUNT(*) >= 20 | |
| 165 | + ORDER BY ticker, trade_date | |
| 166 | + """ | |
| 167 | + print(f" Computing realized vol for {label} ({len(tickers)} tickers)...") | |
| 168 | + df = con.execute(query).fetchdf() | |
| 169 | + print(f" -> {len(df):,} rows") | |
| 170 | + con.close() | |
| 171 | + return df | |
| 172 | + | |
| 173 | + | |
| 174 | +# -------------------------------------------------------------------------- | |
| 175 | +# 1C. Weekly aggregates and forward targets | |
| 176 | +# -------------------------------------------------------------------------- | |
| 177 | +def compute_weekly_rv(rv_df): | |
| 178 | + """Rolling weekly RV plus forward return / forward RV targets.""" | |
| 179 | + rv_df = rv_df.sort_values(['ticker', 'trade_date']) | |
| 180 | + rv_df['rv_weekly'] = rv_df.groupby('ticker')['rv_daily'].transform( | |
| 181 | + lambda x: x.rolling(5, min_periods=3).sum() | |
| 182 | + ) | |
| 183 | + rv_df['ret_1d'] = rv_df.groupby('ticker')['daily_return'].shift(-1) | |
| 184 | + rv_df['ret_5d'] = rv_df.groupby('ticker')['daily_return'].transform( | |
| 185 | + lambda x: x.shift(-1).rolling(5, min_periods=3).sum() | |
| 186 | + ) | |
| 187 | + rv_df['rv_fwd_1d'] = rv_df.groupby('ticker')['rv_daily'].shift(-1) | |
| 188 | + rv_df['rv_fwd_5d'] = rv_df.groupby('ticker')['rv_daily'].transform( | |
| 189 | + lambda x: x.shift(-1).rolling(5, min_periods=3).sum() | |
| 190 | + ) | |
| 191 | + return rv_df | |
| 192 | + | |
| 193 | + | |
| 194 | +# -------------------------------------------------------------------------- | |
| 195 | +# 1D. HAR-RV components | |
| 196 | +# -------------------------------------------------------------------------- | |
| 197 | +def compute_har_components(rv_df): | |
| 198 | + """Daily lag, weekly mean and monthly mean of realized variance.""" | |
| 199 | + rv_df = rv_df.sort_values(['ticker', 'trade_date']) | |
| 200 | + rv_df['rv_lag1'] = rv_df.groupby('ticker')['rv_daily'].shift(1) | |
| 201 | + rv_df['rv_w'] = rv_df.groupby('ticker')['rv_daily'].transform( | |
| 202 | + lambda x: x.rolling(5, min_periods=3).mean() | |
| 203 | + ) | |
| 204 | + rv_df['rv_m'] = rv_df.groupby('ticker')['rv_daily'].transform( | |
| 205 | + lambda x: x.rolling(22, min_periods=10).mean() | |
| 206 | + ) | |
| 207 | + return rv_df | |
| 208 | + | |
| 209 | + | |
| 210 | +def main(): | |
| 211 | + print("=" * 70) | |
| 212 | + print("STEP 1: EXTRACTING OPTIONS-IMPLIED MOMENTS") | |
| 213 | + print("=" * 70) | |
| 214 | + config.ensure_output_dirs() | |
| 215 | + | |
| 216 | + # Options features | |
| 217 | + opt_con = open_raw_db("options") | |
| 218 | + opt_stocks = extract_options_features(opt_con, config.MAJOR_TICKERS, "Major Stocks") | |
| 219 | + opt_etfs = extract_options_features(opt_con, config.ETF_TICKERS, "ETFs") | |
| 220 | + opt_idx = extract_options_features(opt_con, config.INDEX_OPTION_TICKERS, "Indices") | |
| 221 | + opt_con.close() | |
| 222 | + | |
| 223 | + opt_all = pd.concat([opt_stocks, opt_etfs, opt_idx], ignore_index=True) | |
| 224 | + opt_all.to_parquet(config.OPTIONS_FEATURES_PARQUET, index=False) | |
| 225 | + print(f"\nOptions features saved: {len(opt_all):,} rows") | |
| 226 | + | |
| 227 | + # Realized volatility per asset class | |
| 228 | + rv_stocks = compute_realized_vol("stocks_5min", "ohlcv", "symbol", | |
| 229 | + config.MAJOR_TICKERS, "Stocks 5min") | |
| 230 | + rv_etfs = compute_realized_vol("etfs_5min", "ohlcv", "symbol", | |
| 231 | + config.ETF_TICKERS, "ETFs 5min") | |
| 232 | + rv_idx = compute_realized_vol("indices_5min", "ohlcv", "symbol", | |
| 233 | + config.INDEX_SYMBOLS, "Indices 5min") | |
| 234 | + | |
| 235 | + rv_all = pd.concat([rv_stocks, rv_etfs, rv_idx], ignore_index=True) | |
| 236 | + rv_all = compute_weekly_rv(rv_all) | |
| 237 | + rv_all = compute_har_components(rv_all) | |
| 238 | + rv_all.to_parquet(config.REALIZED_VOL_PARQUET, index=False) | |
| 239 | + print(f"Realized vol saved: {len(rv_all):,} rows") | |
| 240 | + | |
| 241 | + # Merge options + realized vol into the master panel | |
| 242 | + merged = pd.merge(opt_all, rv_all, on=['ticker', 'trade_date'], how='inner') | |
| 243 | + merged = merged.sort_values(['ticker', 'trade_date']).reset_index(drop=True) | |
| 244 | + merged.to_parquet(config.MERGED_PARQUET, index=False) | |
| 245 | + print(f"\nMerged dataset saved: {len(merged):,} rows") | |
| 246 | + print(f"Tickers: {merged['ticker'].nunique()}") | |
| 247 | + print(f"Date range: {merged['trade_date'].min()} to {merged['trade_date'].max()}") | |
| 248 | + print(f"Columns: {list(merged.columns)}") | |
| 249 | + print("\nStep 1 COMPLETE.") | |
| 250 | + | |
| 251 | + | |
| 252 | +if __name__ == "__main__": | |
| 253 | + try: | |
| 254 | + main() | |
| 255 | + except RawDataUnavailableError as exc: | |
| 256 | + print(f"\n[SKIPPED] {exc}", file=sys.stderr) | |
| 257 | + print(f"(expected stores: {[str(raw_db_path(n)) for n in config.RAW_DB_FILES]})", | |
| 258 | + file=sys.stderr) | |
| 259 | + sys.exit(2) | |
added
scripts/02_rq1_return_predictability.py
+171 −0
@@ -0,0 +1,171 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 02 — RQ1: Do option-implied moments predict next-day/next-week returns? | |
| 7 | + | |
| 8 | +Pooled OLS (HC1) and Fama-MacBeth panel regressions across asset groups | |
| 9 | +(stocks, ETFs, indices, all). | |
| 10 | + | |
| 11 | +Inputs : data/processed/merged_options_rv.parquet | |
| 12 | +Outputs: results/rq1_regression_results.csv, results/rq1_meta.csv | |
| 13 | +""" | |
| 14 | + | |
| 15 | +import warnings | |
| 16 | + | |
| 17 | +import numpy as np | |
| 18 | +import pandas as pd | |
| 19 | + | |
| 20 | +import _bootstrap # noqa: F401 | |
| 21 | +from wp7 import config | |
| 22 | +from wp7.data_io import load_merged | |
| 23 | +from wp7.econometrics import fama_macbeth, winsorize | |
| 24 | + | |
| 25 | +warnings.filterwarnings('ignore') | |
| 26 | + | |
| 27 | +TARGETS = ['ret_1d', 'ret_5d'] | |
| 28 | + | |
| 29 | + | |
| 30 | +def panel_ols(data, features, target, label=""): | |
| 31 | + """Pooled OLS with HC1 t-statistics, as specified in the original study. | |
| 32 | + | |
| 33 | + Historical quirks preserved on purpose (they define the published | |
| 34 | + numbers): features are standardized with the *pandas* sample std | |
| 35 | + (ddof=1) and missing standardized cells are zero-filled; the reported | |
| 36 | + ``p_value`` column is an ad-hoc normal-tail approximation, not an exact | |
| 37 | + two-sided p-value (significance flags use the usual 1.96/2.576 cutoffs). | |
| 38 | + """ | |
| 39 | + sub = data[features + [target, 'ticker', 'trade_date']].dropna() | |
| 40 | + if len(sub) < 100: | |
| 41 | + return None | |
| 42 | + | |
| 43 | + for f in features: | |
| 44 | + sub[f] = winsorize(sub[f]) | |
| 45 | + sub[target] = winsorize(sub[target]) | |
| 46 | + | |
| 47 | + means = sub[features].mean() | |
| 48 | + stds = sub[features].std() | |
| 49 | + X = (sub[features] - means) / stds | |
| 50 | + X = X.fillna(0) | |
| 51 | + X.insert(0, 'const', 1.0) | |
| 52 | + y = sub[target].values | |
| 53 | + | |
| 54 | + coefs, _, _, _ = np.linalg.lstsq(X.values, y, rcond=None) | |
| 55 | + | |
| 56 | + y_pred = X.values @ coefs | |
| 57 | + ss_res = np.sum((y - y_pred) ** 2) | |
| 58 | + ss_tot = np.sum((y - y.mean()) ** 2) | |
| 59 | + r2 = 1 - ss_res / ss_tot if ss_tot > 0 else 0 | |
| 60 | + | |
| 61 | + n = len(y) | |
| 62 | + k = len(features) | |
| 63 | + adj_r2 = 1 - (1 - r2) * (n - 1) / (n - k - 1) | |
| 64 | + | |
| 65 | + # HC1 sandwich (X' diag(e²) X via broadcasting) | |
| 66 | + e = y - y_pred | |
| 67 | + XtX_inv = np.linalg.inv(X.values.T @ X.values) | |
| 68 | + S = (X.values * (e ** 2)[:, None]).T @ X.values * n / (n - k - 1) | |
| 69 | + se = np.sqrt(np.diag(XtX_inv @ S @ XtX_inv)) | |
| 70 | + t_stats = coefs / se | |
| 71 | + | |
| 72 | + results = pd.DataFrame({ | |
| 73 | + 'variable': ['const'] + features, | |
| 74 | + 'coefficient': coefs, | |
| 75 | + 'std_error': se, | |
| 76 | + 't_stat': t_stats, | |
| 77 | + 'p_value': 2 * (1 - pd.Series(np.abs(t_stats)).apply( | |
| 78 | + lambda x: min(1.0, 0.5 * np.exp(-0.5 * x**2) * np.sqrt(2 / np.pi) if x < 30 else 0) | |
| 79 | + )).values, | |
| 80 | + 'significant_5pct': np.abs(t_stats) > 1.96, | |
| 81 | + 'significant_1pct': np.abs(t_stats) > 2.576, | |
| 82 | + }) | |
| 83 | + | |
| 84 | + meta = { | |
| 85 | + 'label': label, | |
| 86 | + 'target': target, | |
| 87 | + 'n_obs': n, | |
| 88 | + 'n_tickers': sub['ticker'].nunique(), | |
| 89 | + 'r_squared': r2, | |
| 90 | + 'adj_r_squared': adj_r2, | |
| 91 | + } | |
| 92 | + return results, meta | |
| 93 | + | |
| 94 | + | |
| 95 | +def main(): | |
| 96 | + print("=" * 70) | |
| 97 | + print("RQ1: OPTION-IMPLIED MOMENTS AND RETURN PREDICTABILITY") | |
| 98 | + print("=" * 70) | |
| 99 | + config.ensure_output_dirs() | |
| 100 | + | |
| 101 | + df = load_merged() | |
| 102 | + print(f"Loaded {len(df):,} rows, {df['ticker'].nunique()} tickers") | |
| 103 | + | |
| 104 | + stocks = df[~df['ticker'].isin(config.NON_STOCK_TICKERS)].copy() | |
| 105 | + etfs = df[df['ticker'].isin(config.ETF_TICKERS)].copy() | |
| 106 | + indices = df[df['ticker'].isin(config.INDEX_OPTION_TICKERS)].copy() | |
| 107 | + | |
| 108 | + features = config.RQ1_FEATURES | |
| 109 | + all_results, all_meta = [], [] | |
| 110 | + | |
| 111 | + for group_name, group_data in [("Stocks", stocks), ("ETFs", etfs), | |
| 112 | + ("Indices", indices), ("All", df)]: | |
| 113 | + for target in TARGETS: | |
| 114 | + horizon = "1-Day" if target == 'ret_1d' else "5-Day" | |
| 115 | + label = f"{group_name} | {horizon}" | |
| 116 | + | |
| 117 | + # Pooled OLS | |
| 118 | + res = panel_ols(group_data, features, target, label) | |
| 119 | + if res: | |
| 120 | + r, m = res | |
| 121 | + r['group'] = group_name | |
| 122 | + r['horizon'] = horizon | |
| 123 | + r['method'] = 'Pooled OLS' | |
| 124 | + all_results.append(r) | |
| 125 | + all_meta.append(m) | |
| 126 | + print(f"\n{label} (Pooled OLS): R²={m['r_squared']:.6f}, " | |
| 127 | + f"Adj-R²={m['adj_r_squared']:.6f}, N={m['n_obs']:,}") | |
| 128 | + sig = r[r['significant_5pct'] & (r['variable'] != 'const')] | |
| 129 | + if len(sig) > 0: | |
| 130 | + print(f" Significant predictors: {', '.join(sig['variable'].tolist())}") | |
| 131 | + | |
| 132 | + # Fama-MacBeth (stocks and full panel only) | |
| 133 | + if group_name in ['Stocks', 'All']: | |
| 134 | + res_fm = fama_macbeth(group_data, features, target) | |
| 135 | + if res_fm: | |
| 136 | + r_fm, n_periods, n_tickers = res_fm | |
| 137 | + r_fm['group'] = group_name | |
| 138 | + r_fm['horizon'] = horizon | |
| 139 | + r_fm['method'] = 'Fama-MacBeth' | |
| 140 | + all_results.append(r_fm) | |
| 141 | + all_meta.append({'label': label, 'target': target, | |
| 142 | + 'n_periods': n_periods, 'n_tickers': n_tickers}) | |
| 143 | + print(f" Fama-MacBeth: N_periods={n_periods}") | |
| 144 | + sig_fm = r_fm[r_fm['fm_significant_5pct'] & (r_fm['variable'] != 'const')] | |
| 145 | + if len(sig_fm) > 0: | |
| 146 | + print(f" FM Significant: {', '.join(sig_fm['variable'].tolist())}") | |
| 147 | + | |
| 148 | + results_df = pd.concat(all_results, ignore_index=True) | |
| 149 | + results_df.to_csv(config.RESULTS_DIR / "rq1_regression_results.csv", index=False) | |
| 150 | + | |
| 151 | + meta_df = pd.DataFrame(all_meta) | |
| 152 | + meta_df.to_csv(config.RESULTS_DIR / "rq1_meta.csv", index=False) | |
| 153 | + | |
| 154 | + print("\n" + "=" * 70) | |
| 155 | + print("RQ1 SUMMARY TABLE") | |
| 156 | + print("=" * 70) | |
| 157 | + summary_rows = [ | |
| 158 | + {'Group': m.get('label', ''), | |
| 159 | + 'N': m.get('n_obs', m.get('n_periods', '')), | |
| 160 | + 'R²': f"{m.get('r_squared', 0):.6f}", | |
| 161 | + 'Adj-R²': f"{m.get('adj_r_squared', 0):.6f}"} | |
| 162 | + for _, m in meta_df.iterrows() if 'r_squared' in m | |
| 163 | + ] | |
| 164 | + if summary_rows: | |
| 165 | + print(pd.DataFrame(summary_rows).to_string(index=False)) | |
| 166 | + | |
| 167 | + print("\nRQ1 COMPLETE.") | |
| 168 | + | |
| 169 | + | |
| 170 | +if __name__ == "__main__": | |
| 171 | + main() | |
added
scripts/03_rq2_rv_forecasting.py
+157 −0
@@ -0,0 +1,157 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 03 — RQ2: IV term structure + smile vs GARCH/HAR-RV for RV forecasting. | |
| 7 | + | |
| 8 | +In-sample panel R² for five nested models, per-ticker rolling out-of-sample | |
| 9 | +evaluation, and Diebold-Mariano tests of HAR-RV vs HAR-RV + IV surface. | |
| 10 | + | |
| 11 | +Inputs : data/processed/merged_options_rv.parquet | |
| 12 | +Outputs: results/rq2_insample.csv, results/rq2_oos_results.csv, | |
| 13 | + results/rq2_diebold_mariano.csv | |
| 14 | +""" | |
| 15 | + | |
| 16 | +import warnings | |
| 17 | + | |
| 18 | +import numpy as np | |
| 19 | +import pandas as pd | |
| 20 | + | |
| 21 | +import _bootstrap # noqa: F401 | |
| 22 | +from wp7 import config | |
| 23 | +from wp7.data_io import load_merged | |
| 24 | +from wp7.econometrics import add_constant, ols, standardize, winsorize | |
| 25 | +from wp7.forecasting import diebold_mariano, ols_forecast, rolling_evaluation | |
| 26 | + | |
| 27 | +warnings.filterwarnings('ignore') | |
| 28 | + | |
| 29 | +TARGETS = {'1-Day RV': 'rv_fwd_1d', '5-Day RV': 'rv_fwd_5d'} | |
| 30 | + | |
| 31 | +WINSORIZE_COLS = ['rv_fwd_1d', 'rv_fwd_5d', 'rv_lag1', 'rv_w', 'rv_m', 'sq_return', | |
| 32 | + 'iv_atm_30d', 'iv_atm_90d', 'iv_term_slope', 'iv_skew_25d', | |
| 33 | + 'implied_skewness', 'implied_kurtosis_proxy'] | |
| 34 | + | |
| 35 | + | |
| 36 | +def main(): | |
| 37 | + print("=" * 70) | |
| 38 | + print("RQ2: IV SURFACE vs GARCH/HAR-RV FOR RV FORECASTING") | |
| 39 | + print("=" * 70) | |
| 40 | + config.ensure_output_dirs() | |
| 41 | + | |
| 42 | + df = load_merged() | |
| 43 | + df = df.sort_values(['ticker', 'trade_date']).reset_index(drop=True) | |
| 44 | + print(f"Loaded {len(df):,} rows") | |
| 45 | + | |
| 46 | + # GARCH(1,1) proxy regressor: yesterday's squared daily return | |
| 47 | + df['sq_return'] = df['daily_return'] ** 2 | |
| 48 | + | |
| 49 | + # Per-ticker winsorization of every model input and target | |
| 50 | + for col in WINSORIZE_COLS: | |
| 51 | + if col in df.columns: | |
| 52 | + df[col] = df.groupby('ticker')[col].transform(lambda x: winsorize(x)) | |
| 53 | + | |
| 54 | + models = config.RQ2_MODELS | |
| 55 | + | |
| 56 | + # ── In-sample panel R² ── | |
| 57 | + print("\n--- IN-SAMPLE PANEL REGRESSIONS ---") | |
| 58 | + insample_results = [] | |
| 59 | + for target_label, target_col in TARGETS.items(): | |
| 60 | + for model_name, features in models.items(): | |
| 61 | + sub = df[features + [target_col, 'ticker']].dropna() | |
| 62 | + if len(sub) < 100: | |
| 63 | + continue | |
| 64 | + | |
| 65 | + X = add_constant(standardize(sub[features].values)) | |
| 66 | + y = sub[target_col].values | |
| 67 | + coefs = ols(X, y) | |
| 68 | + y_pred = X @ coefs | |
| 69 | + ss_res = np.sum((y - y_pred) ** 2) | |
| 70 | + ss_tot = np.sum((y - y.mean()) ** 2) | |
| 71 | + r2 = 1 - ss_res / ss_tot | |
| 72 | + adj_r2 = 1 - (1 - r2) * (len(y) - 1) / (len(y) - len(features) - 1) | |
| 73 | + | |
| 74 | + insample_results.append({ | |
| 75 | + 'target': target_label, | |
| 76 | + 'model': model_name, | |
| 77 | + 'r2': r2, | |
| 78 | + 'adj_r2': adj_r2, | |
| 79 | + 'n_obs': len(sub), | |
| 80 | + 'n_features': len(features), | |
| 81 | + }) | |
| 82 | + print(f" {target_label} | {model_name}: R²={r2:.6f}, " | |
| 83 | + f"Adj-R²={adj_r2:.6f}, N={len(sub):,}") | |
| 84 | + | |
| 85 | + insample_df = pd.DataFrame(insample_results) | |
| 86 | + insample_df.to_csv(config.RESULTS_DIR / "rq2_insample.csv", index=False) | |
| 87 | + | |
| 88 | + # ── Out-of-sample rolling evaluation (30 tickers with most data) ── | |
| 89 | + print("\n--- OUT-OF-SAMPLE ROLLING EVALUATION ---") | |
| 90 | + top_tickers = df.groupby('ticker').size().nlargest(30).index.tolist() | |
| 91 | + df_top = df[df['ticker'].isin(top_tickers)] | |
| 92 | + | |
| 93 | + oos_results_all = [] | |
| 94 | + for target_label, target_col in TARGETS.items(): | |
| 95 | + print(f"\n {target_label}:") | |
| 96 | + oos = rolling_evaluation(df_top, models, target_col, target_label, | |
| 97 | + window=500, step=250) | |
| 98 | + oos_results_all.append(oos) | |
| 99 | + if len(oos) > 0: | |
| 100 | + summary = oos.groupby('model').agg({ | |
| 101 | + 'avg_mse': 'mean', 'avg_mae': 'mean', | |
| 102 | + 'avg_r2_oos': 'mean', 'avg_qlike': 'mean', | |
| 103 | + 'n_windows': 'sum', | |
| 104 | + }).round(6) | |
| 105 | + print(summary.to_string()) | |
| 106 | + | |
| 107 | + oos_df = pd.concat(oos_results_all, ignore_index=True) | |
| 108 | + oos_df.to_csv(config.RESULTS_DIR / "rq2_oos_results.csv", index=False) | |
| 109 | + | |
| 110 | + # ── Diebold-Mariano: HAR-RV vs HAR-RV + IV surface (10 largest tickers) ── | |
| 111 | + print("\n--- MODEL COMPARISON: DIEBOLD-MARIANO TESTS ---") | |
| 112 | + f_har = ['rv_lag1', 'rv_w', 'rv_m'] | |
| 113 | + f_full = f_har + ['iv_atm_30d', 'iv_atm_90d', 'iv_term_slope', | |
| 114 | + 'iv_skew_25d', 'implied_skewness', 'implied_kurtosis_proxy'] | |
| 115 | + dm_results = [] | |
| 116 | + for target_label, target_col in TARGETS.items(): | |
| 117 | + for ticker in top_tickers[:10]: | |
| 118 | + td = df[df['ticker'] == ticker][f_full + [target_col]].dropna() | |
| 119 | + if len(td) < 600: | |
| 120 | + continue | |
| 121 | + | |
| 122 | + train, test = td.iloc[:500], td.iloc[500:] | |
| 123 | + r1 = ols_forecast(train, test, f_har, target_col) | |
| 124 | + r2 = ols_forecast(train, test, f_full, target_col) | |
| 125 | + | |
| 126 | + # Forecast errors on the test window (raw, before truncation at 0) | |
| 127 | + X1 = np.column_stack([np.ones(len(test)), test[f_har].values]) | |
| 128 | + e1 = test[target_col].values - X1 @ r1['coefs'] | |
| 129 | + X2 = np.column_stack([np.ones(len(test)), test[f_full].values]) | |
| 130 | + e2 = test[target_col].values - X2 @ r2['coefs'] | |
| 131 | + | |
| 132 | + dm_stat = diebold_mariano(e1, e2) | |
| 133 | + dm_results.append({ | |
| 134 | + 'ticker': ticker, | |
| 135 | + 'target': target_label, | |
| 136 | + 'mse_har': r1['mse'], | |
| 137 | + 'mse_har_iv': r2['mse'], | |
| 138 | + 'mse_improvement_pct': (r1['mse'] - r2['mse']) / r1['mse'] * 100, | |
| 139 | + 'dm_statistic': dm_stat, | |
| 140 | + 'dm_significant_5pct': abs(dm_stat) > 1.96, | |
| 141 | + }) | |
| 142 | + | |
| 143 | + dm_df = pd.DataFrame(dm_results) | |
| 144 | + dm_df.to_csv(config.RESULTS_DIR / "rq2_diebold_mariano.csv", index=False) | |
| 145 | + print(dm_df.to_string(index=False)) | |
| 146 | + | |
| 147 | + print("\n" + "=" * 70) | |
| 148 | + print("RQ2 SUMMARY") | |
| 149 | + print("=" * 70) | |
| 150 | + print("\nIn-sample R² comparison:") | |
| 151 | + print(insample_df.pivot(index='model', columns='target', values='r2') | |
| 152 | + .round(6).to_string()) | |
| 153 | + print("\nRQ2 COMPLETE.") | |
| 154 | + | |
| 155 | + | |
| 156 | +if __name__ == "__main__": | |
| 157 | + main() | |
added
scripts/04_rq3_correlation_divergence.py
+253 −0
@@ -0,0 +1,253 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 04 — RQ3: Implied vs realized correlation divergence as a stress | |
| 7 | +predictor. | |
| 8 | + | |
| 9 | +Stage 1 (raw-dependent): build the daily implied-correlation index from SPX | |
| 10 | +and constituent ATM IVs, the 22-day realized correlation from daily returns, | |
| 11 | +merge with VIX, define stress events, and save the combined series. | |
| 12 | +Stage 2 (parquet-only): predictive stress regressions and crisis-window | |
| 13 | +analysis. When the raw stores are absent, stage 1 is skipped and stage 2 | |
| 14 | +runs from the shipped ``correlation_divergence.parquet``. | |
| 15 | + | |
| 16 | +Inputs : options.duckdb + index_5min.duckdb (stage 1, optional), | |
| 17 | + data/processed/realized_vol.parquet (stage 1), | |
| 18 | + data/processed/correlation_divergence.parquet (stage 2 fallback) | |
| 19 | +Outputs: data/processed/correlation_divergence.parquet (stage 1), | |
| 20 | + results/rq3_stress_prediction.csv, results/rq3_crisis_analysis.csv | |
| 21 | +""" | |
| 22 | + | |
| 23 | +import warnings | |
| 24 | + | |
| 25 | +import numpy as np | |
| 26 | +import pandas as pd | |
| 27 | + | |
| 28 | +import _bootstrap # noqa: F401 | |
| 29 | +from wp7 import config | |
| 30 | +from wp7.data_io import (RawDataUnavailableError, load_correlation_divergence, | |
| 31 | + load_realized_vol, open_raw_db) | |
| 32 | +from wp7.econometrics import add_constant, hc1_tstats, ols, r_squared, standardize | |
| 33 | + | |
| 34 | +warnings.filterwarnings('ignore') | |
| 35 | + | |
| 36 | +STRESS_HORIZONS = [5, 10, 20] | |
| 37 | + | |
| 38 | + | |
| 39 | +# -------------------------------------------------------------------------- | |
| 40 | +# Stage 1 — build the correlation-divergence dataset (needs raw stores) | |
| 41 | +# -------------------------------------------------------------------------- | |
| 42 | +def build_correlation_dataset() -> pd.DataFrame: | |
| 43 | + """Implied correlation (CBOE methodology), realized correlation, VIX.""" | |
| 44 | + constituents = config.SPX_CONSTITUENTS | |
| 45 | + const_str = ",".join([f"'{t}'" for t in constituents]) | |
| 46 | + | |
| 47 | + # 3A. SPX and constituent 30-day ATM implied volatilities | |
| 48 | + opt_con = open_raw_db("options") | |
| 49 | + print(" Extracting SPX implied volatility...") | |
| 50 | + spx_iv = opt_con.execute(""" | |
| 51 | + SELECT trade_date, | |
| 52 | + AVG(CASE WHEN bid_iv > 0 AND ask_iv > 0 THEN (bid_iv + ask_iv)/2.0 | |
| 53 | + WHEN ask_iv > 0 THEN ask_iv ELSE bid_iv END) AS spx_iv_atm | |
| 54 | + FROM option_chain | |
| 55 | + WHERE ticker = 'SPX' | |
| 56 | + AND call_put = 'c' | |
| 57 | + AND ABS(delta - 0.5) < 0.1 | |
| 58 | + AND (expiry_date - trade_date) BETWEEN 20 AND 40 | |
| 59 | + AND ask_price > 0 | |
| 60 | + GROUP BY trade_date | |
| 61 | + ORDER BY trade_date | |
| 62 | + """).fetchdf() | |
| 63 | + print(f" SPX IV: {len(spx_iv)} days") | |
| 64 | + | |
| 65 | + print(" Extracting constituent implied volatilities...") | |
| 66 | + const_iv = opt_con.execute(f""" | |
| 67 | + SELECT ticker, trade_date, | |
| 68 | + AVG(CASE WHEN bid_iv > 0 AND ask_iv > 0 THEN (bid_iv + ask_iv)/2.0 | |
| 69 | + WHEN ask_iv > 0 THEN ask_iv ELSE bid_iv END) AS iv_atm | |
| 70 | + FROM option_chain | |
| 71 | + WHERE ticker IN ({const_str}) | |
| 72 | + AND call_put = 'c' | |
| 73 | + AND ABS(delta - 0.5) < 0.1 | |
| 74 | + AND (expiry_date - trade_date) BETWEEN 20 AND 40 | |
| 75 | + AND ask_price > 0 | |
| 76 | + GROUP BY ticker, trade_date | |
| 77 | + ORDER BY trade_date | |
| 78 | + """).fetchdf() | |
| 79 | + print(f" Constituent IVs: {len(const_iv)} rows") | |
| 80 | + opt_con.close() | |
| 81 | + | |
| 82 | + # Implied correlation: rho = (sigma²_idx − n⁻¹·avg(sigma²_i)) / | |
| 83 | + # ((1 − n⁻¹)·avg(sigma_i)²) | |
| 84 | + const_iv['iv_sq'] = const_iv['iv_atm'] ** 2 | |
| 85 | + avg_const_iv = const_iv.groupby('trade_date').agg( | |
| 86 | + avg_const_iv_sq=('iv_sq', 'mean'), | |
| 87 | + avg_const_iv=('iv_atm', 'mean'), | |
| 88 | + n_constituents=('ticker', 'nunique'), | |
| 89 | + ).reset_index() | |
| 90 | + | |
| 91 | + ic_df = pd.merge(spx_iv, avg_const_iv, on='trade_date', how='inner') | |
| 92 | + ic_df['spx_iv_sq'] = ic_df['spx_iv_atm'] ** 2 | |
| 93 | + n = ic_df['n_constituents'] | |
| 94 | + ic_df['implied_corr'] = (ic_df['spx_iv_sq'] - (1.0 / n) * ic_df['avg_const_iv_sq']) / \ | |
| 95 | + ((1.0 - 1.0 / n) * ic_df['avg_const_iv'] ** 2) | |
| 96 | + ic_df['implied_corr'] = ic_df['implied_corr'].clip(0, 1) | |
| 97 | + print(f" Implied correlation computed: {len(ic_df)} days") | |
| 98 | + | |
| 99 | + # 3B. Realized correlation: 22-day rolling average pairwise correlation | |
| 100 | + # of constituent daily returns. | |
| 101 | + print("\n Computing realized correlations from daily returns...") | |
| 102 | + rv = load_realized_vol() | |
| 103 | + rv = rv[rv['ticker'].isin(constituents)] | |
| 104 | + | |
| 105 | + ret_pivot = rv.pivot_table(index='trade_date', columns='ticker', | |
| 106 | + values='daily_return', aggfunc='first') | |
| 107 | + ret_pivot = ret_pivot.dropna(axis=0, thresh=10) | |
| 108 | + | |
| 109 | + rolling_corr = [] | |
| 110 | + dates = ret_pivot.index.tolist() | |
| 111 | + for i in range(21, len(dates)): | |
| 112 | + window = ret_pivot.iloc[i - 21:i + 1] | |
| 113 | + corr_matrix = window.corr() | |
| 114 | + mask = np.triu(np.ones(corr_matrix.shape, dtype=bool), k=1) | |
| 115 | + rolling_corr.append({ | |
| 116 | + 'trade_date': dates[i], | |
| 117 | + 'realized_corr': corr_matrix.values[mask].mean(), | |
| 118 | + 'n_pairs': mask.sum(), | |
| 119 | + }) | |
| 120 | + realized_corr_df = pd.DataFrame(rolling_corr) | |
| 121 | + print(f" Realized correlation computed: {len(realized_corr_df)} days") | |
| 122 | + | |
| 123 | + # 3C. Merge implied and realized correlation | |
| 124 | + ic_df['trade_date'] = pd.to_datetime(ic_df['trade_date']) | |
| 125 | + corr_merged = pd.merge(ic_df, realized_corr_df, on='trade_date', how='inner') | |
| 126 | + corr_merged['corr_divergence'] = corr_merged['implied_corr'] - corr_merged['realized_corr'] | |
| 127 | + corr_merged['corr_ratio'] = corr_merged['implied_corr'] / \ | |
| 128 | + corr_merged['realized_corr'].clip(0.01) | |
| 129 | + | |
| 130 | + print(f" Merged correlation data: {len(corr_merged)} days") | |
| 131 | + print(f" Avg implied corr: {corr_merged['implied_corr'].mean():.4f}") | |
| 132 | + print(f" Avg realized corr: {corr_merged['realized_corr'].mean():.4f}") | |
| 133 | + print(f" Avg divergence: {corr_merged['corr_divergence'].mean():.4f}") | |
| 134 | + | |
| 135 | + # 3D. Stress events from VIX levels and 5-day VIX spikes | |
| 136 | + con = open_raw_db("indices_5min") | |
| 137 | + vix_daily = con.execute(""" | |
| 138 | + SELECT CAST(datetime AS DATE) AS trade_date, | |
| 139 | + LAST(close) AS vix_close, | |
| 140 | + MAX(close) AS vix_high | |
| 141 | + FROM ohlcv | |
| 142 | + WHERE symbol = 'VIX' | |
| 143 | + GROUP BY CAST(datetime AS DATE) | |
| 144 | + ORDER BY trade_date | |
| 145 | + """).fetchdf() | |
| 146 | + con.close() | |
| 147 | + vix_daily['trade_date'] = pd.to_datetime(vix_daily['trade_date']) | |
| 148 | + corr_merged = pd.merge(corr_merged, vix_daily, on='trade_date', how='left') | |
| 149 | + | |
| 150 | + corr_merged['vix_5d_change'] = corr_merged['vix_close'].pct_change(5) | |
| 151 | + corr_merged['stress_event'] = ((corr_merged['vix_close'] > 25) | | |
| 152 | + (corr_merged['vix_5d_change'] > 0.20)).astype(int) | |
| 153 | + for horizon in STRESS_HORIZONS: | |
| 154 | + corr_merged[f'stress_fwd_{horizon}d'] = corr_merged['stress_event'].rolling( | |
| 155 | + horizon, min_periods=1).max().shift(-horizon) | |
| 156 | + | |
| 157 | + corr_merged.to_parquet(config.CORRELATION_DIVERGENCE_PARQUET, index=False) | |
| 158 | + return corr_merged | |
| 159 | + | |
| 160 | + | |
| 161 | +# -------------------------------------------------------------------------- | |
| 162 | +# Stage 2 — stress regressions and crisis windows (parquet-only) | |
| 163 | +# -------------------------------------------------------------------------- | |
| 164 | +def stress_regressions(corr_merged: pd.DataFrame) -> None: | |
| 165 | + """Linear probability models: divergence measures → forward stress.""" | |
| 166 | + print("\n--- STRESS PREDICTION REGRESSIONS ---") | |
| 167 | + features = ['corr_divergence', 'corr_ratio', 'implied_corr', 'realized_corr', | |
| 168 | + 'spx_iv_atm', 'vix_close'] | |
| 169 | + rows = [] | |
| 170 | + for horizon in STRESS_HORIZONS: | |
| 171 | + target = f'stress_fwd_{horizon}d' | |
| 172 | + sub = corr_merged[features + [target]].dropna() | |
| 173 | + if len(sub) < 100: | |
| 174 | + continue | |
| 175 | + | |
| 176 | + X = add_constant(standardize(sub[features].values)) | |
| 177 | + y = sub[target].values | |
| 178 | + coefs = ols(X, y) | |
| 179 | + r2 = r_squared(y, X @ coefs) | |
| 180 | + _, t_stats = hc1_tstats(X, y, coefs, len(features)) | |
| 181 | + | |
| 182 | + for i, fname in enumerate(['const'] + features): | |
| 183 | + rows.append({ | |
| 184 | + 'horizon': f'{horizon}d', | |
| 185 | + 'variable': fname, | |
| 186 | + 'coefficient': coefs[i], | |
| 187 | + 't_stat': t_stats[i], | |
| 188 | + 'significant': abs(t_stats[i]) > 1.96, | |
| 189 | + }) | |
| 190 | + | |
| 191 | + print(f"\n {horizon}-day stress prediction: R²={r2:.4f}, N={len(sub)}") | |
| 192 | + for i, fname in enumerate(['const'] + features): | |
| 193 | + sig = "*" if abs(t_stats[i]) > 1.96 else "" | |
| 194 | + sig2 = "*" if abs(t_stats[i]) > 2.576 else "" | |
| 195 | + print(f" {fname:20s}: β={coefs[i]:8.4f}, t={t_stats[i]:7.3f} {sig}{sig2}") | |
| 196 | + | |
| 197 | + pd.DataFrame(rows).to_csv(config.RESULTS_DIR / "rq3_stress_prediction.csv", index=False) | |
| 198 | + | |
| 199 | + | |
| 200 | +def crisis_analysis(corr_merged: pd.DataFrame) -> None: | |
| 201 | + """Correlation divergence in 30-day pre / 10-day post windows around crises.""" | |
| 202 | + print("\n--- CORRELATION DIVERGENCE AROUND CRISES ---") | |
| 203 | + rows = [] | |
| 204 | + for name, date_str in config.CRISES.items(): | |
| 205 | + date = pd.Timestamp(date_str) | |
| 206 | + pre = corr_merged[(corr_merged['trade_date'] >= date - pd.Timedelta(days=30)) & | |
| 207 | + (corr_merged['trade_date'] < date)] | |
| 208 | + post = corr_merged[(corr_merged['trade_date'] >= date) & | |
| 209 | + (corr_merged['trade_date'] < date + pd.Timedelta(days=10))] | |
| 210 | + if len(pre) > 0 and len(post) > 0: | |
| 211 | + rows.append({ | |
| 212 | + 'crisis': name, | |
| 213 | + 'pre_impl_corr': pre['implied_corr'].mean(), | |
| 214 | + 'pre_real_corr': pre['realized_corr'].mean(), | |
| 215 | + 'pre_divergence': pre['corr_divergence'].mean(), | |
| 216 | + 'post_impl_corr': post['implied_corr'].mean(), | |
| 217 | + 'post_real_corr': post['realized_corr'].mean(), | |
| 218 | + 'post_divergence': post['corr_divergence'].mean(), | |
| 219 | + 'divergence_change': post['corr_divergence'].mean() - pre['corr_divergence'].mean(), | |
| 220 | + 'pre_vix': pre['vix_close'].mean() if 'vix_close' in pre.columns else np.nan, | |
| 221 | + 'post_vix': post['vix_close'].mean() if 'vix_close' in post.columns else np.nan, | |
| 222 | + }) | |
| 223 | + print(f" {name}:") | |
| 224 | + print(f" Pre: IC={pre['implied_corr'].mean():.4f}, " | |
| 225 | + f"RC={pre['realized_corr'].mean():.4f}, " | |
| 226 | + f"Div={pre['corr_divergence'].mean():.4f}") | |
| 227 | + print(f" Post: IC={post['implied_corr'].mean():.4f}, " | |
| 228 | + f"RC={post['realized_corr'].mean():.4f}, " | |
| 229 | + f"Div={post['corr_divergence'].mean():.4f}") | |
| 230 | + | |
| 231 | + pd.DataFrame(rows).to_csv(config.RESULTS_DIR / "rq3_crisis_analysis.csv", index=False) | |
| 232 | + | |
| 233 | + | |
| 234 | +def main(): | |
| 235 | + print("=" * 70) | |
| 236 | + print("RQ3: IMPLIED vs REALIZED CORRELATION DIVERGENCE") | |
| 237 | + print("=" * 70) | |
| 238 | + config.ensure_output_dirs() | |
| 239 | + | |
| 240 | + try: | |
| 241 | + corr_merged = build_correlation_dataset() | |
| 242 | + except RawDataUnavailableError as exc: | |
| 243 | + print(f"\n[Stage 1 skipped — raw stores unavailable]\n{exc}\n") | |
| 244 | + print("Loading shipped correlation_divergence.parquet instead.") | |
| 245 | + corr_merged = load_correlation_divergence() | |
| 246 | + | |
| 247 | + stress_regressions(corr_merged) | |
| 248 | + crisis_analysis(corr_merged) | |
| 249 | + print("\nRQ3 COMPLETE.") | |
| 250 | + | |
| 251 | + | |
| 252 | +if __name__ == "__main__": | |
| 253 | + main() | |
added
scripts/05_rq4_greeks_decay_magnets.py
+281 −0
@@ -0,0 +1,281 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 05 — RQ4: Greeks information decay by DTE + OI-concentration price | |
| 7 | +magnets. | |
| 8 | + | |
| 9 | +Part A (raw-dependent): aggregate Greeks by days-to-expiry bucket and test | |
| 10 | +their predictive content for next-day returns and realized variance. | |
| 11 | +Part B: does the underlying price gravitate toward the maximum-open-interest | |
| 12 | +strike? Built from the raw stores when available; otherwise the shipped | |
| 13 | +``price_magnet_data.parquet`` reproduces the summary table (the auxiliary | |
| 14 | +LPM regression needs raw-only columns and is skipped in fallback mode). | |
| 15 | + | |
| 16 | +Inputs : options.duckdb + stock_5min.duckdb (parts A and B, optional), | |
| 17 | + data/processed/realized_vol.parquet (part A), | |
| 18 | + data/processed/price_magnet_data.parquet (part B fallback) | |
| 19 | +Outputs: results/rq4_greeks_decay.csv, results/rq4_price_magnet.csv, | |
| 20 | + data/processed/price_magnet_data.parquet (part B, raw mode) | |
| 21 | +""" | |
| 22 | + | |
| 23 | +import warnings | |
| 24 | + | |
| 25 | +import numpy as np | |
| 26 | +import pandas as pd | |
| 27 | + | |
| 28 | +import _bootstrap # noqa: F401 | |
| 29 | +from wp7 import config | |
| 30 | +from wp7.data_io import (RawDataUnavailableError, load_price_magnet, | |
| 31 | + load_realized_vol, open_raw_db) | |
| 32 | +from wp7.econometrics import add_constant, hc1_tstats, ols, r_squared, standardize | |
| 33 | + | |
| 34 | +warnings.filterwarnings('ignore') | |
| 35 | + | |
| 36 | +TICKERS = config.RQ4_TICKERS | |
| 37 | +TICKER_STR = ",".join([f"'{t}'" for t in TICKERS]) | |
| 38 | + | |
| 39 | + | |
| 40 | +# -------------------------------------------------------------------------- | |
| 41 | +# Part A — Greeks information decay by DTE bucket (raw-dependent) | |
| 42 | +# -------------------------------------------------------------------------- | |
| 43 | +def greeks_decay() -> None: | |
| 44 | + print("\n--- PART A: GREEKS INFORMATION DECAY ---") | |
| 45 | + opt_con = open_raw_db("options") | |
| 46 | + print(" Extracting Greeks by DTE buckets...") | |
| 47 | + greeks_by_dte = opt_con.execute(f""" | |
| 48 | + WITH base AS ( | |
| 49 | + SELECT ticker, trade_date, expiry_date, call_put, | |
| 50 | + (expiry_date - trade_date) AS dte, | |
| 51 | + delta, gamma, vega, theta, | |
| 52 | + open_interest, volume, | |
| 53 | + CASE WHEN bid_iv > 0 AND ask_iv > 0 THEN (bid_iv + ask_iv)/2.0 | |
| 54 | + WHEN ask_iv > 0 THEN ask_iv ELSE bid_iv END AS mid_iv | |
| 55 | + FROM option_chain | |
| 56 | + WHERE ticker IN ({TICKER_STR}) | |
| 57 | + AND ask_price > 0 | |
| 58 | + AND (expiry_date - trade_date) BETWEEN 1 AND 180 | |
| 59 | + ) | |
| 60 | + SELECT | |
| 61 | + ticker, trade_date, | |
| 62 | + CASE | |
| 63 | + WHEN dte BETWEEN 1 AND 7 THEN '01_1w' | |
| 64 | + WHEN dte BETWEEN 8 AND 14 THEN '02_2w' | |
| 65 | + WHEN dte BETWEEN 15 AND 30 THEN '03_1m' | |
| 66 | + WHEN dte BETWEEN 31 AND 60 THEN '04_2m' | |
| 67 | + WHEN dte BETWEEN 61 AND 90 THEN '05_3m' | |
| 68 | + WHEN dte BETWEEN 91 AND 180 THEN '06_6m' | |
| 69 | + END AS dte_bucket, | |
| 70 | + | |
| 71 | + AVG(ABS(delta)) AS avg_abs_delta, | |
| 72 | + AVG(gamma) AS avg_gamma, | |
| 73 | + AVG(vega) AS avg_vega, | |
| 74 | + AVG(ABS(theta)) AS avg_abs_theta, | |
| 75 | + AVG(mid_iv) AS avg_iv, | |
| 76 | + SUM(volume) AS total_vol, | |
| 77 | + SUM(open_interest) AS total_oi, | |
| 78 | + | |
| 79 | + SUM(CASE WHEN call_put='c' THEN gamma * open_interest ELSE 0 END) AS call_gamma_oi, | |
| 80 | + SUM(CASE WHEN call_put='p' THEN gamma * open_interest ELSE 0 END) AS put_gamma_oi, | |
| 81 | + SUM(CASE WHEN call_put='c' THEN delta * open_interest ELSE 0 END) AS call_delta_oi, | |
| 82 | + SUM(CASE WHEN call_put='p' THEN delta * open_interest ELSE 0 END) AS put_delta_oi | |
| 83 | + | |
| 84 | + FROM base | |
| 85 | + GROUP BY ticker, trade_date, dte_bucket | |
| 86 | + HAVING dte_bucket IS NOT NULL AND COUNT(*) >= 5 | |
| 87 | + ORDER BY ticker, trade_date, dte_bucket | |
| 88 | + """).fetchdf() | |
| 89 | + opt_con.close() | |
| 90 | + print(f" Greeks by DTE: {len(greeks_by_dte):,} rows") | |
| 91 | + | |
| 92 | + rv = load_realized_vol() | |
| 93 | + rv = rv[rv['ticker'].isin(TICKERS)] | |
| 94 | + | |
| 95 | + greeks_by_dte['trade_date'] = pd.to_datetime(greeks_by_dte['trade_date']) | |
| 96 | + gm = pd.merge(greeks_by_dte, | |
| 97 | + rv[['ticker', 'trade_date', 'ret_1d', 'rv_fwd_1d', 'daily_return']], | |
| 98 | + on=['ticker', 'trade_date'], how='inner') | |
| 99 | + | |
| 100 | + features = ['avg_gamma', 'avg_vega', 'avg_abs_theta', 'avg_iv', | |
| 101 | + 'call_gamma_oi', 'put_gamma_oi'] | |
| 102 | + decay_results = [] | |
| 103 | + for dte_bucket in sorted(gm['dte_bucket'].dropna().unique()): | |
| 104 | + sub = gm[gm['dte_bucket'] == dte_bucket].copy() | |
| 105 | + for target, target_name in [('ret_1d', 'Return'), ('rv_fwd_1d', 'RV')]: | |
| 106 | + data = sub[features + [target]].dropna() | |
| 107 | + if len(data) < 100: | |
| 108 | + continue | |
| 109 | + | |
| 110 | + X = add_constant(standardize(data[features].values)) | |
| 111 | + y = data[target].values | |
| 112 | + coefs = ols(X, y) | |
| 113 | + r2 = r_squared(y, X @ coefs) | |
| 114 | + _, t_stats = hc1_tstats(X, y, coefs, len(features)) | |
| 115 | + | |
| 116 | + decay_results.append({ | |
| 117 | + 'dte_bucket': dte_bucket, | |
| 118 | + 'target': target_name, | |
| 119 | + 'r_squared': r2, | |
| 120 | + 'n_obs': len(data), | |
| 121 | + 'n_significant': np.sum(np.abs(t_stats[1:]) > 1.96), | |
| 122 | + 'gamma_t': t_stats[1], | |
| 123 | + 'vega_t': t_stats[2], | |
| 124 | + 'theta_t': t_stats[3], | |
| 125 | + 'iv_t': t_stats[4], | |
| 126 | + }) | |
| 127 | + | |
| 128 | + decay_df = pd.DataFrame(decay_results) | |
| 129 | + decay_df.to_csv(config.RESULTS_DIR / "rq4_greeks_decay.csv", index=False) | |
| 130 | + print("\n GREEKS PREDICTIVE POWER BY DTE BUCKET:") | |
| 131 | + print(decay_df[['dte_bucket', 'target', 'r_squared', 'n_significant', 'n_obs']] | |
| 132 | + .to_string(index=False)) | |
| 133 | + | |
| 134 | + | |
| 135 | +# -------------------------------------------------------------------------- | |
| 136 | +# Part B — Price magnets | |
| 137 | +# -------------------------------------------------------------------------- | |
| 138 | +def build_magnet_data() -> pd.DataFrame: | |
| 139 | + """Assemble the filtered price-magnet panel from the raw stores.""" | |
| 140 | + opt_con = open_raw_db("options") | |
| 141 | + print(" Extracting OI concentration data...") | |
| 142 | + oi_data = opt_con.execute(f""" | |
| 143 | + WITH daily_oi AS ( | |
| 144 | + SELECT ticker, trade_date, strike, call_put, | |
| 145 | + SUM(open_interest) AS oi, | |
| 146 | + SUM(volume) AS vol | |
| 147 | + FROM option_chain | |
| 148 | + WHERE ticker IN ({TICKER_STR}) | |
| 149 | + AND (expiry_date - trade_date) BETWEEN 1 AND 30 | |
| 150 | + AND open_interest > 0 | |
| 151 | + GROUP BY ticker, trade_date, strike, call_put | |
| 152 | + ), | |
| 153 | + max_oi AS ( | |
| 154 | + SELECT ticker, trade_date, | |
| 155 | + MAX(oi) AS max_oi_val | |
| 156 | + FROM daily_oi | |
| 157 | + GROUP BY ticker, trade_date | |
| 158 | + ), | |
| 159 | + top_strikes AS ( | |
| 160 | + SELECT d.ticker, d.trade_date, d.strike, d.call_put, d.oi, | |
| 161 | + m.max_oi_val, | |
| 162 | + ROW_NUMBER() OVER (PARTITION BY d.ticker, d.trade_date | |
| 163 | + ORDER BY d.oi DESC) AS rn | |
| 164 | + FROM daily_oi d | |
| 165 | + JOIN max_oi m ON d.ticker = m.ticker AND d.trade_date = m.trade_date | |
| 166 | + ) | |
| 167 | + SELECT ticker, trade_date, | |
| 168 | + MAX(CASE WHEN rn = 1 THEN strike END) AS top1_strike, | |
| 169 | + MAX(CASE WHEN rn = 1 THEN oi END) AS top1_oi, | |
| 170 | + MAX(CASE WHEN rn = 2 THEN strike END) AS top2_strike, | |
| 171 | + MAX(CASE WHEN rn = 2 THEN oi END) AS top2_oi, | |
| 172 | + SUM(CASE WHEN call_put='c' THEN oi ELSE 0 END) AS total_call_oi, | |
| 173 | + SUM(CASE WHEN call_put='p' THEN oi ELSE 0 END) AS total_put_oi, | |
| 174 | + SUM(oi) AS total_oi | |
| 175 | + FROM top_strikes | |
| 176 | + WHERE rn <= 5 | |
| 177 | + GROUP BY ticker, trade_date | |
| 178 | + ORDER BY ticker, trade_date | |
| 179 | + """).fetchdf() | |
| 180 | + print(f" OI concentration data: {len(oi_data):,} rows") | |
| 181 | + opt_con.close() | |
| 182 | + | |
| 183 | + stk_con = open_raw_db("stocks_5min") | |
| 184 | + print(" Loading intraday close prices...") | |
| 185 | + intraday_close = stk_con.execute(f""" | |
| 186 | + SELECT symbol AS ticker, | |
| 187 | + CAST(datetime AS DATE) AS trade_date, | |
| 188 | + FIRST(open) AS day_open, | |
| 189 | + LAST(close) AS day_close, | |
| 190 | + MIN(low) AS day_low, | |
| 191 | + MAX(high) AS day_high | |
| 192 | + FROM ohlcv | |
| 193 | + WHERE symbol IN ({TICKER_STR}) | |
| 194 | + AND datetime >= '2010-01-01' | |
| 195 | + GROUP BY symbol, CAST(datetime AS DATE) | |
| 196 | + ORDER BY symbol, trade_date | |
| 197 | + """).fetchdf() | |
| 198 | + stk_con.close() | |
| 199 | + print(f" Intraday aggregated: {len(intraday_close):,} rows") | |
| 200 | + | |
| 201 | + oi_data['trade_date'] = pd.to_datetime(oi_data['trade_date']) | |
| 202 | + intraday_close['trade_date'] = pd.to_datetime(intraday_close['trade_date']) | |
| 203 | + magnet = pd.merge(oi_data, intraday_close, on=['ticker', 'trade_date'], how='inner') | |
| 204 | + | |
| 205 | + magnet['dist_open_to_strike'] = np.abs(magnet['day_open'] - magnet['top1_strike']) / magnet['day_open'] | |
| 206 | + magnet['dist_close_to_strike'] = np.abs(magnet['day_close'] - magnet['top1_strike']) / magnet['day_close'] | |
| 207 | + magnet['moved_toward_strike'] = (magnet['dist_close_to_strike'] < | |
| 208 | + magnet['dist_open_to_strike']).astype(int) | |
| 209 | + magnet['oi_concentration'] = magnet['top1_oi'] / magnet['total_oi'] | |
| 210 | + | |
| 211 | + magnet_clean = magnet[(magnet['dist_open_to_strike'] < 0.10) & | |
| 212 | + (magnet['dist_open_to_strike'] > 0.001)].copy() | |
| 213 | + | |
| 214 | + magnet_clean[['ticker', 'trade_date', 'oi_concentration', 'dist_open_to_strike', | |
| 215 | + 'dist_close_to_strike', 'moved_toward_strike']].to_parquet( | |
| 216 | + config.PRICE_MAGNET_PARQUET, index=False) | |
| 217 | + return magnet_clean | |
| 218 | + | |
| 219 | + | |
| 220 | +def magnet_analysis(magnet_clean: pd.DataFrame, has_raw_columns: bool) -> None: | |
| 221 | + """Summary by OI-concentration quintile (+ LPM regression in raw mode).""" | |
| 222 | + print(f"\n Filtered magnet data: {len(magnet_clean):,} rows") | |
| 223 | + print(f" Fraction moved toward max-OI strike: " | |
| 224 | + f"{magnet_clean['moved_toward_strike'].mean():.4f}") | |
| 225 | + | |
| 226 | + magnet_clean['oi_conc_quintile'] = pd.qcut( | |
| 227 | + magnet_clean['oi_concentration'], 5, | |
| 228 | + labels=['Q1_Low', 'Q2', 'Q3', 'Q4', 'Q5_High'], duplicates='drop') | |
| 229 | + | |
| 230 | + magnet_summary = magnet_clean.groupby('oi_conc_quintile', observed=True).agg( | |
| 231 | + pct_moved_toward=('moved_toward_strike', 'mean'), | |
| 232 | + avg_dist_open=('dist_open_to_strike', 'mean'), | |
| 233 | + avg_dist_close=('dist_close_to_strike', 'mean'), | |
| 234 | + n_obs=('moved_toward_strike', 'count'), | |
| 235 | + ).round(4) | |
| 236 | + | |
| 237 | + print("\n PRICE MAGNET EFFECT BY OI CONCENTRATION:") | |
| 238 | + print(magnet_summary.to_string()) | |
| 239 | + magnet_summary.to_csv(config.RESULTS_DIR / "rq4_price_magnet.csv") | |
| 240 | + | |
| 241 | + if not has_raw_columns: | |
| 242 | + print("\n [LPM regression skipped — needs 'total_oi' from the raw build]") | |
| 243 | + return | |
| 244 | + | |
| 245 | + features = ['oi_concentration', 'dist_open_to_strike', 'total_oi'] | |
| 246 | + sub = magnet_clean[features + ['moved_toward_strike']].dropna() | |
| 247 | + X = add_constant(standardize(sub[features].values)) | |
| 248 | + y = sub['moved_toward_strike'].values | |
| 249 | + coefs = ols(X, y) | |
| 250 | + _, t = hc1_tstats(X, y, coefs, len(features)) | |
| 251 | + | |
| 252 | + print("\n LOGISTIC (LPM) REGRESSION: moved_toward_strike ~") | |
| 253 | + for i, name in enumerate(['const'] + features): | |
| 254 | + sig = "**" if abs(t[i]) > 2.576 else ("*" if abs(t[i]) > 1.96 else "") | |
| 255 | + print(f" {name:25s}: β={coefs[i]:8.5f}, t={t[i]:7.3f} {sig}") | |
| 256 | + | |
| 257 | + | |
| 258 | +def main(): | |
| 259 | + print("=" * 70) | |
| 260 | + print("RQ4: GREEKS INFORMATION DECAY & PRICE MAGNETS") | |
| 261 | + print("=" * 70) | |
| 262 | + config.ensure_output_dirs() | |
| 263 | + | |
| 264 | + try: | |
| 265 | + greeks_decay() | |
| 266 | + except RawDataUnavailableError as exc: | |
| 267 | + print(f"\n[Part A skipped — raw stores unavailable]\n{exc}") | |
| 268 | + | |
| 269 | + print("\n--- PART B: OI CONCENTRATION AS PRICE MAGNETS ---") | |
| 270 | + try: | |
| 271 | + magnet_clean = build_magnet_data() | |
| 272 | + magnet_analysis(magnet_clean, has_raw_columns=True) | |
| 273 | + except RawDataUnavailableError as exc: | |
| 274 | + print(f"\n[Raw build skipped — reproducing summary from shipped parquet]\n{exc}\n") | |
| 275 | + magnet_analysis(load_price_magnet(), has_raw_columns=False) | |
| 276 | + | |
| 277 | + print("\nRQ4 COMPLETE.") | |
| 278 | + | |
| 279 | + | |
| 280 | +if __name__ == "__main__": | |
| 281 | + main() | |
added
scripts/06_rq5_ml_rv_forecast.py
+354 −0
@@ -0,0 +1,354 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 06 — RQ5: ML on the full SPX options surface vs VIX for realized- | |
| 7 | +variance forecasting. | |
| 8 | + | |
| 9 | +Builds 21 daily SPX surface features and SPX 5-minute realized variance from | |
| 10 | +the raw stores, then compares — out-of-sample, temporal split 2020-01-01 — | |
| 11 | +the VIX benchmark, OLS models (HAR-RV, IV surface, combined), Random Forest | |
| 12 | +and Gradient Boosting. Entirely raw-dependent: exits gracefully when the raw | |
| 13 | +stores are absent (the shipped result CSVs remain authoritative). | |
| 14 | + | |
| 15 | +Inputs : options.duckdb, index_5min.duckdb | |
| 16 | +Outputs: results/rq5_model_comparison.csv, results/rq5_feature_importance.csv | |
| 17 | +""" | |
| 18 | + | |
| 19 | +import sys | |
| 20 | +import warnings | |
| 21 | + | |
| 22 | +import numpy as np | |
| 23 | +import pandas as pd | |
| 24 | +from numpy.linalg import lstsq | |
| 25 | + | |
| 26 | +import _bootstrap # noqa: F401 | |
| 27 | +from wp7 import config | |
| 28 | +from wp7.data_io import RawDataUnavailableError, open_raw_db | |
| 29 | + | |
| 30 | +warnings.filterwarnings('ignore') | |
| 31 | + | |
| 32 | +SURFACE_FEATURES = [ | |
| 33 | + 'iv_atm_1w', 'iv_atm_2w', 'iv_atm_1m', 'iv_atm_2m', 'iv_atm_3m', 'iv_atm_6m', | |
| 34 | + 'skew_25d_1m', 'skew_25d_3m', 'skew_10d_1m', 'butterfly_1m', | |
| 35 | + 'ts_slope_3m_1m', 'ts_slope_6m_1m', | |
| 36 | + 'total_gamma_oi', 'net_gamma', 'total_vega_oi', 'avg_theta', | |
| 37 | + 'pc_vol_ratio', 'pc_oi_ratio', 'total_volume', 'total_oi', 'avg_spread_pct', | |
| 38 | +] | |
| 39 | +HAR_FEATURES = ['rv_lag1', 'rv_w', 'rv_m'] | |
| 40 | +TARGETS = {'1-Day RV': 'rv_fwd_1d', '5-Day RV': 'rv_fwd_5d', '22-Day RV': 'rv_fwd_22d'} | |
| 41 | +SPLIT_DATE = pd.Timestamp('2020-01-01') | |
| 42 | + | |
| 43 | + | |
| 44 | +def build_dataset() -> pd.DataFrame: | |
| 45 | + """SPX surface features + SPX 5-min RV + VIX-implied daily variance.""" | |
| 46 | + opt_con = open_raw_db("options") | |
| 47 | + print("\n--- BUILDING SPX OPTIONS SURFACE FEATURES ---") | |
| 48 | + spx_surface = opt_con.execute(""" | |
| 49 | + WITH base AS ( | |
| 50 | + SELECT trade_date, strike, expiry_date, call_put, | |
| 51 | + (expiry_date - trade_date) AS dte, | |
| 52 | + bid_price, ask_price, bid_iv, ask_iv, | |
| 53 | + open_interest, volume, delta, gamma, vega, theta, rho, | |
| 54 | + CASE WHEN bid_iv > 0 AND ask_iv > 0 THEN (bid_iv + ask_iv)/2.0 | |
| 55 | + WHEN ask_iv > 0 THEN ask_iv ELSE bid_iv END AS mid_iv, | |
| 56 | + (bid_price + ask_price) / 2.0 AS mid_price | |
| 57 | + FROM option_chain | |
| 58 | + WHERE ticker = 'SPX' | |
| 59 | + AND ask_price > 0 | |
| 60 | + AND (expiry_date - trade_date) BETWEEN 1 AND 365 | |
| 61 | + ) | |
| 62 | + SELECT | |
| 63 | + trade_date, | |
| 64 | + | |
| 65 | + -- ATM IV by tenor | |
| 66 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 5 AND 10 THEN mid_iv END) AS iv_atm_1w, | |
| 67 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 13 AND 17 THEN mid_iv END) AS iv_atm_2w, | |
| 68 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 25 AND 35 THEN mid_iv END) AS iv_atm_1m, | |
| 69 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 55 AND 65 THEN mid_iv END) AS iv_atm_2m, | |
| 70 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 85 AND 95 THEN mid_iv END) AS iv_atm_3m, | |
| 71 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 170 AND 200 THEN mid_iv END) AS iv_atm_6m, | |
| 72 | + | |
| 73 | + -- Skew by tenor (25-delta put minus 25-delta call) | |
| 74 | + AVG(CASE WHEN call_put='p' AND ABS(delta+0.25)<0.07 AND dte BETWEEN 25 AND 35 THEN mid_iv END) - | |
| 75 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.25)<0.07 AND dte BETWEEN 25 AND 35 THEN mid_iv END) AS skew_25d_1m, | |
| 76 | + AVG(CASE WHEN call_put='p' AND ABS(delta+0.25)<0.07 AND dte BETWEEN 85 AND 95 THEN mid_iv END) - | |
| 77 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.25)<0.07 AND dte BETWEEN 85 AND 95 THEN mid_iv END) AS skew_25d_3m, | |
| 78 | + | |
| 79 | + -- Deep OTM skew (10-delta) | |
| 80 | + AVG(CASE WHEN call_put='p' AND ABS(delta+0.10)<0.05 AND dte BETWEEN 25 AND 35 THEN mid_iv END) - | |
| 81 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.10)<0.05 AND dte BETWEEN 25 AND 35 THEN mid_iv END) AS skew_10d_1m, | |
| 82 | + | |
| 83 | + -- Butterfly (wings / ATM) | |
| 84 | + (AVG(CASE WHEN ABS(delta)<0.15 AND ABS(delta)>0.03 AND dte BETWEEN 25 AND 35 THEN mid_iv END) / | |
| 85 | + NULLIF(AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 25 AND 35 THEN mid_iv END),0) | |
| 86 | + ) AS butterfly_1m, | |
| 87 | + | |
| 88 | + -- Term structure slopes | |
| 89 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 85 AND 95 THEN mid_iv END) - | |
| 90 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 25 AND 35 THEN mid_iv END) AS ts_slope_3m_1m, | |
| 91 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 170 AND 200 THEN mid_iv END) - | |
| 92 | + AVG(CASE WHEN call_put='c' AND ABS(delta-0.5)<0.1 AND dte BETWEEN 25 AND 35 THEN mid_iv END) AS ts_slope_6m_1m, | |
| 93 | + | |
| 94 | + -- Aggregate Greeks | |
| 95 | + SUM(gamma * open_interest) AS total_gamma_oi, | |
| 96 | + SUM(CASE WHEN call_put='c' THEN gamma * open_interest ELSE 0 END) - | |
| 97 | + SUM(CASE WHEN call_put='p' THEN gamma * open_interest ELSE 0 END) AS net_gamma, | |
| 98 | + SUM(vega * open_interest) AS total_vega_oi, | |
| 99 | + AVG(theta) AS avg_theta, | |
| 100 | + | |
| 101 | + -- Volume/OI ratios | |
| 102 | + SUM(CASE WHEN call_put='p' THEN volume ELSE 0 END)::DOUBLE / | |
| 103 | + NULLIF(SUM(CASE WHEN call_put='c' THEN volume ELSE 0 END),0) AS pc_vol_ratio, | |
| 104 | + SUM(CASE WHEN call_put='p' THEN open_interest ELSE 0 END)::DOUBLE / | |
| 105 | + NULLIF(SUM(CASE WHEN call_put='c' THEN open_interest ELSE 0 END),0) AS pc_oi_ratio, | |
| 106 | + SUM(volume) AS total_volume, | |
| 107 | + SUM(open_interest) AS total_oi, | |
| 108 | + | |
| 109 | + -- Liquidity proxy | |
| 110 | + AVG(CASE WHEN mid_price > 0 THEN (ask_price - bid_price) / mid_price END) AS avg_spread_pct, | |
| 111 | + | |
| 112 | + COUNT(*) AS n_contracts | |
| 113 | + | |
| 114 | + FROM base | |
| 115 | + GROUP BY trade_date | |
| 116 | + HAVING COUNT(*) >= 50 | |
| 117 | + ORDER BY trade_date | |
| 118 | + """).fetchdf() | |
| 119 | + opt_con.close() | |
| 120 | + print(f" SPX surface features: {len(spx_surface)} days, {spx_surface.shape[1]} columns") | |
| 121 | + | |
| 122 | + idx_con = open_raw_db("indices_5min") | |
| 123 | + spx_rv = idx_con.execute(""" | |
| 124 | + WITH bars AS ( | |
| 125 | + SELECT datetime, close, | |
| 126 | + CAST(datetime AS DATE) AS trade_date, | |
| 127 | + LAG(close) OVER (ORDER BY datetime) AS prev_close | |
| 128 | + FROM ohlcv WHERE symbol = 'SPX' | |
| 129 | + ), | |
| 130 | + rets AS ( | |
| 131 | + SELECT trade_date, LN(close / NULLIF(prev_close, 0)) AS log_ret | |
| 132 | + FROM bars WHERE prev_close > 0 AND close > 0 | |
| 133 | + ) | |
| 134 | + SELECT trade_date, | |
| 135 | + SUM(log_ret * log_ret) AS rv_5min, | |
| 136 | + COUNT(*) AS n_obs, | |
| 137 | + SUM(log_ret) AS daily_ret | |
| 138 | + FROM rets | |
| 139 | + GROUP BY trade_date | |
| 140 | + HAVING COUNT(*) >= 20 | |
| 141 | + ORDER BY trade_date | |
| 142 | + """).fetchdf() | |
| 143 | + vix_daily = idx_con.execute(""" | |
| 144 | + SELECT CAST(datetime AS DATE) AS trade_date, | |
| 145 | + LAST(close) AS vix_close | |
| 146 | + FROM ohlcv WHERE symbol = 'VIX' | |
| 147 | + GROUP BY CAST(datetime AS DATE) | |
| 148 | + ORDER BY trade_date | |
| 149 | + """).fetchdf() | |
| 150 | + idx_con.close() | |
| 151 | + | |
| 152 | + for frame in (spx_rv, vix_daily, spx_surface): | |
| 153 | + frame['trade_date'] = pd.to_datetime(frame['trade_date']) | |
| 154 | + | |
| 155 | + # Forward RV targets and HAR components | |
| 156 | + spx_rv = spx_rv.sort_values('trade_date') | |
| 157 | + spx_rv['rv_fwd_1d'] = spx_rv['rv_5min'].shift(-1) | |
| 158 | + spx_rv['rv_fwd_5d'] = spx_rv['rv_5min'].shift(-1).rolling(5, min_periods=3).sum() | |
| 159 | + spx_rv['rv_fwd_22d'] = spx_rv['rv_5min'].shift(-1).rolling(22, min_periods=10).sum() | |
| 160 | + spx_rv['rv_lag1'] = spx_rv['rv_5min'].shift(1) | |
| 161 | + spx_rv['rv_w'] = spx_rv['rv_5min'].rolling(5, min_periods=3).mean() | |
| 162 | + spx_rv['rv_m'] = spx_rv['rv_5min'].rolling(22, min_periods=10).mean() | |
| 163 | + | |
| 164 | + # VIX-implied daily variance: (VIX/100)² / 252 | |
| 165 | + vix_daily['vix_implied_var'] = (vix_daily['vix_close'] / 100) ** 2 / 252 | |
| 166 | + | |
| 167 | + ml_data = spx_rv.merge(vix_daily, on='trade_date', how='inner') | |
| 168 | + ml_data = ml_data.merge(spx_surface, on='trade_date', how='inner') | |
| 169 | + ml_data = ml_data.sort_values('trade_date').reset_index(drop=True) | |
| 170 | + ml_data = ml_data.dropna(subset=['rv_fwd_1d']) | |
| 171 | + | |
| 172 | + # Fill and winsorize surface features | |
| 173 | + for col in SURFACE_FEATURES: | |
| 174 | + if col in ml_data.columns: | |
| 175 | + ml_data[col] = ml_data[col].ffill().bfill() | |
| 176 | + ml_data[col] = ml_data[col].fillna(ml_data[col].median()) | |
| 177 | + lo, hi = ml_data[col].quantile(0.01), ml_data[col].quantile(0.99) | |
| 178 | + ml_data[col] = ml_data[col].clip(lo, hi) | |
| 179 | + | |
| 180 | + ml_data = ml_data.replace([np.inf, -np.inf], np.nan) | |
| 181 | + ml_data = ml_data.dropna(subset=['rv_fwd_1d'] + HAR_FEATURES) | |
| 182 | + | |
| 183 | + print(f"\n ML dataset: {len(ml_data)} days, {ml_data.shape[1]} features") | |
| 184 | + print(f" Date range: {ml_data['trade_date'].min()} to {ml_data['trade_date'].max()}") | |
| 185 | + return ml_data | |
| 186 | + | |
| 187 | + | |
| 188 | +def oos_metrics(y_true, y_pred) -> dict: | |
| 189 | + mse = np.mean((y_true - y_pred) ** 2) | |
| 190 | + mae = np.mean(np.abs(y_true - y_pred)) | |
| 191 | + ss_res = np.sum((y_true - y_pred) ** 2) | |
| 192 | + ss_tot = np.sum((y_true - y_true.mean()) ** 2) | |
| 193 | + return {'mse': mse, 'mae': mae, 'r2_oos': 1 - ss_res / ss_tot} | |
| 194 | + | |
| 195 | + | |
| 196 | +def main(): | |
| 197 | + print("=" * 70) | |
| 198 | + print("RQ5: ML OPTIONS SURFACE vs VIX FOR SPX RV FORECASTING") | |
| 199 | + print("=" * 70) | |
| 200 | + config.ensure_output_dirs() | |
| 201 | + | |
| 202 | + ml_data = build_dataset() | |
| 203 | + all_features = HAR_FEATURES + SURFACE_FEATURES | |
| 204 | + | |
| 205 | + train = ml_data[ml_data['trade_date'] < SPLIT_DATE].copy() | |
| 206 | + test = ml_data[ml_data['trade_date'] >= SPLIT_DATE].copy() | |
| 207 | + print(f"\n Train: {len(train)} days (up to {SPLIT_DATE.date()})") | |
| 208 | + print(f" Test: {len(test)} days (from {SPLIT_DATE.date()})") | |
| 209 | + | |
| 210 | + # ── VIX benchmark ── | |
| 211 | + print("\n--- BENCHMARK: VIX ---") | |
| 212 | + vix_results = {} | |
| 213 | + horizon_scale = {'rv_fwd_1d': 1, 'rv_fwd_5d': 5, 'rv_fwd_22d': 22} | |
| 214 | + for target_label, target_col in TARGETS.items(): | |
| 215 | + sub_test = test[['vix_implied_var', target_col]].dropna() | |
| 216 | + y_pred = sub_test['vix_implied_var'] * horizon_scale[target_col] | |
| 217 | + res = oos_metrics(sub_test[target_col], y_pred) | |
| 218 | + vix_results[target_label] = res | |
| 219 | + print(f" {target_label}: MSE={res['mse']:.10f}, MAE={res['mae']:.8f}, " | |
| 220 | + f"R²_oos={res['r2_oos']:.4f}") | |
| 221 | + | |
| 222 | + # ── OLS models ── | |
| 223 | + print("\n--- OLS MODELS ---") | |
| 224 | + ols_results = {} | |
| 225 | + models_ols = {'HAR-RV': HAR_FEATURES, 'IV Surface': SURFACE_FEATURES, | |
| 226 | + 'HAR + IV Surface': all_features} | |
| 227 | + for model_name, features in models_ols.items(): | |
| 228 | + for target_label, target_col in TARGETS.items(): | |
| 229 | + feats = [c for c in features if c in train.columns] | |
| 230 | + cols_needed = feats + [target_col] | |
| 231 | + tr = train[cols_needed].replace([np.inf, -np.inf], np.nan).dropna() | |
| 232 | + te = test[cols_needed].replace([np.inf, -np.inf], np.nan).dropna() | |
| 233 | + if len(tr) < 50 or len(te) < 20: | |
| 234 | + continue | |
| 235 | + | |
| 236 | + X_tr = tr[feats].values | |
| 237 | + m_tr, s_tr = X_tr.mean(axis=0), X_tr.std(axis=0) | |
| 238 | + s_tr[s_tr == 0] = 1 | |
| 239 | + X_tr = np.column_stack([np.ones(len(X_tr)), (X_tr - m_tr) / s_tr]) | |
| 240 | + coefs, _, _, _ = lstsq(X_tr, tr[target_col].values, rcond=None) | |
| 241 | + | |
| 242 | + X_te = np.column_stack([np.ones(len(te)), | |
| 243 | + (te[feats].values - m_tr) / s_tr]) | |
| 244 | + y_pred = np.maximum(X_te @ coefs, 0) | |
| 245 | + res = oos_metrics(te[target_col].values, y_pred) | |
| 246 | + ols_results[f"{model_name}|{target_label}"] = \ | |
| 247 | + {'model': model_name, 'target': target_label, **res} | |
| 248 | + print(f" {model_name} → {target_label}: MSE={res['mse']:.10f}, " | |
| 249 | + f"R²_oos={res['r2_oos']:.4f}") | |
| 250 | + | |
| 251 | + # ── Random Forest and Gradient Boosting ── | |
| 252 | + print("\n--- RANDOM FOREST / GRADIENT BOOSTING ---") | |
| 253 | + from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor | |
| 254 | + from sklearn.metrics import (mean_absolute_error, mean_squared_error, r2_score) | |
| 255 | + from sklearn.preprocessing import StandardScaler | |
| 256 | + | |
| 257 | + rf_results, gbm_results = {}, {} | |
| 258 | + features = [f for f in all_features if f in train.columns] | |
| 259 | + for target_label, target_col in TARGETS.items(): | |
| 260 | + tr = train[features + [target_col]].replace([np.inf, -np.inf], np.nan).dropna() | |
| 261 | + te = test[features + [target_col]].replace([np.inf, -np.inf], np.nan).dropna() | |
| 262 | + if len(tr) < 50 or len(te) < 20: | |
| 263 | + continue | |
| 264 | + | |
| 265 | + scaler = StandardScaler() | |
| 266 | + X_tr = scaler.fit_transform(tr[features].values) | |
| 267 | + y_tr = tr[target_col].values | |
| 268 | + X_te = scaler.transform(te[features].values) | |
| 269 | + y_te = te[target_col].values | |
| 270 | + | |
| 271 | + rf = RandomForestRegressor(n_estimators=200, max_depth=10, | |
| 272 | + min_samples_leaf=20, random_state=42, n_jobs=-1) | |
| 273 | + rf.fit(X_tr, y_tr) | |
| 274 | + y_pred_rf = np.maximum(rf.predict(X_te), 0) | |
| 275 | + rf_results[target_label] = {'mse': mean_squared_error(y_te, y_pred_rf), | |
| 276 | + 'mae': mean_absolute_error(y_te, y_pred_rf), | |
| 277 | + 'r2_oos': r2_score(y_te, y_pred_rf)} | |
| 278 | + print(f" RF → {target_label}: MSE={rf_results[target_label]['mse']:.10f}, " | |
| 279 | + f"R²_oos={rf_results[target_label]['r2_oos']:.4f}") | |
| 280 | + importances = pd.Series(rf.feature_importances_, index=features).sort_values(ascending=False) | |
| 281 | + print(f" Top 5 features: {dict(importances.head(5).round(4))}") | |
| 282 | + | |
| 283 | + gbm = GradientBoostingRegressor(n_estimators=200, max_depth=5, | |
| 284 | + learning_rate=0.05, subsample=0.8, | |
| 285 | + min_samples_leaf=20, random_state=42) | |
| 286 | + gbm.fit(X_tr, y_tr) | |
| 287 | + y_pred_gbm = np.maximum(gbm.predict(X_te), 0) | |
| 288 | + gbm_results[target_label] = {'mse': mean_squared_error(y_te, y_pred_gbm), | |
| 289 | + 'mae': mean_absolute_error(y_te, y_pred_gbm), | |
| 290 | + 'r2_oos': r2_score(y_te, y_pred_gbm)} | |
| 291 | + print(f" GBM → {target_label}: MSE={gbm_results[target_label]['mse']:.10f}, " | |
| 292 | + f"R²_oos={gbm_results[target_label]['r2_oos']:.4f}") | |
| 293 | + imp_gbm = pd.Series(gbm.feature_importances_, index=features).sort_values(ascending=False) | |
| 294 | + print(f" Top 5 features: {dict(imp_gbm.head(5).round(4))}") | |
| 295 | + | |
| 296 | + # ── Comparison table ── | |
| 297 | + print("\n" + "=" * 70) | |
| 298 | + print("COMPREHENSIVE MODEL COMPARISON (OUT-OF-SAMPLE)") | |
| 299 | + print("=" * 70) | |
| 300 | + comparison = [] | |
| 301 | + for target_label in TARGETS: | |
| 302 | + if target_label in vix_results: | |
| 303 | + v = vix_results[target_label] | |
| 304 | + comparison.append({'Model': 'VIX (benchmark)', 'Target': target_label, | |
| 305 | + 'MSE': v['mse'], 'MAE': v['mae'], 'R²_OOS': v['r2_oos']}) | |
| 306 | + for mn in ['HAR-RV', 'IV Surface', 'HAR + IV Surface']: | |
| 307 | + key = f"{mn}|{target_label}" | |
| 308 | + if key in ols_results: | |
| 309 | + r = ols_results[key] | |
| 310 | + comparison.append({'Model': f'OLS: {mn}', 'Target': target_label, | |
| 311 | + 'MSE': r['mse'], 'MAE': r['mae'], 'R²_OOS': r['r2_oos']}) | |
| 312 | + for label, res_dict in [('Random Forest', rf_results), | |
| 313 | + ('Gradient Boosting', gbm_results)]: | |
| 314 | + if target_label in res_dict: | |
| 315 | + r = res_dict[target_label] | |
| 316 | + comparison.append({'Model': label, 'Target': target_label, | |
| 317 | + 'MSE': r['mse'], 'MAE': r['mae'], 'R²_OOS': r['r2_oos']}) | |
| 318 | + | |
| 319 | + comp_df = pd.DataFrame(comparison) | |
| 320 | + comp_df.to_csv(config.RESULTS_DIR / "rq5_model_comparison.csv", index=False) | |
| 321 | + | |
| 322 | + for target_label in TARGETS: | |
| 323 | + sub = comp_df[comp_df['Target'] == target_label].copy() | |
| 324 | + sub['MSE'] = sub['MSE'].map(lambda x: f"{x:.10f}") | |
| 325 | + sub['MAE'] = sub['MAE'].map(lambda x: f"{x:.8f}") | |
| 326 | + sub['R²_OOS'] = sub['R²_OOS'].map(lambda x: f"{x:.4f}") | |
| 327 | + print(f"\n {target_label}:") | |
| 328 | + print(sub[['Model', 'MSE', 'MAE', 'R²_OOS']].to_string(index=False)) | |
| 329 | + | |
| 330 | + # ── Feature importance (RF, full training sample, 1-day RV) ── | |
| 331 | + print("\n--- FEATURE IMPORTANCE (RF, 1-Day RV target) ---") | |
| 332 | + tr_final = train[features + ['rv_fwd_1d']].replace([np.inf, -np.inf], np.nan).dropna() | |
| 333 | + scaler = StandardScaler() | |
| 334 | + X = scaler.fit_transform(tr_final[features].values) | |
| 335 | + y = tr_final['rv_fwd_1d'].values | |
| 336 | + rf_final = RandomForestRegressor(n_estimators=300, max_depth=10, | |
| 337 | + min_samples_leaf=20, random_state=42, n_jobs=-1) | |
| 338 | + rf_final.fit(X, y) | |
| 339 | + imp = pd.DataFrame({'feature': features, | |
| 340 | + 'importance': rf_final.feature_importances_}) \ | |
| 341 | + .sort_values('importance', ascending=False) | |
| 342 | + imp.to_csv(config.RESULTS_DIR / "rq5_feature_importance.csv", index=False) | |
| 343 | + print(imp.to_string(index=False)) | |
| 344 | + | |
| 345 | + print("\nRQ5 COMPLETE.") | |
| 346 | + | |
| 347 | + | |
| 348 | +if __name__ == "__main__": | |
| 349 | + try: | |
| 350 | + main() | |
| 351 | + except RawDataUnavailableError as exc: | |
| 352 | + print(f"\n[SKIPPED] {exc}", file=sys.stderr) | |
| 353 | + print("The shipped results/rq5_*.csv files remain authoritative.", file=sys.stderr) | |
| 354 | + sys.exit(2) | |
added
scripts/07_descriptive_stats.py
+190 −0
@@ -0,0 +1,190 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 07 — Extended descriptive statistics and data-quality analysis. | |
| 7 | + | |
| 8 | +Panels A–E and G run from the processed panel alone. Panel F (VIX regimes) | |
| 9 | +and Panel H (raw options data quality) additionally need the raw stores and | |
| 10 | +are skipped gracefully when those are absent. | |
| 11 | + | |
| 12 | +Inputs : data/processed/merged_options_rv.parquet | |
| 13 | + (+ index_5min.duckdb and options.duckdb for panels F/H) | |
| 14 | +Outputs: results/descriptive_*.csv (8 tables) | |
| 15 | +""" | |
| 16 | + | |
| 17 | +import warnings | |
| 18 | + | |
| 19 | +import pandas as pd | |
| 20 | + | |
| 21 | +import _bootstrap # noqa: F401 | |
| 22 | +from wp7 import config | |
| 23 | +from wp7.data_io import RawDataUnavailableError, load_merged, load_vix_daily, open_raw_db | |
| 24 | + | |
| 25 | +warnings.filterwarnings('ignore') | |
| 26 | + | |
| 27 | +SUMMARY_VARS = [ | |
| 28 | + 'iv_atm_30d', 'iv_atm_90d', 'iv_term_slope', 'iv_skew_25d', | |
| 29 | + 'implied_skewness', 'implied_kurtosis_proxy', | |
| 30 | + 'pc_volume_ratio', 'pc_oi_ratio', 'net_gamma_exposure', | |
| 31 | + 'avg_vega_30d', 'avg_theta_30d', 'total_option_volume', 'total_oi', | |
| 32 | + 'rv_daily', 'rvol_daily', 'rv_weekly', 'daily_return', | |
| 33 | + 'realized_skew', 'realized_kurt', | |
| 34 | + 'ret_1d', 'ret_5d', 'rv_fwd_1d', 'rv_fwd_5d', | |
| 35 | +] | |
| 36 | + | |
| 37 | +CORR_VARS = ['iv_atm_30d', 'iv_term_slope', 'iv_skew_25d', 'implied_skewness', | |
| 38 | + 'implied_kurtosis_proxy', 'pc_volume_ratio', 'pc_oi_ratio', | |
| 39 | + 'rv_daily', 'rv_weekly', 'ret_1d', 'ret_5d'] | |
| 40 | + | |
| 41 | +AUTOCORR_VARS = ['iv_atm_30d', 'iv_skew_25d', 'rv_daily', 'daily_return', 'pc_volume_ratio'] | |
| 42 | + | |
| 43 | + | |
| 44 | +def group_stats(data: pd.DataFrame, label: str) -> dict: | |
| 45 | + """One summary row per asset group.""" | |
| 46 | + return { | |
| 47 | + 'Group': label, | |
| 48 | + 'N_obs': len(data), | |
| 49 | + 'N_tickers': data['ticker'].nunique(), | |
| 50 | + 'Date_min': str(data['trade_date'].min().date()), | |
| 51 | + 'Date_max': str(data['trade_date'].max().date()), | |
| 52 | + 'Mean_IV_ATM': data['iv_atm_30d'].mean(), | |
| 53 | + 'Std_IV_ATM': data['iv_atm_30d'].std(), | |
| 54 | + 'Mean_RV': data['rv_daily'].mean(), | |
| 55 | + 'Mean_Skew': data['iv_skew_25d'].mean(), | |
| 56 | + 'Mean_Ret_1d': data['ret_1d'].mean(), | |
| 57 | + 'Std_Ret_1d': data['ret_1d'].std(), | |
| 58 | + 'Mean_PC_ratio': data['pc_volume_ratio'].mean(), | |
| 59 | + } | |
| 60 | + | |
| 61 | + | |
| 62 | +def main(): | |
| 63 | + print("=" * 70) | |
| 64 | + print("EXTENDED DESCRIPTIVE STATISTICS") | |
| 65 | + print("=" * 70) | |
| 66 | + config.ensure_output_dirs() | |
| 67 | + res_dir = config.RESULTS_DIR | |
| 68 | + | |
| 69 | + df = load_merged() | |
| 70 | + df['year'] = df['trade_date'].dt.year | |
| 71 | + | |
| 72 | + # ── Panel A: summary statistics ── | |
| 73 | + print("\n--- PANEL A: SUMMARY STATISTICS ---") | |
| 74 | + summary = df[SUMMARY_VARS].describe( | |
| 75 | + percentiles=[0.01, 0.05, 0.25, 0.5, 0.75, 0.95, 0.99]).T | |
| 76 | + summary['skewness'] = df[SUMMARY_VARS].skew() | |
| 77 | + summary['kurtosis'] = df[SUMMARY_VARS].kurtosis() | |
| 78 | + summary['pct_missing'] = df[SUMMARY_VARS].isnull().mean() * 100 | |
| 79 | + summary.to_csv(res_dir / "descriptive_summary_stats.csv") | |
| 80 | + print(summary[['count', 'mean', 'std', '1%', '50%', '99%', | |
| 81 | + 'skewness', 'kurtosis', 'pct_missing']].round(4).to_string()) | |
| 82 | + | |
| 83 | + # ── Panel B: coverage by year ── | |
| 84 | + print("\n--- PANEL B: COVERAGE BY YEAR ---") | |
| 85 | + coverage = df.groupby('year').agg( | |
| 86 | + n_obs=('ticker', 'count'), | |
| 87 | + n_tickers=('ticker', 'nunique'), | |
| 88 | + avg_iv_atm=('iv_atm_30d', 'mean'), | |
| 89 | + avg_rv=('rv_daily', 'mean'), | |
| 90 | + avg_skew=('iv_skew_25d', 'mean'), | |
| 91 | + avg_ret=('daily_return', 'mean'), | |
| 92 | + std_ret=('daily_return', 'std'), | |
| 93 | + ).round(6) | |
| 94 | + coverage.to_csv(res_dir / "descriptive_coverage_by_year.csv") | |
| 95 | + print(coverage.to_string()) | |
| 96 | + | |
| 97 | + # ── Panel C: coverage by asset group ── | |
| 98 | + print("\n--- PANEL C: BY ASSET GROUP ---") | |
| 99 | + stocks_list = [t for t in df['ticker'].unique() if t not in config.NON_STOCK_TICKERS] | |
| 100 | + groups = pd.DataFrame([ | |
| 101 | + group_stats(df[df['ticker'].isin(stocks_list)], 'Stocks'), | |
| 102 | + group_stats(df[df['ticker'].isin(config.ETF_TICKERS)], 'ETFs'), | |
| 103 | + group_stats(df[df['ticker'].isin(config.INDEX_OPTION_TICKERS)], 'Indices'), | |
| 104 | + group_stats(df, 'All'), | |
| 105 | + ]) | |
| 106 | + groups.to_csv(res_dir / "descriptive_by_group.csv", index=False) | |
| 107 | + print(groups.to_string(index=False)) | |
| 108 | + | |
| 109 | + # ── Panel D: correlation matrix ── | |
| 110 | + print("\n--- PANEL D: CORRELATION MATRIX ---") | |
| 111 | + corr_matrix = df[CORR_VARS].corr().round(3) | |
| 112 | + corr_matrix.to_csv(res_dir / "descriptive_correlation_matrix.csv") | |
| 113 | + print(corr_matrix.to_string()) | |
| 114 | + | |
| 115 | + # ── Panel E: autocorrelation structure ── | |
| 116 | + print("\n--- PANEL E: AUTOCORRELATION STRUCTURE ---") | |
| 117 | + autocorr_results = [] | |
| 118 | + for var in AUTOCORR_VARS: | |
| 119 | + for lag in [1, 5, 10, 22]: | |
| 120 | + ac = df.groupby('ticker')[var].apply(lambda x: x.autocorr(lag=lag)).mean() | |
| 121 | + autocorr_results.append({'variable': var, 'lag': lag, 'avg_autocorr': ac}) | |
| 122 | + autocorr_df = pd.DataFrame(autocorr_results) | |
| 123 | + autocorr_df.to_csv(res_dir / "descriptive_autocorrelations.csv", index=False) | |
| 124 | + print(autocorr_df.pivot(index='variable', columns='lag', values='avg_autocorr') | |
| 125 | + .round(4).to_string()) | |
| 126 | + | |
| 127 | + # ── Panel G: cross-sectional dispersion by year ── | |
| 128 | + print("\n--- PANEL G: CROSS-SECTIONAL DISPERSION ---") | |
| 129 | + cs_disp = df.groupby('year').agg( | |
| 130 | + iv_atm_cs_std=('iv_atm_30d', 'std'), | |
| 131 | + skew_cs_std=('iv_skew_25d', 'std'), | |
| 132 | + rv_cs_std=('rv_daily', 'std'), | |
| 133 | + ret_cs_std=('daily_return', 'std'), | |
| 134 | + n_tickers=('ticker', 'nunique'), | |
| 135 | + ).round(6) | |
| 136 | + cs_disp.to_csv(res_dir / "descriptive_cross_sectional_dispersion.csv") | |
| 137 | + print(cs_disp.to_string()) | |
| 138 | + | |
| 139 | + # ── Panel F: statistics by VIX regime (needs raw VIX series) ── | |
| 140 | + print("\n--- PANEL F: STATISTICS BY VIX REGIME ---") | |
| 141 | + try: | |
| 142 | + vix = load_vix_daily() | |
| 143 | + dfv = df.merge(vix, on='trade_date', how='left') | |
| 144 | + dfv['vix_regime'] = pd.cut(dfv['vix_close'], bins=config.VIX_REGIME_BINS, | |
| 145 | + labels=config.VIX_REGIME_LABELS_VERBOSE) | |
| 146 | + regime_stats = dfv.groupby('vix_regime', observed=True).agg( | |
| 147 | + n_obs=('ticker', 'count'), | |
| 148 | + pct_obs=('ticker', lambda x: len(x) / len(dfv) * 100), | |
| 149 | + mean_iv_atm=('iv_atm_30d', 'mean'), | |
| 150 | + mean_rv=('rv_daily', 'mean'), | |
| 151 | + mean_skew=('iv_skew_25d', 'mean'), | |
| 152 | + mean_ret_1d=('ret_1d', 'mean'), | |
| 153 | + std_ret_1d=('ret_1d', 'std'), | |
| 154 | + mean_pc_ratio=('pc_volume_ratio', 'mean'), | |
| 155 | + mean_impl_skew=('implied_skewness', 'mean'), | |
| 156 | + ).round(6) | |
| 157 | + regime_stats.to_csv(res_dir / "descriptive_vix_regimes.csv") | |
| 158 | + print(regime_stats.to_string()) | |
| 159 | + except RawDataUnavailableError as exc: | |
| 160 | + print(f" [Panel F skipped — raw stores unavailable]\n {exc}") | |
| 161 | + | |
| 162 | + # ── Panel H: raw options data quality (needs options.duckdb) ── | |
| 163 | + print("\n--- PANEL H: OPTIONS DATA QUALITY ---") | |
| 164 | + try: | |
| 165 | + opt_con = open_raw_db("options") | |
| 166 | + quality = opt_con.execute(""" | |
| 167 | + SELECT | |
| 168 | + EXTRACT(YEAR FROM trade_date) AS year, | |
| 169 | + COUNT(*) AS n_records, | |
| 170 | + COUNT(DISTINCT ticker) AS n_tickers, | |
| 171 | + AVG(CASE WHEN bid_iv > 0 AND ask_iv > 0 THEN 1.0 ELSE 0.0 END) AS pct_valid_iv, | |
| 172 | + AVG(CASE WHEN volume > 0 THEN 1.0 ELSE 0.0 END) AS pct_with_volume, | |
| 173 | + AVG(CASE WHEN open_interest > 0 THEN 1.0 ELSE 0.0 END) AS pct_with_oi, | |
| 174 | + AVG(CASE WHEN delta IS NOT NULL AND delta != 0 THEN 1.0 ELSE 0.0 END) AS pct_valid_greeks, | |
| 175 | + AVG(ask_price - bid_price) AS avg_spread | |
| 176 | + FROM option_chain | |
| 177 | + GROUP BY year | |
| 178 | + ORDER BY year | |
| 179 | + """).fetchdf() | |
| 180 | + opt_con.close() | |
| 181 | + quality.to_csv(res_dir / "descriptive_options_quality.csv", index=False) | |
| 182 | + print(quality.round(4).to_string(index=False)) | |
| 183 | + except RawDataUnavailableError as exc: | |
| 184 | + print(f" [Panel H skipped — raw stores unavailable]\n {exc}") | |
| 185 | + | |
| 186 | + print("\nDESCRIPTIVE STATISTICS COMPLETE.") | |
| 187 | + | |
| 188 | + | |
| 189 | +if __name__ == "__main__": | |
| 190 | + main() | |
added
scripts/08_subperiod_regime.py
+156 −0
@@ -0,0 +1,156 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 08 — Subperiod and regime analysis: stability across market | |
| 7 | +conditions. | |
| 8 | + | |
| 9 | +Sections A (nine subperiods), C (252-day rolling R²) and D (pre/post COVID) | |
| 10 | +run from the processed panel. Section B (VIX-regime conditioning) needs the | |
| 11 | +raw VIX series and is skipped gracefully when the raw stores are absent. | |
| 12 | + | |
| 13 | +Inputs : data/processed/merged_options_rv.parquet | |
| 14 | + (+ index_5min.duckdb for section B) | |
| 15 | +Outputs: results/subperiod_results.csv, results/regime_results.csv, | |
| 16 | + results/rolling_r2.csv, results/pre_post_covid.csv | |
| 17 | +""" | |
| 18 | + | |
| 19 | +import warnings | |
| 20 | + | |
| 21 | +import pandas as pd | |
| 22 | + | |
| 23 | +import _bootstrap # noqa: F401 | |
| 24 | +from wp7 import config | |
| 25 | +from wp7.data_io import RawDataUnavailableError, load_merged, load_vix_daily | |
| 26 | +from wp7.econometrics import pooled_regression_summary | |
| 27 | + | |
| 28 | +warnings.filterwarnings('ignore') | |
| 29 | + | |
| 30 | +FEATURES = config.RQ1_FEATURES | |
| 31 | +RV_MODELS = [('HAR-RV', config.HAR_FEATURES), | |
| 32 | + ('HAR+IV', config.HAR_FEATURES + config.IV_FEATURES)] | |
| 33 | + | |
| 34 | + | |
| 35 | +def main(): | |
| 36 | + print("=" * 70) | |
| 37 | + print("SUBPERIOD & REGIME ANALYSIS") | |
| 38 | + print("=" * 70) | |
| 39 | + config.ensure_output_dirs() | |
| 40 | + | |
| 41 | + df = load_merged() | |
| 42 | + | |
| 43 | + # ── A. Subperiod analysis ── | |
| 44 | + print("\n--- A. SUBPERIOD ANALYSIS ---") | |
| 45 | + subperiod_results = [] | |
| 46 | + for name, (start, end) in config.SUBPERIODS.items(): | |
| 47 | + sub_data = df[(df['trade_date'] >= start) & (df['trade_date'] <= end)] | |
| 48 | + for target, horizon in [('ret_1d', '1D'), ('ret_5d', '5D')]: | |
| 49 | + res = pooled_regression_summary(sub_data, FEATURES, target, f"{name}|{horizon}") | |
| 50 | + if res: | |
| 51 | + res['subperiod'] = name | |
| 52 | + res['horizon'] = horizon | |
| 53 | + subperiod_results.append(res) | |
| 54 | + print(f" {name} | {horizon}: R²={res['r2']:.6f}, " | |
| 55 | + f"N={res['n_obs']:,}, Sig={res['n_significant']}") | |
| 56 | + | |
| 57 | + print("\n RV Forecasting by subperiod:") | |
| 58 | + for name, (start, end) in config.SUBPERIODS.items(): | |
| 59 | + sub_data = df[(df['trade_date'] >= start) & (df['trade_date'] <= end)] | |
| 60 | + for model_name, feats in RV_MODELS: | |
| 61 | + res = pooled_regression_summary(sub_data, feats, 'rv_fwd_1d', | |
| 62 | + f"{name}|{model_name}") | |
| 63 | + if res: | |
| 64 | + res['subperiod'] = name | |
| 65 | + res['model'] = model_name | |
| 66 | + subperiod_results.append(res) | |
| 67 | + print(f" {name} | {model_name}: R²={res['r2']:.6f}") | |
| 68 | + | |
| 69 | + pd.DataFrame(subperiod_results).to_csv( | |
| 70 | + config.RESULTS_DIR / "subperiod_results.csv", index=False) | |
| 71 | + | |
| 72 | + # ── B. VIX regime analysis (needs raw VIX series) ── | |
| 73 | + print("\n--- B. VIX REGIME ANALYSIS ---") | |
| 74 | + try: | |
| 75 | + vix = load_vix_daily() | |
| 76 | + dfv = df.merge(vix, on='trade_date', how='left') | |
| 77 | + dfv['vix_regime'] = pd.cut(dfv['vix_close'], bins=config.VIX_REGIME_BINS, | |
| 78 | + labels=config.VIX_REGIME_LABELS) | |
| 79 | + regime_results = [] | |
| 80 | + for regime in config.VIX_REGIME_LABELS: | |
| 81 | + sub_data = dfv[dfv['vix_regime'] == regime] | |
| 82 | + if len(sub_data) < 200: | |
| 83 | + continue | |
| 84 | + for target, horizon in [('ret_1d', '1D'), ('ret_5d', '5D'), | |
| 85 | + ('rv_fwd_1d', 'RV_1D')]: | |
| 86 | + feats = FEATURES if 'ret' in target else \ | |
| 87 | + config.HAR_FEATURES + config.IV_FEATURES | |
| 88 | + res = pooled_regression_summary(sub_data, feats, target, | |
| 89 | + f"VIX_{regime}|{horizon}") | |
| 90 | + if res: | |
| 91 | + res['regime'] = regime | |
| 92 | + res['target'] = horizon | |
| 93 | + regime_results.append(res) | |
| 94 | + print(f" VIX {regime} | {horizon}: R²={res['r2']:.6f}, " | |
| 95 | + f"N={res['n_obs']:,}") | |
| 96 | + if regime_results: | |
| 97 | + pd.DataFrame(regime_results).to_csv( | |
| 98 | + config.RESULTS_DIR / "regime_results.csv", index=False) | |
| 99 | + except RawDataUnavailableError as exc: | |
| 100 | + print(f" [Section B skipped — raw stores unavailable; " | |
| 101 | + f"existing regime_results.csv left untouched]\n {exc}") | |
| 102 | + | |
| 103 | + # ── C. Rolling-window R² (252-day window, 63-day step) ── | |
| 104 | + print("\n--- C. ROLLING WINDOW R² (252-day) ---") | |
| 105 | + rolling_r2 = [] | |
| 106 | + dates_sorted = sorted(df['trade_date'].unique()) | |
| 107 | + for i in range(252, len(dates_sorted), 63): | |
| 108 | + window_start = dates_sorted[max(0, i - 252)] | |
| 109 | + window_end = dates_sorted[i] | |
| 110 | + sub_data = df[(df['trade_date'] > window_start) & (df['trade_date'] <= window_end)] | |
| 111 | + | |
| 112 | + for target, horizon in [('ret_5d', '5D_Return'), ('rv_fwd_1d', '1D_RV')]: | |
| 113 | + feats = FEATURES if target == 'ret_5d' else \ | |
| 114 | + config.HAR_FEATURES + config.IV_FEATURES | |
| 115 | + res = pooled_regression_summary(sub_data, feats, target, "Rolling") | |
| 116 | + if res: | |
| 117 | + rolling_r2.append({'date': window_end, 'target': horizon, | |
| 118 | + 'r2': res['r2'], 'n_obs': res['n_obs']}) | |
| 119 | + | |
| 120 | + rolling_df = pd.DataFrame(rolling_r2) | |
| 121 | + rolling_df.to_csv(config.RESULTS_DIR / "rolling_r2.csv", index=False) | |
| 122 | + print(f" {len(rolling_df)} rolling windows computed") | |
| 123 | + for target in rolling_df['target'].unique(): | |
| 124 | + sub = rolling_df[rolling_df['target'] == target] | |
| 125 | + print(f"\n {target}: mean R²={sub['r2'].mean():.6f}, " | |
| 126 | + f"min={sub['r2'].min():.6f}, max={sub['r2'].max():.6f}, " | |
| 127 | + f"std={sub['r2'].std():.6f}") | |
| 128 | + | |
| 129 | + # ── D. Pre vs post COVID ── | |
| 130 | + print("\n--- D. PRE vs POST COVID COMPARISON ---") | |
| 131 | + pre_covid = df[df['trade_date'] < '2020-03-01'] | |
| 132 | + post_covid = df[df['trade_date'] >= '2020-03-01'] | |
| 133 | + | |
| 134 | + comparison_rows = [] | |
| 135 | + for period_name, period_data in [('Pre-COVID', pre_covid), ('Post-COVID', post_covid)]: | |
| 136 | + for target, horizon in [('ret_1d', '1D'), ('ret_5d', '5D')]: | |
| 137 | + res = pooled_regression_summary(period_data, FEATURES, target, | |
| 138 | + f"{period_name}|{horizon}") | |
| 139 | + if res: | |
| 140 | + comparison_rows.append({**res, 'period': period_name, 'target': horizon}) | |
| 141 | + print(f" {period_name} | {horizon}: R²={res['r2']:.6f}") | |
| 142 | + for model_name, feats in RV_MODELS: | |
| 143 | + res = pooled_regression_summary(period_data, feats, 'rv_fwd_1d', | |
| 144 | + f"{period_name}|{model_name}") | |
| 145 | + if res: | |
| 146 | + comparison_rows.append({**res, 'period': period_name, 'target': model_name}) | |
| 147 | + print(f" {period_name} | {model_name}: R²={res['r2']:.6f}") | |
| 148 | + | |
| 149 | + pd.DataFrame(comparison_rows).to_csv( | |
| 150 | + config.RESULTS_DIR / "pre_post_covid.csv", index=False) | |
| 151 | + | |
| 152 | + print("\nSUBPERIOD & REGIME ANALYSIS COMPLETE.") | |
| 153 | + | |
| 154 | + | |
| 155 | +if __name__ == "__main__": | |
| 156 | + main() | |
added
scripts/09_portfolio_sorts.py
+134 −0
@@ -0,0 +1,134 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 09 — Portfolio sorts and economic significance. | |
| 7 | + | |
| 8 | +Daily equal-weighted quintile sorts on each option-implied variable | |
| 9 | +(long-short Q5−Q1 performance), a 3×3 double sort on ATM IV × implied | |
| 10 | +skewness, and transaction-cost sensitivity of the implied-skewness strategy. | |
| 11 | + | |
| 12 | +Inputs : data/processed/merged_options_rv.parquet | |
| 13 | +Outputs: results/portfolio_sort_results.csv, results/double_sort_iv_skew.csv, | |
| 14 | + results/transaction_cost_analysis.csv | |
| 15 | +""" | |
| 16 | + | |
| 17 | +import warnings | |
| 18 | + | |
| 19 | +import numpy as np | |
| 20 | +import pandas as pd | |
| 21 | + | |
| 22 | +import _bootstrap # noqa: F401 | |
| 23 | +from wp7 import config | |
| 24 | +from wp7.data_io import load_merged | |
| 25 | +from wp7.portfolio import double_sort, portfolio_sort | |
| 26 | + | |
| 27 | +warnings.filterwarnings('ignore') | |
| 28 | + | |
| 29 | + | |
| 30 | +def main(): | |
| 31 | + print("=" * 70) | |
| 32 | + print("PORTFOLIO SORTS & ECONOMIC SIGNIFICANCE") | |
| 33 | + print("=" * 70) | |
| 34 | + config.ensure_output_dirs() | |
| 35 | + | |
| 36 | + df = load_merged() | |
| 37 | + stocks = df[~df['ticker'].isin(config.NON_STOCK_TICKERS)].copy() | |
| 38 | + | |
| 39 | + # ── Single sorts ── | |
| 40 | + all_sort_results = [] | |
| 41 | + for sort_var, sort_label in config.SORT_VARIABLES.items(): | |
| 42 | + for ret_var, ret_label in [('ret_1d', '1-Day'), ('ret_5d', '5-Day')]: | |
| 43 | + res = portfolio_sort(stocks, sort_var, ret_var, n_quantiles=5) | |
| 44 | + if res is None: | |
| 45 | + continue | |
| 46 | + | |
| 47 | + print(f"\n {sort_label} → {ret_label} Returns:") | |
| 48 | + print(f" {'Q':>6} {'Mean(bps)':>10} {'Ann.Ret%':>10} {'Ann.Vol%':>10} " | |
| 49 | + f"{'Sharpe':>8} {'t-stat':>8} {'N':>6}") | |
| 50 | + | |
| 51 | + for q in [1, 2, 3, 4, 5, 'LS_5_1']: | |
| 52 | + if q not in res: | |
| 53 | + continue | |
| 54 | + r = res[q] | |
| 55 | + q_label = f"Q{q}" if isinstance(q, int) else "L/S(5-1)" | |
| 56 | + print(f" {q_label:>6} {r['mean_daily']*10000:>10.2f} " | |
| 57 | + f"{r['annualized_return']*100:>10.2f} " | |
| 58 | + f"{r['annualized_vol']*100:>10.2f} {r['sharpe']:>8.3f} " | |
| 59 | + f"{r['t_stat']:>8.3f} {r['n_days']:>6}") | |
| 60 | + | |
| 61 | + all_sort_results.append({ | |
| 62 | + 'sort_variable': sort_label, | |
| 63 | + 'return_horizon': ret_label, | |
| 64 | + 'quintile': q_label, | |
| 65 | + 'mean_daily_bps': r['mean_daily'] * 10000, | |
| 66 | + 'annualized_return_pct': r['annualized_return'] * 100, | |
| 67 | + 'annualized_vol_pct': r['annualized_vol'] * 100, | |
| 68 | + 'sharpe_ratio': r['sharpe'], | |
| 69 | + 't_statistic': r['t_stat'], | |
| 70 | + 'n_days': r['n_days'], | |
| 71 | + 'pct_positive': r['pct_positive'], | |
| 72 | + 'max_drawdown_pct': r['max_drawdown'] * 100, | |
| 73 | + }) | |
| 74 | + | |
| 75 | + sort_df = pd.DataFrame(all_sort_results) | |
| 76 | + sort_df.to_csv(config.RESULTS_DIR / "portfolio_sort_results.csv", index=False) | |
| 77 | + | |
| 78 | + print("\n" + "=" * 70) | |
| 79 | + print("LONG-SHORT PORTFOLIO SUMMARY (Q5 - Q1)") | |
| 80 | + print("=" * 70) | |
| 81 | + ls = sort_df[sort_df['quintile'] == 'L/S(5-1)'].copy() | |
| 82 | + print(ls[['sort_variable', 'return_horizon', 'mean_daily_bps', | |
| 83 | + 'annualized_return_pct', 'sharpe_ratio', 't_statistic']] | |
| 84 | + .round(3).to_string(index=False)) | |
| 85 | + | |
| 86 | + # ── Double sort: ATM IV × implied skewness → 5-day returns ── | |
| 87 | + print("\n" + "=" * 70) | |
| 88 | + print("DOUBLE SORT: IV_ATM x IMPLIED_SKEWNESS → 5-Day Returns") | |
| 89 | + print("=" * 70) | |
| 90 | + ds = stocks[['iv_atm_30d', 'implied_skewness', 'ret_5d', 'ticker', 'trade_date']].dropna() | |
| 91 | + ds_results = double_sort(ds, 'iv_atm_30d', 'implied_skewness', 'ret_5d') | |
| 92 | + | |
| 93 | + ds_pivot = ds_results.pivot(index='q1', columns='q2', values='mean_bps') | |
| 94 | + ds_pivot.index = ['Low IV', 'Med IV', 'High IV'] | |
| 95 | + ds_pivot.columns = ['Low Skew', 'Med Skew', 'High Skew'] | |
| 96 | + print(ds_pivot.round(2).to_string()) | |
| 97 | + | |
| 98 | + ds_t = ds_results.pivot(index='q1', columns='q2', values='t_stat') | |
| 99 | + ds_t.index = ['Low IV', 'Med IV', 'High IV'] | |
| 100 | + ds_t.columns = ['Low Skew', 'Med Skew', 'High Skew'] | |
| 101 | + print("\nt-statistics:") | |
| 102 | + print(ds_t.round(3).to_string()) | |
| 103 | + | |
| 104 | + ds_results.to_csv(config.RESULTS_DIR / "double_sort_iv_skew.csv", index=False) | |
| 105 | + | |
| 106 | + # ── Transaction-cost sensitivity (implied-skewness L/S, weekly) ── | |
| 107 | + print("\n" + "=" * 70) | |
| 108 | + print("TRANSACTION COST SENSITIVITY (Long-Short on Implied Skewness, 5D)") | |
| 109 | + print("=" * 70) | |
| 110 | + res_skew = portfolio_sort(stocks, 'implied_skewness', 'ret_5d', n_quantiles=5) | |
| 111 | + if res_skew and 'LS_5_1' in res_skew: | |
| 112 | + ls_gross = res_skew['LS_5_1'] | |
| 113 | + print(f" {'TC (bps)':>10} {'Net Ret(bps)':>12} {'Ann.Ret%':>10} {'Sharpe':>8}") | |
| 114 | + tc_results = [] | |
| 115 | + for tc_bps in [0, 5, 10, 15, 20, 30, 50]: | |
| 116 | + # Weekly rebalance: full two-sided turnover spread over 5 days | |
| 117 | + turnover_per_day = 2.0 / 5 | |
| 118 | + daily_tc = tc_bps / 10000 * turnover_per_day | |
| 119 | + net_daily = ls_gross['mean_daily'] - daily_tc | |
| 120 | + net_ann = net_daily * 52 | |
| 121 | + net_sharpe = (net_daily / ls_gross['std_daily'] * np.sqrt(52)) \ | |
| 122 | + if ls_gross['std_daily'] > 0 else 0 | |
| 123 | + print(f" {tc_bps:>10} {net_daily*10000:>12.2f} " | |
| 124 | + f"{net_ann*100:>10.2f} {net_sharpe:>8.3f}") | |
| 125 | + tc_results.append({'tc_bps': tc_bps, 'net_daily_bps': net_daily * 10000, | |
| 126 | + 'net_ann_ret_pct': net_ann * 100, 'net_sharpe': net_sharpe}) | |
| 127 | + pd.DataFrame(tc_results).to_csv( | |
| 128 | + config.RESULTS_DIR / "transaction_cost_analysis.csv", index=False) | |
| 129 | + | |
| 130 | + print("\nPORTFOLIO SORTS COMPLETE.") | |
| 131 | + | |
| 132 | + | |
| 133 | +if __name__ == "__main__": | |
| 134 | + main() | |
added
scripts/10_robustness.py
+232 −0
@@ -0,0 +1,232 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 10 — Robustness checks. | |
| 7 | + | |
| 8 | +A. Newey-West HAC(5) standard errors | |
| 9 | +B. Double-clustered (ticker + date) standard errors, CGM (2011) | |
| 10 | +C. Additional control variables (volume, OI, lagged returns) | |
| 11 | +D. Quantile regressions (IRLS) at τ ∈ {0.10, 0.25, 0.50, 0.75, 0.90} | |
| 12 | +E. Excluding high-VIX periods (needs the raw VIX series; console-only) | |
| 13 | +F. Ticker-by-ticker R² distribution | |
| 14 | + | |
| 15 | +Note: the original implementation of section D materialized an n×n diagonal | |
| 16 | +weight matrix (~97 GB at this sample size) and could not complete; the IRLS | |
| 17 | +weighting is now applied by broadcasting — mathematically identical — so | |
| 18 | +sections D and F produce the two result files that were missing from the | |
| 19 | +original archive (see AUDIT.md §6.2). | |
| 20 | + | |
| 21 | +Inputs : data/processed/merged_options_rv.parquet | |
| 22 | + (+ index_5min.duckdb for section E) | |
| 23 | +Outputs: results/robustness_newey_west.csv, | |
| 24 | + results/robustness_double_clustered.csv, | |
| 25 | + results/robustness_with_controls.csv, | |
| 26 | + results/robustness_quantile_regression.csv, | |
| 27 | + results/robustness_ticker_r2.csv | |
| 28 | +""" | |
| 29 | + | |
| 30 | +import warnings | |
| 31 | + | |
| 32 | +import numpy as np | |
| 33 | +import pandas as pd | |
| 34 | + | |
| 35 | +import _bootstrap # noqa: F401 | |
| 36 | +from wp7 import config | |
| 37 | +from wp7.data_io import RawDataUnavailableError, load_merged, load_vix_daily | |
| 38 | +from wp7.econometrics import (add_constant, double_clustered_tstats, hc1_tstats, | |
| 39 | + newey_west_tstats, ols, quantile_regression, | |
| 40 | + r_squared, standardize, winsorize) | |
| 41 | + | |
| 42 | +warnings.filterwarnings('ignore') | |
| 43 | + | |
| 44 | +FEATURES = config.RQ1_FEATURES | |
| 45 | +HORIZONS = [('ret_1d', '1-Day'), ('ret_5d', '5-Day')] | |
| 46 | + | |
| 47 | + | |
| 48 | +def prepare(data: pd.DataFrame, features: list, target: str, | |
| 49 | + keep: tuple = ()) -> pd.DataFrame: | |
| 50 | + """Drop incomplete rows and winsorize features and target at 1%/99%.""" | |
| 51 | + sub = data[features + [target, *keep]].dropna() | |
| 52 | + for f in features: | |
| 53 | + sub[f] = winsorize(sub[f]) | |
| 54 | + sub[target] = winsorize(sub[target]) | |
| 55 | + return sub | |
| 56 | + | |
| 57 | + | |
| 58 | +def main(): | |
| 59 | + print("=" * 70) | |
| 60 | + print("ROBUSTNESS CHECKS") | |
| 61 | + print("=" * 70) | |
| 62 | + config.ensure_output_dirs() | |
| 63 | + | |
| 64 | + df = load_merged() | |
| 65 | + | |
| 66 | + # ── A. Newey-West HAC standard errors ── | |
| 67 | + print("\n--- A. NEWEY-WEST HAC STANDARD ERRORS (lag=5) ---") | |
| 68 | + nw_results = [] | |
| 69 | + for target, horizon in HORIZONS: | |
| 70 | + sub = prepare(df, FEATURES, target) | |
| 71 | + X = add_constant(standardize(sub[FEATURES].values)) | |
| 72 | + y = sub[target].values | |
| 73 | + coefs = ols(X, y) | |
| 74 | + se, t_stats = newey_west_tstats(X, y, coefs, n_lags=5) | |
| 75 | + r2 = r_squared(y, X @ coefs) | |
| 76 | + | |
| 77 | + res_df = pd.DataFrame({ | |
| 78 | + 'variable': ['const'] + FEATURES, | |
| 79 | + 'coefficient': coefs, | |
| 80 | + 'nw_se': se, | |
| 81 | + 'nw_t_stat': t_stats, | |
| 82 | + 'nw_sig_5pct': np.abs(t_stats) > 1.96, | |
| 83 | + }) | |
| 84 | + res_df['target'] = horizon | |
| 85 | + res_df['method'] = 'Newey-West(5)' | |
| 86 | + nw_results.append(res_df) | |
| 87 | + | |
| 88 | + sig = res_df[(res_df['nw_sig_5pct']) & (res_df['variable'] != 'const')] | |
| 89 | + print(f"\n {horizon}: R²={r2:.6f}, N={len(sub):,}") | |
| 90 | + print(f" Significant (NW): {', '.join(sig['variable'].tolist())}") | |
| 91 | + for _, row in res_df.iterrows(): | |
| 92 | + star = "**" if abs(row['nw_t_stat']) > 2.576 else \ | |
| 93 | + ("*" if abs(row['nw_t_stat']) > 1.96 else "") | |
| 94 | + print(f" {row['variable']:25s}: β={row['coefficient']:9.6f} " | |
| 95 | + f"t_NW={row['nw_t_stat']:7.3f} {star}") | |
| 96 | + | |
| 97 | + pd.concat(nw_results, ignore_index=True).to_csv( | |
| 98 | + config.RESULTS_DIR / "robustness_newey_west.csv", index=False) | |
| 99 | + | |
| 100 | + # ── B. Double-clustered standard errors (ticker + date) ── | |
| 101 | + print("\n--- B. DOUBLE-CLUSTERED SE (ticker + date) ---") | |
| 102 | + dc_results = [] | |
| 103 | + for target, horizon in HORIZONS: | |
| 104 | + sub = prepare(df, FEATURES, target, keep=('ticker', 'trade_date')) | |
| 105 | + X = add_constant(standardize(sub[FEATURES].values)) | |
| 106 | + y = sub[target].values | |
| 107 | + coefs = ols(X, y) | |
| 108 | + se, t_stats = double_clustered_tstats( | |
| 109 | + X, y, coefs, sub['ticker'].values, sub['trade_date'].values) | |
| 110 | + r2 = r_squared(y, X @ coefs) | |
| 111 | + | |
| 112 | + res_df = pd.DataFrame({ | |
| 113 | + 'variable': ['const'] + FEATURES, | |
| 114 | + 'coefficient': coefs, | |
| 115 | + 'dc_se': se, | |
| 116 | + 'dc_t_stat': t_stats, | |
| 117 | + 'dc_sig_5pct': np.abs(t_stats) > 1.96, | |
| 118 | + }) | |
| 119 | + res_df['target'] = horizon | |
| 120 | + dc_results.append(res_df) | |
| 121 | + | |
| 122 | + sig = res_df[(res_df['dc_sig_5pct']) & (res_df['variable'] != 'const')] | |
| 123 | + print(f"\n {horizon}: R²={r2:.6f}, N={len(sub):,}") | |
| 124 | + print(f" Significant (DC): {', '.join(sig['variable'].tolist())}") | |
| 125 | + for _, row in res_df.iterrows(): | |
| 126 | + star = "**" if abs(row['dc_t_stat']) > 2.576 else \ | |
| 127 | + ("*" if abs(row['dc_t_stat']) > 1.96 else "") | |
| 128 | + print(f" {row['variable']:25s}: β={row['coefficient']:9.6f} " | |
| 129 | + f"t_DC={row['dc_t_stat']:7.3f} {star}") | |
| 130 | + | |
| 131 | + pd.concat(dc_results, ignore_index=True).to_csv( | |
| 132 | + config.RESULTS_DIR / "robustness_double_clustered.csv", index=False) | |
| 133 | + | |
| 134 | + # ── C. Additional control variables ── | |
| 135 | + print("\n--- C. WITH CONTROL VARIABLES (volume, log_oi, spread proxy) ---") | |
| 136 | + df['log_volume'] = np.log1p(df['total_option_volume']) | |
| 137 | + df['log_oi'] = np.log1p(df['total_oi']) | |
| 138 | + df['abs_return'] = df['daily_return'].abs() | |
| 139 | + df['ret_lag1'] = df.groupby('ticker')['daily_return'].shift(1) | |
| 140 | + df['ret_lag5'] = df.groupby('ticker')['daily_return'].transform( | |
| 141 | + lambda x: x.shift(1).rolling(5).sum()) | |
| 142 | + | |
| 143 | + controls = ['log_volume', 'log_oi', 'abs_return', 'ret_lag1', 'ret_lag5'] | |
| 144 | + features_ctrl = FEATURES + controls | |
| 145 | + | |
| 146 | + ctrl_results = [] | |
| 147 | + for target, horizon in HORIZONS: | |
| 148 | + sub = prepare(df, features_ctrl, target) | |
| 149 | + X = add_constant(standardize(sub[features_ctrl].values)) | |
| 150 | + y = sub[target].values | |
| 151 | + coefs = ols(X, y) | |
| 152 | + r2 = r_squared(y, X @ coefs) | |
| 153 | + _, t = hc1_tstats(X, y, coefs, len(features_ctrl)) | |
| 154 | + | |
| 155 | + print(f"\n {horizon} with controls: R²={r2:.6f}, N={len(sub):,}") | |
| 156 | + for i, name in enumerate(['const'] + features_ctrl): | |
| 157 | + star = "**" if abs(t[i]) > 2.576 else ("*" if abs(t[i]) > 1.96 else "") | |
| 158 | + print(f" {name:25s}: β={coefs[i]:9.6f} t={t[i]:7.3f} {star}") | |
| 159 | + ctrl_results.append({'target': horizon, 'variable': name, | |
| 160 | + 'coefficient': coefs[i], 't_stat': t[i], 'r2': r2}) | |
| 161 | + | |
| 162 | + pd.DataFrame(ctrl_results).to_csv( | |
| 163 | + config.RESULTS_DIR / "robustness_with_controls.csv", index=False) | |
| 164 | + | |
| 165 | + # ── D. Quantile regressions ── | |
| 166 | + print("\n--- D. QUANTILE REGRESSION (iterative reweighting) ---") | |
| 167 | + qr_results = [] | |
| 168 | + for target, horizon in [('ret_5d', '5-Day')]: | |
| 169 | + sub = prepare(df, FEATURES, target) | |
| 170 | + X = add_constant(standardize(sub[FEATURES].values)) | |
| 171 | + y = sub[target].values | |
| 172 | + | |
| 173 | + for tau in [0.10, 0.25, 0.50, 0.75, 0.90]: | |
| 174 | + coefs = quantile_regression(X, y, tau) | |
| 175 | + print(f"\n {horizon} | τ={tau}:") | |
| 176 | + for i, name in enumerate(['const'] + FEATURES): | |
| 177 | + qr_results.append({'target': horizon, 'tau': tau, | |
| 178 | + 'variable': name, 'coefficient': coefs[i]}) | |
| 179 | + print(f" {name:25s}: β={coefs[i]:9.6f}") | |
| 180 | + | |
| 181 | + pd.DataFrame(qr_results).to_csv( | |
| 182 | + config.RESULTS_DIR / "robustness_quantile_regression.csv", index=False) | |
| 183 | + | |
| 184 | + # ── E. Excluding high-VIX periods (console-only, needs raw VIX) ── | |
| 185 | + print("\n--- E. EXCLUDING HIGH-VIX PERIODS (VIX < 30) ---") | |
| 186 | + try: | |
| 187 | + vix = load_vix_daily() | |
| 188 | + calm = df.merge(vix, on='trade_date', how='left') | |
| 189 | + calm = calm[calm['vix_close'] < 30] | |
| 190 | + for target, horizon in HORIZONS: | |
| 191 | + sub = prepare(calm, FEATURES, target) | |
| 192 | + X = add_constant(standardize(sub[FEATURES].values)) | |
| 193 | + y = sub[target].values | |
| 194 | + coefs = ols(X, y) | |
| 195 | + print(f" {horizon} (VIX<30): R²={r_squared(y, X @ coefs):.6f}, N={len(sub):,}") | |
| 196 | + except RawDataUnavailableError as exc: | |
| 197 | + print(f" [Section E skipped — raw stores unavailable]\n {exc}") | |
| 198 | + | |
| 199 | + # ── F. Ticker-by-ticker R² distribution (5-day returns) ── | |
| 200 | + print("\n--- F. TICKER-BY-TICKER R² DISTRIBUTION (5-Day returns) ---") | |
| 201 | + ticker_r2 = [] | |
| 202 | + for ticker in df['ticker'].unique(): | |
| 203 | + td = df[df['ticker'] == ticker] | |
| 204 | + sub = td[FEATURES + ['ret_5d']].dropna() | |
| 205 | + if len(sub) < 200: | |
| 206 | + continue | |
| 207 | + for f in FEATURES: | |
| 208 | + sub[f] = winsorize(sub[f]) | |
| 209 | + sub['ret_5d'] = winsorize(sub['ret_5d']) | |
| 210 | + X = add_constant(standardize(sub[FEATURES].values)) | |
| 211 | + y = sub['ret_5d'].values | |
| 212 | + coefs = ols(X, y) | |
| 213 | + ticker_r2.append({'ticker': ticker, 'r2_5d': r_squared(y, X @ coefs), | |
| 214 | + 'n_obs': len(sub)}) | |
| 215 | + | |
| 216 | + ticker_r2_df = pd.DataFrame(ticker_r2) | |
| 217 | + ticker_r2_df.to_csv(config.RESULTS_DIR / "robustness_ticker_r2.csv", index=False) | |
| 218 | + print(f" Distribution of R² across {len(ticker_r2_df)} tickers:") | |
| 219 | + for stat, val in [('Mean', ticker_r2_df['r2_5d'].mean()), | |
| 220 | + ('Median', ticker_r2_df['r2_5d'].median()), | |
| 221 | + ('Std', ticker_r2_df['r2_5d'].std()), | |
| 222 | + ('Min', ticker_r2_df['r2_5d'].min()), | |
| 223 | + ('Max', ticker_r2_df['r2_5d'].max()), | |
| 224 | + ('Q25', ticker_r2_df['r2_5d'].quantile(0.25)), | |
| 225 | + ('Q75', ticker_r2_df['r2_5d'].quantile(0.75))]: | |
| 226 | + print(f" {stat}: {val:.6f}") | |
| 227 | + | |
| 228 | + print("\nROBUSTNESS CHECKS COMPLETE.") | |
| 229 | + | |
| 230 | + | |
| 231 | +if __name__ == "__main__": | |
| 232 | + main() | |
added
scripts/11_granger_var.py
+165 −0
@@ -0,0 +1,165 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 11 — Granger causality and VAR analysis. | |
| 7 | + | |
| 8 | +Lead-lag structure between option-implied measures and returns / realized | |
| 9 | +volatility: per-ticker bivariate Granger F-tests (5 lags), bivariate VAR(5) | |
| 10 | +with impulse-response functions, and forecast-error variance decomposition. | |
| 11 | + | |
| 12 | +Inputs : data/processed/merged_options_rv.parquet | |
| 13 | +Outputs: results/granger_causality.csv, results/var_results.csv, | |
| 14 | + results/irf_results.csv, results/fevd_results.csv | |
| 15 | +""" | |
| 16 | + | |
| 17 | +import warnings | |
| 18 | + | |
| 19 | +import numpy as np | |
| 20 | +import pandas as pd | |
| 21 | + | |
| 22 | +import _bootstrap # noqa: F401 | |
| 23 | +from wp7 import config | |
| 24 | +from wp7.data_io import load_merged | |
| 25 | +from wp7.econometrics import estimate_var, granger_test, winsorize | |
| 26 | + | |
| 27 | +warnings.filterwarnings('ignore') | |
| 28 | + | |
| 29 | +TEST_PAIRS = [ | |
| 30 | + ('iv_atm_30d', 'rv_daily', 'ATM_IV → RV'), | |
| 31 | + ('rv_daily', 'iv_atm_30d', 'RV → ATM_IV'), | |
| 32 | + ('iv_skew_25d', 'rv_daily', 'Skew → RV'), | |
| 33 | + ('rv_daily', 'iv_skew_25d', 'RV → Skew'), | |
| 34 | + ('iv_atm_30d', 'daily_return', 'ATM_IV → Return'), | |
| 35 | + ('daily_return', 'iv_atm_30d', 'Return → ATM_IV'), | |
| 36 | + ('iv_skew_25d', 'daily_return', 'Skew → Return'), | |
| 37 | + ('daily_return', 'iv_skew_25d', 'Return → Skew'), | |
| 38 | + ('pc_volume_ratio', 'daily_return', 'PC_Ratio → Return'), | |
| 39 | + ('daily_return', 'pc_volume_ratio', 'Return → PC_Ratio'), | |
| 40 | + ('implied_skewness', 'rv_daily', 'Impl_Skew → RV'), | |
| 41 | + ('implied_kurtosis_proxy', 'rv_daily', 'Impl_Kurt → RV'), | |
| 42 | +] | |
| 43 | + | |
| 44 | +IRF_PERIODS = 20 | |
| 45 | + | |
| 46 | + | |
| 47 | +def main(): | |
| 48 | + print("=" * 70) | |
| 49 | + print("GRANGER CAUSALITY & VAR ANALYSIS") | |
| 50 | + print("=" * 70) | |
| 51 | + config.ensure_output_dirs() | |
| 52 | + | |
| 53 | + df = load_merged() | |
| 54 | + df = df.sort_values(['ticker', 'trade_date']) | |
| 55 | + | |
| 56 | + # ── A. Granger causality tests (per ticker, averaged) ── | |
| 57 | + print("\n--- A. GRANGER CAUSALITY TESTS ---") | |
| 58 | + granger_results = [] | |
| 59 | + for x_var, y_var, label in TEST_PAIRS: | |
| 60 | + ticker_results = [] | |
| 61 | + for ticker in df['ticker'].unique(): | |
| 62 | + td = df[df['ticker'] == ticker][[x_var, y_var]].dropna() | |
| 63 | + if len(td) < 100: | |
| 64 | + continue | |
| 65 | + x = winsorize(td[x_var]).values | |
| 66 | + y = winsorize(td[y_var]).values | |
| 67 | + res = granger_test(y, x, max_lag=5) | |
| 68 | + if res: | |
| 69 | + ticker_results.append(res) | |
| 70 | + | |
| 71 | + if ticker_results: | |
| 72 | + avg_f = np.mean([r['f_stat'] for r in ticker_results]) | |
| 73 | + avg_p = np.mean([r['p_value'] for r in ticker_results]) | |
| 74 | + pct_sig = np.mean([1 if r['p_value'] < 0.05 else 0 for r in ticker_results]) | |
| 75 | + granger_results.append({ | |
| 76 | + 'test': label, | |
| 77 | + 'x_causes_y': f"{x_var} → {y_var}", | |
| 78 | + 'avg_f_stat': avg_f, | |
| 79 | + 'avg_p_value': avg_p, | |
| 80 | + 'pct_significant_5pct': pct_sig, | |
| 81 | + 'n_tickers': len(ticker_results), | |
| 82 | + }) | |
| 83 | + sig_str = "***" if avg_p < 0.01 else \ | |
| 84 | + ("**" if avg_p < 0.05 else ("*" if avg_p < 0.10 else "")) | |
| 85 | + print(f" {label:25s}: F={avg_f:8.3f}, p={avg_p:.4f}, " | |
| 86 | + f"{pct_sig*100:.1f}% sig {sig_str}") | |
| 87 | + | |
| 88 | + pd.DataFrame(granger_results).to_csv( | |
| 89 | + config.RESULTS_DIR / "granger_causality.csv", index=False) | |
| 90 | + | |
| 91 | + # ── B. Bivariate VAR(5): ATM IV ↔ RV (20 largest tickers) ── | |
| 92 | + print("\n--- B. BIVARIATE VAR: IV_ATM ↔ RV (pooled) ---") | |
| 93 | + var_results, irf_all = [], [] | |
| 94 | + top_tickers = df.groupby('ticker').size().nlargest(20).index.tolist() | |
| 95 | + | |
| 96 | + for ticker in top_tickers: | |
| 97 | + td = df[df['ticker'] == ticker][['iv_atm_30d', 'rv_daily']].dropna() | |
| 98 | + if len(td) < 200: | |
| 99 | + continue | |
| 100 | + y1 = winsorize(td['iv_atm_30d']).values | |
| 101 | + y2 = winsorize(td['rv_daily']).values | |
| 102 | + y1 = (y1 - y1.mean()) / y1.std() | |
| 103 | + y2 = (y2 - y2.mean()) / y2.std() | |
| 104 | + | |
| 105 | + res = estimate_var(y1, y2, lags=5, irf_periods=IRF_PERIODS) | |
| 106 | + if res: | |
| 107 | + var_results.append({ | |
| 108 | + 'ticker': ticker, | |
| 109 | + 'r2_iv_eq': res['r2_eq1'], | |
| 110 | + 'r2_rv_eq': res['r2_eq2'], | |
| 111 | + 'n_obs': res['n_obs'], | |
| 112 | + }) | |
| 113 | + for h in range(IRF_PERIODS): | |
| 114 | + irf_all.append({ | |
| 115 | + 'ticker': ticker, 'horizon': h, | |
| 116 | + 'iv_to_iv': res['irf'][h, 0, 0], | |
| 117 | + 'rv_to_iv': res['irf'][h, 0, 1], | |
| 118 | + 'iv_to_rv': res['irf'][h, 1, 0], | |
| 119 | + 'rv_to_rv': res['irf'][h, 1, 1], | |
| 120 | + }) | |
| 121 | + | |
| 122 | + var_df = pd.DataFrame(var_results) | |
| 123 | + var_df.to_csv(config.RESULTS_DIR / "var_results.csv", index=False) | |
| 124 | + print(f"\n VAR estimated for {len(var_results)} tickers") | |
| 125 | + print(f" Avg R² (IV equation): {var_df['r2_iv_eq'].mean():.4f}") | |
| 126 | + print(f" Avg R² (RV equation): {var_df['r2_rv_eq'].mean():.4f}") | |
| 127 | + | |
| 128 | + irf_df = pd.DataFrame(irf_all) | |
| 129 | + irf_df.to_csv(config.RESULTS_DIR / "irf_results.csv", index=False) | |
| 130 | + | |
| 131 | + avg_irf = irf_df.groupby('horizon')[['iv_to_iv', 'rv_to_iv', | |
| 132 | + 'iv_to_rv', 'rv_to_rv']].mean() | |
| 133 | + print("\n Average Impulse Response Function:") | |
| 134 | + print(f" {'h':>3} {'IV→IV':>8} {'RV→IV':>8} {'IV→RV':>8} {'RV→RV':>8}") | |
| 135 | + for h in range(0, IRF_PERIODS, 2): | |
| 136 | + row = avg_irf.loc[h] | |
| 137 | + print(f" {h:>3} {row['iv_to_iv']:>8.4f} {row['rv_to_iv']:>8.4f} " | |
| 138 | + f"{row['iv_to_rv']:>8.4f} {row['rv_to_rv']:>8.4f}") | |
| 139 | + | |
| 140 | + # ── C. Forecast-error variance decomposition ── | |
| 141 | + print("\n--- C. FORECAST ERROR VARIANCE DECOMPOSITION ---") | |
| 142 | + fevd_results = [] | |
| 143 | + for h in range(1, IRF_PERIODS + 1): | |
| 144 | + sub_irf = irf_df[irf_df['horizon'] < h] | |
| 145 | + avg = sub_irf.groupby('horizon')[['iv_to_rv', 'rv_to_rv']].mean() | |
| 146 | + total_var = (avg['iv_to_rv'] ** 2 + avg['rv_to_rv'] ** 2).sum() | |
| 147 | + iv_share = (avg['iv_to_rv'] ** 2).sum() / total_var if total_var > 0 else 0 | |
| 148 | + fevd_results.append({ | |
| 149 | + 'horizon': h, | |
| 150 | + 'pct_rv_explained_by_iv': iv_share * 100, | |
| 151 | + 'pct_rv_explained_by_rv': (1 - iv_share) * 100, | |
| 152 | + }) | |
| 153 | + | |
| 154 | + fevd_df = pd.DataFrame(fevd_results) | |
| 155 | + fevd_df.to_csv(config.RESULTS_DIR / "fevd_results.csv", index=False) | |
| 156 | + print(f" {'Horizon':>8} {'% RV by IV':>12} {'% RV by RV':>12}") | |
| 157 | + for _, row in fevd_df.iterrows(): | |
| 158 | + print(f" {int(row['horizon']):>8} {row['pct_rv_explained_by_iv']:>12.2f} " | |
| 159 | + f"{row['pct_rv_explained_by_rv']:>12.2f}") | |
| 160 | + | |
| 161 | + print("\nGRANGER CAUSALITY & VAR ANALYSIS COMPLETE.") | |
| 162 | + | |
| 163 | + | |
| 164 | +if __name__ == "__main__": | |
| 165 | + main() | |
added
scripts/12_make_figures.py
+178 −0
@@ -0,0 +1,178 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 12 — Supplementary figures (not referenced by the paper). | |
| 7 | + | |
| 8 | +The working paper is tables-only by design; these figures are reproducible | |
| 9 | +visual companions built from the result CSVs, useful for talks and quick | |
| 10 | +inspection. Colors follow a CVD-validated categorical palette; every series | |
| 11 | +is direct-labeled so identity never relies on color alone. | |
| 12 | + | |
| 13 | +Inputs : results/rolling_r2.csv, results/irf_results.csv, | |
| 14 | + results/portfolio_sort_results.csv, results/subperiod_results.csv | |
| 15 | +Outputs: figures/fig_rolling_r2.(png|pdf), figures/fig_irf.(png|pdf), | |
| 16 | + figures/fig_portfolio_sorts.(png|pdf), figures/fig_subperiod.(png|pdf) | |
| 17 | +""" | |
| 18 | + | |
| 19 | +import warnings | |
| 20 | + | |
| 21 | +import matplotlib | |
| 22 | +matplotlib.use("Agg") | |
| 23 | +import matplotlib.pyplot as plt | |
| 24 | +import pandas as pd | |
| 25 | + | |
| 26 | +import _bootstrap # noqa: F401 | |
| 27 | +from wp7 import config | |
| 28 | + | |
| 29 | +warnings.filterwarnings('ignore') | |
| 30 | + | |
| 31 | +# CVD-validated categorical palette (see AUDIT trail: adjacent-pair ΔE ≥ 8) | |
| 32 | +BLUE, ORANGE, AQUA, YELLOW = "#2a78d6", "#eb6834", "#1baf7a", "#eda100" | |
| 33 | +INK, INK_2 = "#0b0b0b", "#52514e" | |
| 34 | + | |
| 35 | +plt.rcParams.update({ | |
| 36 | + "figure.dpi": 150, | |
| 37 | + "font.size": 9, | |
| 38 | + "axes.edgecolor": INK_2, | |
| 39 | + "axes.labelcolor": INK, | |
| 40 | + "axes.titlecolor": INK, | |
| 41 | + "axes.spines.top": False, | |
| 42 | + "axes.spines.right": False, | |
| 43 | + "axes.grid": True, | |
| 44 | + "grid.color": "#e5e4e0", | |
| 45 | + "grid.linewidth": 0.6, | |
| 46 | + "xtick.color": INK_2, | |
| 47 | + "ytick.color": INK_2, | |
| 48 | + "savefig.facecolor": "white", | |
| 49 | + "axes.facecolor": "white", | |
| 50 | +}) | |
| 51 | + | |
| 52 | + | |
| 53 | +def _save(fig, name: str) -> None: | |
| 54 | + for ext in ("png", "pdf"): | |
| 55 | + fig.savefig(config.FIGURES_DIR / f"{name}.{ext}", bbox_inches="tight") | |
| 56 | + plt.close(fig) | |
| 57 | + print(f" saved figures/{name}.png|.pdf") | |
| 58 | + | |
| 59 | + | |
| 60 | +def fig_rolling_r2() -> None: | |
| 61 | + """252-day rolling explanatory power of option-implied information.""" | |
| 62 | + df = pd.read_csv(config.RESULTS_DIR / "rolling_r2.csv", parse_dates=["date"]) | |
| 63 | + fig, ax = plt.subplots(figsize=(7.2, 3.4)) | |
| 64 | + series = [("1D_RV", "1-day RV forecasting (HAR+IV)", BLUE), | |
| 65 | + ("5D_Return", "5-day return predictability", ORANGE)] | |
| 66 | + for key, label, color in series: | |
| 67 | + sub = df[df["target"] == key].sort_values("date") | |
| 68 | + ax.plot(sub["date"], sub["r2"], color=color, lw=2) | |
| 69 | + ax.annotate(label, xy=(sub["date"].iloc[-1], sub["r2"].iloc[-1]), | |
| 70 | + xytext=(6, 0), textcoords="offset points", | |
| 71 | + va="center", color=INK, fontsize=8.5) | |
| 72 | + ax.set_ylabel("Rolling $R^2$ (252-day window)") | |
| 73 | + ax.set_title("Option-implied information content through time", loc="left") | |
| 74 | + ax.margins(x=0.02) | |
| 75 | + fig.subplots_adjust(right=0.72) | |
| 76 | + _save(fig, "fig_rolling_r2") | |
| 77 | + | |
| 78 | + | |
| 79 | +def _dodge(values: list, min_gap: float) -> list: | |
| 80 | + """Push label anchor positions apart until every pair clears min_gap.""" | |
| 81 | + order = sorted(range(len(values)), key=lambda i: values[i]) | |
| 82 | + adjusted = list(values) | |
| 83 | + for prev, cur in zip(order, order[1:]): | |
| 84 | + if adjusted[cur] - adjusted[prev] < min_gap: | |
| 85 | + adjusted[cur] = adjusted[prev] + min_gap | |
| 86 | + return adjusted | |
| 87 | + | |
| 88 | + | |
| 89 | +def fig_irf() -> None: | |
| 90 | + """Average VAR(5) impulse responses (20 tickers, standardized units).""" | |
| 91 | + df = pd.read_csv(config.RESULTS_DIR / "irf_results.csv") | |
| 92 | + avg = df.groupby("horizon")[["iv_to_iv", "rv_to_iv", "iv_to_rv", "rv_to_rv"]].mean() | |
| 93 | + fig, ax = plt.subplots(figsize=(6.4, 3.6)) | |
| 94 | + series = [("iv_to_rv", "RV response to IV shock", BLUE), | |
| 95 | + ("rv_to_rv", "RV response to RV shock", ORANGE), | |
| 96 | + ("iv_to_iv", "IV response to IV shock", AQUA), | |
| 97 | + ("rv_to_iv", "IV response to RV shock", YELLOW)] | |
| 98 | + ends = _dodge([avg[key].iloc[-1] for key, _, _ in series], min_gap=0.07) | |
| 99 | + for (key, label, color), label_y in zip(series, ends): | |
| 100 | + ax.plot(avg.index, avg[key], color=color, lw=2) | |
| 101 | + ax.annotate(label, xy=(avg.index[-1], label_y), | |
| 102 | + xytext=(6, 0), textcoords="offset points", | |
| 103 | + va="center", color=INK, fontsize=8.5) | |
| 104 | + ax.axhline(0, color=INK_2, lw=0.8) | |
| 105 | + ax.set_xlabel("Horizon (days)") | |
| 106 | + ax.set_ylabel("Response (SD units)") | |
| 107 | + ax.set_title("Average impulse responses, bivariate VAR(5): ATM IV ↔ RV", | |
| 108 | + loc="left") | |
| 109 | + ax.margins(x=0.02) | |
| 110 | + fig.subplots_adjust(right=0.70) | |
| 111 | + _save(fig, "fig_irf") | |
| 112 | + | |
| 113 | + | |
| 114 | +def fig_portfolio_sorts() -> None: | |
| 115 | + """Annualized long-short (Q5−Q1) returns of the 5-day sorts.""" | |
| 116 | + df = pd.read_csv(config.RESULTS_DIR / "portfolio_sort_results.csv") | |
| 117 | + ls = df[(df["quintile"] == "L/S(5-1)") & (df["return_horizon"] == "5-Day")] | |
| 118 | + ls = ls.sort_values("annualized_return_pct") | |
| 119 | + colors = [BLUE if v >= 0 else ORANGE for v in ls["annualized_return_pct"]] | |
| 120 | + | |
| 121 | + fig, ax = plt.subplots(figsize=(6.4, 3.2)) | |
| 122 | + bars = ax.barh(ls["sort_variable"], ls["annualized_return_pct"], | |
| 123 | + color=colors, height=0.62) | |
| 124 | + for bar, val, sharpe in zip(bars, ls["annualized_return_pct"], ls["sharpe_ratio"]): | |
| 125 | + ax.annotate(f"{val:+.1f}% (SR {sharpe:.2f})", | |
| 126 | + xy=(val, bar.get_y() + bar.get_height() / 2), | |
| 127 | + xytext=(5 if val >= 0 else -5, 0), textcoords="offset points", | |
| 128 | + va="center", ha="left" if val >= 0 else "right", | |
| 129 | + color=INK, fontsize=8) | |
| 130 | + ax.axvline(0, color=INK_2, lw=0.8) | |
| 131 | + ax.set_xlabel("Annualized L/S return (%)") | |
| 132 | + ax.set_title("Long-short quintile portfolios, 5-day returns (Q5 − Q1)", | |
| 133 | + loc="left") | |
| 134 | + ax.grid(axis="y", visible=False) | |
| 135 | + xmin, xmax = ax.get_xlim() | |
| 136 | + ax.set_xlim(xmin - 0.42 * (xmax - xmin), xmax + 0.18 * (xmax - xmin)) | |
| 137 | + _save(fig, "fig_portfolio_sorts") | |
| 138 | + | |
| 139 | + | |
| 140 | +def fig_subperiod() -> None: | |
| 141 | + """HAR-RV vs HAR+IV in-sample R² across the nine subperiods.""" | |
| 142 | + df = pd.read_csv(config.RESULTS_DIR / "subperiod_results.csv") | |
| 143 | + rv = df[df["model"].isin(["HAR-RV", "HAR+IV"])] | |
| 144 | + pivot = rv.pivot_table(index="subperiod", columns="model", values="r2") | |
| 145 | + pivot = pivot.reindex(list(config.SUBPERIODS)) | |
| 146 | + | |
| 147 | + fig, ax = plt.subplots(figsize=(7.2, 3.6)) | |
| 148 | + x = range(len(pivot)) | |
| 149 | + w = 0.38 | |
| 150 | + ax.bar([i - w / 2 for i in x], pivot["HAR-RV"], width=w - 0.04, | |
| 151 | + color=ORANGE, label="HAR-RV") | |
| 152 | + ax.bar([i + w / 2 for i in x], pivot["HAR+IV"], width=w - 0.04, | |
| 153 | + color=BLUE, label="HAR-RV + IV surface") | |
| 154 | + ax.set_xticks(list(x)) | |
| 155 | + ax.set_xticklabels([s.split(" (")[0] for s in pivot.index], | |
| 156 | + rotation=30, ha="right", fontsize=8) | |
| 157 | + ax.set_ylabel("In-sample $R^2$ (1-day RV)") | |
| 158 | + ax.set_title("Stability of the IV-surface improvement across subperiods", | |
| 159 | + loc="left") | |
| 160 | + ax.grid(axis="x", visible=False) | |
| 161 | + ax.legend(frameon=False, fontsize=8.5, loc="upper left") | |
| 162 | + _save(fig, "fig_subperiod") | |
| 163 | + | |
| 164 | + | |
| 165 | +def main(): | |
| 166 | + print("=" * 70) | |
| 167 | + print("SUPPLEMENTARY FIGURES") | |
| 168 | + print("=" * 70) | |
| 169 | + config.ensure_output_dirs() | |
| 170 | + fig_rolling_r2() | |
| 171 | + fig_irf() | |
| 172 | + fig_portfolio_sorts() | |
| 173 | + fig_subperiod() | |
| 174 | + print("\nFIGURES COMPLETE.") | |
| 175 | + | |
| 176 | + | |
| 177 | +if __name__ == "__main__": | |
| 178 | + main() | |
added
scripts/13_extended_robustness.py
+292 −0
@@ -0,0 +1,292 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# ============================================================================= | |
| 3 | +# Author: Simon-Pierre Boucher | |
| 4 | +# Contact: contact@spboucher.ai | |
| 5 | +# ============================================================================= | |
| 6 | +"""Step 13 — Extended robustness analyses (paper revision 1.1). | |
| 7 | + | |
| 8 | +Six additional checks, all computable from the processed panel alone: | |
| 9 | + | |
| 10 | +A. Winsorization sensitivity — the 5-day return regression under no | |
| 11 | + winsorization and cutoffs of 0.5%, 1% (baseline), 2.5%, 5%. | |
| 12 | +B. Newey-West lag sensitivity — HAC t-statistics at 5 (baseline), 10 and | |
| 13 | + 22 lags. | |
| 14 | +C. Rank-based information coefficients — daily cross-sectional Spearman | |
| 15 | + correlations between each predictor and forward returns (stocks), | |
| 16 | + with Fama-MacBeth-style time-series t-statistics. | |
| 17 | +D. Decile sorts — long-short D10−D1 portfolios for the three strongest | |
| 18 | + sort variables, versus the baseline quintile sorts. | |
| 19 | +E. Leave-one-year-out — panel R² for the 5-day return regression and the | |
| 20 | + HAR+IV RV model, excluding one calendar year at a time. | |
| 21 | +F. Placebo test — features permuted within ticker (fixed seed), which | |
| 22 | + should (and does) destroy predictability. | |
| 23 | + | |
| 24 | +Inputs : data/processed/merged_options_rv.parquet | |
| 25 | +Outputs: results/extended_winsorization_sensitivity.csv, | |
| 26 | + results/extended_newey_west_lags.csv, | |
| 27 | + results/extended_information_coefficients.csv, | |
| 28 | + results/extended_decile_sorts.csv, | |
| 29 | + results/extended_leave_one_year_out.csv, | |
| 30 | + results/extended_placebo.csv | |
| 31 | +""" | |
| 32 | + | |
| 33 | +import warnings | |
| 34 | + | |
| 35 | +import numpy as np | |
| 36 | +import pandas as pd | |
| 37 | + | |
| 38 | +import _bootstrap # noqa: F401 | |
| 39 | +from wp7 import config | |
| 40 | +from wp7.data_io import load_merged | |
| 41 | +from wp7.econometrics import (add_constant, adjusted_r_squared, hc1_tstats, ols, | |
| 42 | + r_squared, standardize, winsorize) | |
| 43 | +from wp7.portfolio import portfolio_sort | |
| 44 | + | |
| 45 | +warnings.filterwarnings('ignore') | |
| 46 | + | |
| 47 | +FEATURES = config.RQ1_FEATURES | |
| 48 | +RV_FEATURES = config.HAR_FEATURES + config.IV_FEATURES | |
| 49 | +KEY_VARS = ['implied_kurtosis_proxy', 'pc_volume_ratio'] | |
| 50 | + | |
| 51 | + | |
| 52 | +def fit_panel(sub: pd.DataFrame, features: list, target: str): | |
| 53 | + """Standardized pooled OLS with HC1 t-stats on an already-prepared frame.""" | |
| 54 | + X = add_constant(standardize(sub[features].values)) | |
| 55 | + y = sub[target].values | |
| 56 | + coefs = ols(X, y) | |
| 57 | + r2 = r_squared(y, X @ coefs) | |
| 58 | + _, t = hc1_tstats(X, y, coefs, len(features)) | |
| 59 | + return coefs, t, r2, len(sub) | |
| 60 | + | |
| 61 | + | |
| 62 | +# -------------------------------------------------------------------------- | |
| 63 | +# A. Winsorization sensitivity | |
| 64 | +# -------------------------------------------------------------------------- | |
| 65 | +def winsorization_sensitivity(df: pd.DataFrame) -> None: | |
| 66 | + print("\n--- A. WINSORIZATION SENSITIVITY (5-day returns) ---") | |
| 67 | + rows = [] | |
| 68 | + for q, label in [(None, 'None'), (0.005, '0.5%'), (0.01, '1% (baseline)'), | |
| 69 | + (0.025, '2.5%'), (0.05, '5%')]: | |
| 70 | + sub = df[FEATURES + ['ret_5d']].dropna() | |
| 71 | + if q is not None: | |
| 72 | + for f in FEATURES: | |
| 73 | + sub[f] = winsorize(sub[f], q) | |
| 74 | + sub['ret_5d'] = winsorize(sub['ret_5d'], q) | |
| 75 | + _, t, r2, n = fit_panel(sub, FEATURES, 'ret_5d') | |
| 76 | + t_by_var = dict(zip(['const'] + FEATURES, t)) | |
| 77 | + rows.append({ | |
| 78 | + 'winsorization': label, | |
| 79 | + 'r2': r2, | |
| 80 | + 'adj_r2': adjusted_r_squared(r2, n, len(FEATURES)), | |
| 81 | + 'n_obs': n, | |
| 82 | + 't_implied_kurtosis': t_by_var['implied_kurtosis_proxy'], | |
| 83 | + 't_pc_volume_ratio': t_by_var['pc_volume_ratio'], | |
| 84 | + 't_implied_skewness': t_by_var['implied_skewness'], | |
| 85 | + 'n_significant_5pct': int(np.sum(np.abs(t[1:]) > 1.96)), | |
| 86 | + }) | |
| 87 | + print(f" {label:15s}: R²={r2:.4f}, t_kurt={t_by_var['implied_kurtosis_proxy']:6.2f}, " | |
| 88 | + f"t_pc={t_by_var['pc_volume_ratio']:6.2f}, sig={rows[-1]['n_significant_5pct']}/10") | |
| 89 | + | |
| 90 | + pd.DataFrame(rows).to_csv( | |
| 91 | + config.RESULTS_DIR / "extended_winsorization_sensitivity.csv", index=False) | |
| 92 | + | |
| 93 | + | |
| 94 | +# -------------------------------------------------------------------------- | |
| 95 | +# B. Newey-West lag sensitivity (vectorized HAC) | |
| 96 | +# -------------------------------------------------------------------------- | |
| 97 | +def nw_tstats_vectorized(X: np.ndarray, y: np.ndarray, coefs: np.ndarray, | |
| 98 | + n_lags: int) -> np.ndarray: | |
| 99 | + """Bartlett-kernel HAC t-stats; einsum form of the lag sums.""" | |
| 100 | + e = y - X @ coefs | |
| 101 | + Xe = X * e[:, None] | |
| 102 | + S = Xe.T @ Xe | |
| 103 | + for lag in range(1, n_lags + 1): | |
| 104 | + w = 1 - lag / (n_lags + 1) | |
| 105 | + cross = Xe[lag:].T @ Xe[:-lag] | |
| 106 | + S += w * (cross + cross.T) | |
| 107 | + try: | |
| 108 | + XtX_inv = np.linalg.inv(X.T @ X) | |
| 109 | + except np.linalg.LinAlgError: | |
| 110 | + XtX_inv = np.linalg.pinv(X.T @ X) | |
| 111 | + se = np.sqrt(np.abs(np.diag(XtX_inv @ S @ XtX_inv))) | |
| 112 | + return coefs / np.where(se > 0, se, 1) | |
| 113 | + | |
| 114 | + | |
| 115 | +def newey_west_lags(df: pd.DataFrame) -> None: | |
| 116 | + print("\n--- B. NEWEY-WEST LAG SENSITIVITY ---") | |
| 117 | + rows = [] | |
| 118 | + for target, horizon in [('ret_1d', '1-Day'), ('ret_5d', '5-Day')]: | |
| 119 | + sub = df[FEATURES + [target]].dropna() | |
| 120 | + for f in FEATURES: | |
| 121 | + sub[f] = winsorize(sub[f]) | |
| 122 | + sub[target] = winsorize(sub[target]) | |
| 123 | + X = add_constant(standardize(sub[FEATURES].values)) | |
| 124 | + y = sub[target].values | |
| 125 | + coefs = ols(X, y) | |
| 126 | + for lag in [5, 10, 22]: | |
| 127 | + t = nw_tstats_vectorized(X, y, coefs, lag) | |
| 128 | + for i, name in enumerate(['const'] + FEATURES): | |
| 129 | + rows.append({'target': horizon, 'n_lags': lag, 'variable': name, | |
| 130 | + 'coefficient': coefs[i], 'nw_t_stat': t[i], | |
| 131 | + 'sig_5pct': abs(t[i]) > 1.96}) | |
| 132 | + n_sig = int(np.sum(np.abs(t[1:]) > 1.96)) | |
| 133 | + print(f" {horizon} | NW({lag:2d}): {n_sig}/10 significant at 5%") | |
| 134 | + | |
| 135 | + pd.DataFrame(rows).to_csv( | |
| 136 | + config.RESULTS_DIR / "extended_newey_west_lags.csv", index=False) | |
| 137 | + | |
| 138 | + | |
| 139 | +# -------------------------------------------------------------------------- | |
| 140 | +# C. Daily cross-sectional Spearman information coefficients (stocks) | |
| 141 | +# -------------------------------------------------------------------------- | |
| 142 | +def information_coefficients(stocks: pd.DataFrame) -> None: | |
| 143 | + print("\n--- C. RANK-BASED INFORMATION COEFFICIENTS (stocks) ---") | |
| 144 | + rows = [] | |
| 145 | + for target, horizon in [('ret_1d', '1-Day'), ('ret_5d', '5-Day')]: | |
| 146 | + cols = FEATURES + [target] | |
| 147 | + daily_ics = {f: [] for f in FEATURES} | |
| 148 | + for _, g in stocks[cols + ['trade_date']].groupby('trade_date'): | |
| 149 | + g = g[cols].dropna() | |
| 150 | + if len(g) < 20: | |
| 151 | + continue | |
| 152 | + ranks = g.rank().values | |
| 153 | + ranks = (ranks - ranks.mean(axis=0)) / ranks.std(axis=0) | |
| 154 | + y = ranks[:, -1] | |
| 155 | + for j, f in enumerate(FEATURES): | |
| 156 | + daily_ics[f].append(np.mean(ranks[:, j] * y)) | |
| 157 | + | |
| 158 | + for f in FEATURES: | |
| 159 | + ics = np.array(daily_ics[f]) | |
| 160 | + t_stat = ics.mean() / (ics.std() / np.sqrt(len(ics))) | |
| 161 | + rows.append({ | |
| 162 | + 'target': horizon, 'variable': f, | |
| 163 | + 'mean_ic': ics.mean(), 'std_ic': ics.std(), | |
| 164 | + 't_stat': t_stat, 'pct_positive': (ics > 0).mean(), | |
| 165 | + 'n_days': len(ics), | |
| 166 | + }) | |
| 167 | + print(f" {horizon} | {f:25s}: IC={ics.mean():+.4f}, t={t_stat:7.2f}, " | |
| 168 | + f"%>0={(ics > 0).mean()*100:5.1f}") | |
| 169 | + | |
| 170 | + pd.DataFrame(rows).to_csv( | |
| 171 | + config.RESULTS_DIR / "extended_information_coefficients.csv", index=False) | |
| 172 | + | |
| 173 | + | |
| 174 | +# -------------------------------------------------------------------------- | |
| 175 | +# D. Decile sorts | |
| 176 | +# -------------------------------------------------------------------------- | |
| 177 | +def decile_sorts(stocks: pd.DataFrame) -> None: | |
| 178 | + print("\n--- D. DECILE SORTS (D10 - D1, 5-day returns) ---") | |
| 179 | + rows = [] | |
| 180 | + for sort_var in ['implied_kurtosis_proxy', 'pc_volume_ratio', 'iv_skew_25d']: | |
| 181 | + for n_q, scheme in [(5, 'Quintile (baseline)'), (10, 'Decile')]: | |
| 182 | + res = portfolio_sort(stocks, sort_var, 'ret_5d', n_quantiles=n_q) | |
| 183 | + ls_key = f'LS_{n_q}_1' | |
| 184 | + if res is None or ls_key not in res: | |
| 185 | + continue | |
| 186 | + r = res[ls_key] | |
| 187 | + rows.append({ | |
| 188 | + 'sort_variable': config.SORT_VARIABLES[sort_var], | |
| 189 | + 'scheme': scheme, | |
| 190 | + 'mean_daily_bps': r['mean_daily'] * 10000, | |
| 191 | + 'annualized_return_pct': r['annualized_return'] * 100, | |
| 192 | + 'annualized_vol_pct': r['annualized_vol'] * 100, | |
| 193 | + 'sharpe_ratio': r['sharpe'], | |
| 194 | + 't_statistic': r['t_stat'], | |
| 195 | + 'n_days': r['n_days'], | |
| 196 | + }) | |
| 197 | + print(f" {config.SORT_VARIABLES[sort_var]:25s} | {scheme:20s}: " | |
| 198 | + f"ann.ret={r['annualized_return']*100:7.2f}%, " | |
| 199 | + f"Sharpe={r['sharpe']:6.3f}, t={r['t_stat']:7.2f}") | |
| 200 | + | |
| 201 | + pd.DataFrame(rows).to_csv( | |
| 202 | + config.RESULTS_DIR / "extended_decile_sorts.csv", index=False) | |
| 203 | + | |
| 204 | + | |
| 205 | +# -------------------------------------------------------------------------- | |
| 206 | +# E. Leave-one-year-out | |
| 207 | +# -------------------------------------------------------------------------- | |
| 208 | +def leave_one_year_out(df: pd.DataFrame) -> None: | |
| 209 | + print("\n--- E. LEAVE-ONE-YEAR-OUT PANEL R² ---") | |
| 210 | + years = sorted(df['trade_date'].dt.year.unique()) | |
| 211 | + rows = [] | |
| 212 | + for year in years: | |
| 213 | + sub_df = df[df['trade_date'].dt.year != year] | |
| 214 | + | |
| 215 | + sub = sub_df[FEATURES + ['ret_5d']].dropna() | |
| 216 | + for f in FEATURES: | |
| 217 | + sub[f] = winsorize(sub[f]) | |
| 218 | + sub['ret_5d'] = winsorize(sub['ret_5d']) | |
| 219 | + _, _, r2_ret, n_ret = fit_panel(sub, FEATURES, 'ret_5d') | |
| 220 | + | |
| 221 | + sub_rv = sub_df[RV_FEATURES + ['rv_fwd_1d']].dropna() | |
| 222 | + for f in RV_FEATURES: | |
| 223 | + sub_rv[f] = winsorize(sub_rv[f]) | |
| 224 | + sub_rv['rv_fwd_1d'] = winsorize(sub_rv['rv_fwd_1d']) | |
| 225 | + _, _, r2_rv, _ = fit_panel(sub_rv, RV_FEATURES, 'rv_fwd_1d') | |
| 226 | + | |
| 227 | + rows.append({'excluded_year': year, 'r2_ret_5d': r2_ret, | |
| 228 | + 'r2_rv_har_iv': r2_rv, 'n_obs_ret': n_ret}) | |
| 229 | + print(f" excl. {year}: 5D-ret R²={r2_ret:.4f}, HAR+IV RV R²={r2_rv:.4f}") | |
| 230 | + | |
| 231 | + pd.DataFrame(rows).to_csv( | |
| 232 | + config.RESULTS_DIR / "extended_leave_one_year_out.csv", index=False) | |
| 233 | + | |
| 234 | + | |
| 235 | +# -------------------------------------------------------------------------- | |
| 236 | +# F. Placebo: within-ticker permutation of the feature block | |
| 237 | +# -------------------------------------------------------------------------- | |
| 238 | +def placebo_test(df: pd.DataFrame, n_draws: int = 10) -> None: | |
| 239 | + print("\n--- F. PLACEBO TEST (features permuted within ticker) ---") | |
| 240 | + base = df[FEATURES + ['ret_5d', 'ticker']].dropna().reset_index(drop=True) | |
| 241 | + for f in FEATURES: | |
| 242 | + base[f] = winsorize(base[f]) | |
| 243 | + base['ret_5d'] = winsorize(base['ret_5d']) | |
| 244 | + | |
| 245 | + _, _, r2_actual, n = fit_panel(base, FEATURES, 'ret_5d') | |
| 246 | + print(f" Actual R²: {r2_actual:.4f} (N={n:,})") | |
| 247 | + | |
| 248 | + rng = np.random.default_rng(42) | |
| 249 | + ticker_codes = base['ticker'].astype('category').cat.codes.values | |
| 250 | + feat_matrix = base[FEATURES].values | |
| 251 | + r2_placebos = [] | |
| 252 | + for draw in range(n_draws): | |
| 253 | + perm_matrix = np.empty_like(feat_matrix) | |
| 254 | + for code in np.unique(ticker_codes): | |
| 255 | + idx = np.flatnonzero(ticker_codes == code) | |
| 256 | + perm_matrix[idx] = feat_matrix[idx[rng.permutation(len(idx))]] | |
| 257 | + X = add_constant(standardize(perm_matrix)) | |
| 258 | + y = base['ret_5d'].values | |
| 259 | + coefs = ols(X, y) | |
| 260 | + r2_placebos.append(r_squared(y, X @ coefs)) | |
| 261 | + | |
| 262 | + r2_placebos = np.array(r2_placebos) | |
| 263 | + print(f" Placebo R² over {n_draws} draws: mean={r2_placebos.mean():.6f}, " | |
| 264 | + f"max={r2_placebos.max():.6f}") | |
| 265 | + | |
| 266 | + pd.DataFrame({ | |
| 267 | + 'draw': ['actual'] + [str(i + 1) for i in range(n_draws)], | |
| 268 | + 'r2': [r2_actual] + list(r2_placebos), | |
| 269 | + }).to_csv(config.RESULTS_DIR / "extended_placebo.csv", index=False) | |
| 270 | + | |
| 271 | + | |
| 272 | +def main(): | |
| 273 | + print("=" * 70) | |
| 274 | + print("EXTENDED ROBUSTNESS ANALYSES") | |
| 275 | + print("=" * 70) | |
| 276 | + config.ensure_output_dirs() | |
| 277 | + | |
| 278 | + df = load_merged() | |
| 279 | + stocks = df[~df['ticker'].isin(config.NON_STOCK_TICKERS)].copy() | |
| 280 | + | |
| 281 | + winsorization_sensitivity(df) | |
| 282 | + newey_west_lags(df) | |
| 283 | + information_coefficients(stocks) | |
| 284 | + decile_sorts(stocks) | |
| 285 | + leave_one_year_out(df) | |
| 286 | + placebo_test(df) | |
| 287 | + | |
| 288 | + print("\nEXTENDED ROBUSTNESS COMPLETE.") | |
| 289 | + | |
| 290 | + | |
| 291 | +if __name__ == "__main__": | |
| 292 | + main() | |
added
scripts/_bootstrap.py
+17 −0
@@ -0,0 +1,17 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Make the ``wp7`` package importable when the repo is not pip-installed. | |
| 6 | + | |
| 7 | +Every numbered script starts with ``import _bootstrap # noqa: F401`` so it | |
| 8 | +can be launched directly (``python scripts/02_rq1_return_predictability.py``) | |
| 9 | +without any environment setup. | |
| 10 | +""" | |
| 11 | + | |
| 12 | +import sys | |
| 13 | +from pathlib import Path | |
| 14 | + | |
| 15 | +_SRC = Path(__file__).resolve().parents[1] / "src" | |
| 16 | +if str(_SRC) not in sys.path: | |
| 17 | + sys.path.insert(0, str(_SRC)) | |
added
src/wp7/__init__.py
+14 −0
@@ -0,0 +1,14 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""WP7 — Options-Implied Information Content. | |
| 6 | + | |
| 7 | +Reusable analysis library for UQO Working Paper No. 7. The numbered entry | |
| 8 | +points in ``scripts/`` orchestrate the pipeline; every statistical routine | |
| 9 | +lives here so that it is defined exactly once. | |
| 10 | +""" | |
| 11 | + | |
| 12 | +__version__ = "1.0.0" | |
| 13 | +__author__ = "Simon-Pierre Boucher" | |
| 14 | +__contact__ = "contact@spboucher.ai" | |
added
src/wp7/config.py
+151 −0
@@ -0,0 +1,151 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Central configuration: paths, ticker universes, feature sets and constants. | |
| 6 | + | |
| 7 | +Every path is derived from the repository root and can be overridden through | |
| 8 | +environment variables, so the pipeline runs from any checkout location: | |
| 9 | + | |
| 10 | +* ``WP7_RAW_DATA_DIR`` — directory holding the raw DuckDB stores | |
| 11 | + (``options.duckdb``, ``stock_5min.duckdb``, ``etf_5min.duckdb``, | |
| 12 | + ``index_5min.duckdb``). Defaults to ``<repo>/data/raw``. | |
| 13 | +* ``WP7_RESULTS_DIR`` — output directory for result tables | |
| 14 | + (defaults to ``<repo>/results``). | |
| 15 | +""" | |
| 16 | + | |
| 17 | +import os | |
| 18 | +from pathlib import Path | |
| 19 | + | |
| 20 | +# -------------------------------------------------------------------------- | |
| 21 | +# Paths | |
| 22 | +# -------------------------------------------------------------------------- | |
| 23 | +PROJECT_ROOT = Path(__file__).resolve().parents[2] | |
| 24 | + | |
| 25 | +DATA_RAW = Path(os.environ.get("WP7_RAW_DATA_DIR", PROJECT_ROOT / "data" / "raw")) | |
| 26 | +DATA_PROCESSED = PROJECT_ROOT / "data" / "processed" | |
| 27 | +RESULTS_DIR = Path(os.environ.get("WP7_RESULTS_DIR", PROJECT_ROOT / "results")) | |
| 28 | +FIGURES_DIR = PROJECT_ROOT / "figures" | |
| 29 | + | |
| 30 | +# Raw DuckDB stores (external — ~3.8B option records, 11.5B intraday bars) | |
| 31 | +RAW_DB_FILES = { | |
| 32 | + "options": "options.duckdb", | |
| 33 | + "stocks_5min": "stock_5min.duckdb", | |
| 34 | + "etfs_5min": "etf_5min.duckdb", | |
| 35 | + "indices_5min": "index_5min.duckdb", | |
| 36 | +} | |
| 37 | + | |
| 38 | +# Processed (derived) datasets | |
| 39 | +MERGED_PARQUET = DATA_PROCESSED / "merged_options_rv.parquet" | |
| 40 | +OPTIONS_FEATURES_PARQUET = DATA_PROCESSED / "options_features.parquet" | |
| 41 | +REALIZED_VOL_PARQUET = DATA_PROCESSED / "realized_vol.parquet" | |
| 42 | +CORRELATION_DIVERGENCE_PARQUET = DATA_PROCESSED / "correlation_divergence.parquet" | |
| 43 | +PRICE_MAGNET_PARQUET = DATA_PROCESSED / "price_magnet_data.parquet" | |
| 44 | + | |
| 45 | + | |
| 46 | +def ensure_output_dirs() -> None: | |
| 47 | + """Create the output directories if they do not exist yet.""" | |
| 48 | + for d in (DATA_PROCESSED, RESULTS_DIR, FIGURES_DIR): | |
| 49 | + d.mkdir(parents=True, exist_ok=True) | |
| 50 | + | |
| 51 | + | |
| 52 | +# -------------------------------------------------------------------------- | |
| 53 | +# Ticker universes | |
| 54 | +# -------------------------------------------------------------------------- | |
| 55 | +MAJOR_TICKERS = [ | |
| 56 | + 'AAPL', 'MSFT', 'AMZN', 'GOOG', 'GOOGL', 'TSLA', 'NVDA', 'META', 'JPM', 'BAC', | |
| 57 | + 'WFC', 'GS', 'JNJ', 'UNH', 'PFE', 'XOM', 'CVX', 'HD', 'PG', 'KO', | |
| 58 | + 'DIS', 'NFLX', 'INTC', 'AMD', 'CRM', 'COST', 'ABBV', 'MRK', 'TMO', 'ABT', | |
| 59 | + 'V', 'MA', 'BRK_B', 'LLY', 'AVGO', 'ADBE', 'CSCO', 'PEP', 'WMT', 'MCD', | |
| 60 | + 'TXN', 'QCOM', 'LOW', 'UPS', 'CAT', 'GE', 'BA', 'RTX', 'HON', 'LMT', | |
| 61 | +] | |
| 62 | + | |
| 63 | +ETF_TICKERS = [ | |
| 64 | + 'SPY', 'QQQ', 'IWM', 'DIA', 'TLT', 'GLD', 'XLF', 'XLE', 'XLK', 'XLV', | |
| 65 | + 'XLI', 'XLP', 'XLU', 'XLB', 'XLC', 'XLRE', 'XLY', | |
| 66 | +] | |
| 67 | + | |
| 68 | +INDEX_SYMBOLS = ['SPX', 'NDX', 'RUT', 'VIX', 'DJI'] | |
| 69 | +INDEX_OPTION_TICKERS = ['SPX', 'NDX', 'RUT'] | |
| 70 | + | |
| 71 | +# Non-stock tickers (used to isolate the individual-stock cross-section) | |
| 72 | +NON_STOCK_TICKERS = ETF_TICKERS + INDEX_SYMBOLS | |
| 73 | + | |
| 74 | +# 30 large S&P 500 constituents used for the implied-correlation index (RQ3) | |
| 75 | +SPX_CONSTITUENTS = [ | |
| 76 | + 'AAPL', 'MSFT', 'AMZN', 'GOOG', 'GOOGL', 'TSLA', 'NVDA', 'META', 'JPM', 'BAC', | |
| 77 | + 'WFC', 'GS', 'JNJ', 'UNH', 'PFE', 'XOM', 'CVX', 'HD', 'PG', 'KO', | |
| 78 | + 'DIS', 'NFLX', 'INTC', 'AMD', 'CRM', 'V', 'MA', 'LLY', 'AVGO', 'ADBE', | |
| 79 | +] | |
| 80 | + | |
| 81 | +# Liquid names used for the Greeks-decay / price-magnet analysis (RQ4) | |
| 82 | +RQ4_TICKERS = ['AAPL', 'MSFT', 'AMZN', 'GOOG', 'TSLA', 'NVDA', 'META', 'JPM', 'SPY', 'QQQ'] | |
| 83 | + | |
| 84 | +# -------------------------------------------------------------------------- | |
| 85 | +# Feature sets | |
| 86 | +# -------------------------------------------------------------------------- | |
| 87 | +# The ten option-implied predictors of the return-predictability regressions | |
| 88 | +RQ1_FEATURES = [ | |
| 89 | + 'iv_atm_30d', 'iv_term_slope', 'iv_skew_25d', 'implied_skewness', | |
| 90 | + 'implied_kurtosis_proxy', 'pc_volume_ratio', 'pc_oi_ratio', | |
| 91 | + 'net_gamma_exposure', 'rv_daily', 'rv_w', | |
| 92 | +] | |
| 93 | + | |
| 94 | +HAR_FEATURES = ['rv_lag1', 'rv_w', 'rv_m'] | |
| 95 | +IV_FEATURES = ['iv_atm_30d', 'iv_term_slope', 'iv_skew_25d', | |
| 96 | + 'implied_skewness', 'implied_kurtosis_proxy'] | |
| 97 | + | |
| 98 | +# Competing realized-variance forecasting models (RQ2) | |
| 99 | +RQ2_MODELS = { | |
| 100 | + 'HAR-RV': ['rv_lag1', 'rv_w', 'rv_m'], | |
| 101 | + 'GARCH_proxy': ['rv_lag1', 'sq_return'], | |
| 102 | + 'IV_only': ['iv_atm_30d', 'iv_atm_90d', 'iv_term_slope', 'iv_skew_25d'], | |
| 103 | + 'IV_surface': ['iv_atm_30d', 'iv_atm_90d', 'iv_term_slope', 'iv_skew_25d', | |
| 104 | + 'implied_skewness', 'implied_kurtosis_proxy'], | |
| 105 | + 'HAR-RV + IV_surface': ['rv_lag1', 'rv_w', 'rv_m', | |
| 106 | + 'iv_atm_30d', 'iv_atm_90d', 'iv_term_slope', | |
| 107 | + 'iv_skew_25d', 'implied_skewness', 'implied_kurtosis_proxy'], | |
| 108 | +} | |
| 109 | + | |
| 110 | +# Variables sorted on in the portfolio analysis | |
| 111 | +SORT_VARIABLES = { | |
| 112 | + 'iv_atm_30d': 'ATM IV (30d)', | |
| 113 | + 'iv_skew_25d': 'Volatility Skew (25d)', | |
| 114 | + 'implied_skewness': 'Implied Skewness', | |
| 115 | + 'implied_kurtosis_proxy': 'Implied Kurtosis', | |
| 116 | + 'pc_volume_ratio': 'Put-Call Volume Ratio', | |
| 117 | + 'pc_oi_ratio': 'Put-Call OI Ratio', | |
| 118 | + 'iv_term_slope': 'IV Term Structure Slope', | |
| 119 | +} | |
| 120 | + | |
| 121 | +# -------------------------------------------------------------------------- | |
| 122 | +# Sample partitions | |
| 123 | +# -------------------------------------------------------------------------- | |
| 124 | +SUBPERIODS = { | |
| 125 | + 'Pre-GFC Recovery (2010-2012)': ('2010-01-01', '2012-12-31'), | |
| 126 | + 'Bull Market (2013-2016)': ('2013-01-01', '2016-12-31'), | |
| 127 | + 'Low Vol Era (2017-2018)': ('2017-01-01', '2018-12-31'), | |
| 128 | + 'Pre-COVID (2019)': ('2019-01-01', '2019-12-31'), | |
| 129 | + 'COVID Period (2020)': ('2020-01-01', '2020-12-31'), | |
| 130 | + 'Post-COVID Bull (2021)': ('2021-01-01', '2021-12-31'), | |
| 131 | + 'Rate Hiking (2022)': ('2022-01-01', '2022-12-31'), | |
| 132 | + 'Recovery (2023-2024)': ('2023-01-01', '2024-12-31'), | |
| 133 | + 'Recent (2025)': ('2025-01-01', '2025-12-31'), | |
| 134 | +} | |
| 135 | + | |
| 136 | +CRISES = { | |
| 137 | + 'Flash Crash (2010-05-06)': '2010-05-06', | |
| 138 | + 'Euro Crisis (2011-08-05)': '2011-08-05', | |
| 139 | + 'China Deval (2015-08-24)': '2015-08-24', | |
| 140 | + 'Volmageddon (2018-02-05)': '2018-02-05', | |
| 141 | + 'COVID Crash (2020-03-16)': '2020-03-16', | |
| 142 | + 'Meme Stocks (2021-01-27)': '2021-01-27', | |
| 143 | + 'Rate Shock (2022-06-13)': '2022-06-13', | |
| 144 | + 'SVB Crisis (2023-03-10)': '2023-03-10', | |
| 145 | + 'Aug VIX Spike (2024-08-05)': '2024-08-05', | |
| 146 | +} | |
| 147 | + | |
| 148 | +VIX_REGIME_BINS = [0, 15, 20, 25, 35, 100] | |
| 149 | +VIX_REGIME_LABELS = ['VeryLow', 'Low', 'Medium', 'High', 'Crisis'] | |
| 150 | +VIX_REGIME_LABELS_VERBOSE = ['Very Low (<15)', 'Low (15-20)', 'Medium (20-25)', | |
| 151 | + 'High (25-35)', 'Crisis (>35)'] | |
added
src/wp7/data_io.py
+113 −0
@@ -0,0 +1,113 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Data access layer: processed parquets and (optional) raw DuckDB stores. | |
| 6 | + | |
| 7 | +The raw stores are external to this repository and may be absent. Every | |
| 8 | +accessor that touches them raises :class:`RawDataUnavailableError` with an | |
| 9 | +actionable message instead of a bare stack trace, so downstream scripts can | |
| 10 | +skip raw-dependent sections gracefully. | |
| 11 | +""" | |
| 12 | + | |
| 13 | +from pathlib import Path | |
| 14 | + | |
| 15 | +import pandas as pd | |
| 16 | + | |
| 17 | +from . import config | |
| 18 | + | |
| 19 | + | |
| 20 | +class RawDataUnavailableError(FileNotFoundError): | |
| 21 | + """Raised when a raw DuckDB store is required but not present.""" | |
| 22 | + | |
| 23 | + | |
| 24 | +def _require(path: Path, hint: str) -> Path: | |
| 25 | + if not path.exists(): | |
| 26 | + raise FileNotFoundError( | |
| 27 | + f"Missing processed dataset: {path}\n{hint}" | |
| 28 | + ) | |
| 29 | + return path | |
| 30 | + | |
| 31 | + | |
| 32 | +# -------------------------------------------------------------------------- | |
| 33 | +# Processed datasets | |
| 34 | +# -------------------------------------------------------------------------- | |
| 35 | +def load_merged() -> pd.DataFrame: | |
| 36 | + """Master analysis panel (69 tickers × ~264k ticker-days, 2010–2025).""" | |
| 37 | + path = _require(config.MERGED_PARQUET, | |
| 38 | + "Run scripts/01_extract_data.py (requires the raw DuckDB stores).") | |
| 39 | + df = pd.read_parquet(path) | |
| 40 | + df['trade_date'] = pd.to_datetime(df['trade_date']) | |
| 41 | + return df | |
| 42 | + | |
| 43 | + | |
| 44 | +def load_realized_vol() -> pd.DataFrame: | |
| 45 | + """Daily realized-volatility panel derived from 5-minute bars.""" | |
| 46 | + path = _require(config.REALIZED_VOL_PARQUET, | |
| 47 | + "Run scripts/01_extract_data.py (requires the raw DuckDB stores).") | |
| 48 | + df = pd.read_parquet(path) | |
| 49 | + df['trade_date'] = pd.to_datetime(df['trade_date']) | |
| 50 | + return df | |
| 51 | + | |
| 52 | + | |
| 53 | +def load_correlation_divergence() -> pd.DataFrame: | |
| 54 | + """Implied vs realized correlation series with VIX and stress flags (RQ3).""" | |
| 55 | + path = _require(config.CORRELATION_DIVERGENCE_PARQUET, | |
| 56 | + "Run scripts/04_rq3_correlation_divergence.py " | |
| 57 | + "(requires the raw DuckDB stores).") | |
| 58 | + df = pd.read_parquet(path) | |
| 59 | + df['trade_date'] = pd.to_datetime(df['trade_date']) | |
| 60 | + return df | |
| 61 | + | |
| 62 | + | |
| 63 | +def load_price_magnet() -> pd.DataFrame: | |
| 64 | + """Filtered price-magnet observations saved by the RQ4 script.""" | |
| 65 | + path = _require(config.PRICE_MAGNET_PARQUET, | |
| 66 | + "Run scripts/05_rq4_greeks_decay_magnets.py " | |
| 67 | + "(requires the raw DuckDB stores).") | |
| 68 | + df = pd.read_parquet(path) | |
| 69 | + df['trade_date'] = pd.to_datetime(df['trade_date']) | |
| 70 | + return df | |
| 71 | + | |
| 72 | + | |
| 73 | +# -------------------------------------------------------------------------- | |
| 74 | +# Raw DuckDB stores (optional) | |
| 75 | +# -------------------------------------------------------------------------- | |
| 76 | +def raw_db_path(name: str) -> Path: | |
| 77 | + """Absolute path of a raw store; see ``config.RAW_DB_FILES`` for names.""" | |
| 78 | + return config.DATA_RAW / config.RAW_DB_FILES[name] | |
| 79 | + | |
| 80 | + | |
| 81 | +def raw_data_available(*names: str) -> bool: | |
| 82 | + """True when every requested raw store exists on disk.""" | |
| 83 | + names = names or tuple(config.RAW_DB_FILES) | |
| 84 | + return all(raw_db_path(n).exists() for n in names) | |
| 85 | + | |
| 86 | + | |
| 87 | +def open_raw_db(name: str): | |
| 88 | + """Open a raw DuckDB store read-only, or raise RawDataUnavailableError.""" | |
| 89 | + import duckdb | |
| 90 | + | |
| 91 | + path = raw_db_path(name) | |
| 92 | + if not path.exists(): | |
| 93 | + raise RawDataUnavailableError( | |
| 94 | + f"Raw store '{config.RAW_DB_FILES[name]}' not found under {config.DATA_RAW}.\n" | |
| 95 | + "These stores (~3.8B option records / 11.5B intraday bars) are kept outside " | |
| 96 | + "the repository. Point WP7_RAW_DATA_DIR to the directory that contains them, " | |
| 97 | + "or skip the raw-dependent steps — every downstream analysis runs from the " | |
| 98 | + "processed parquets in data/processed/." | |
| 99 | + ) | |
| 100 | + return duckdb.connect(str(path), read_only=True) | |
| 101 | + | |
| 102 | + | |
| 103 | +def load_vix_daily() -> pd.DataFrame: | |
| 104 | + """Daily VIX close aggregated from the 5-minute index store (raw-dependent).""" | |
| 105 | + con = open_raw_db("indices_5min") | |
| 106 | + vix = con.execute(""" | |
| 107 | + SELECT CAST(datetime AS DATE) AS trade_date, LAST(close) AS vix_close | |
| 108 | + FROM ohlcv WHERE symbol='VIX' GROUP BY CAST(datetime AS DATE) | |
| 109 | + ORDER BY trade_date | |
| 110 | + """).fetchdf() | |
| 111 | + con.close() | |
| 112 | + vix['trade_date'] = pd.to_datetime(vix['trade_date']) | |
| 113 | + return vix | |
added
src/wp7/econometrics.py
+287 −0
@@ -0,0 +1,287 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Econometric primitives shared by every analysis script. | |
| 6 | + | |
| 7 | +All estimators are deliberately implemented with :func:`numpy.linalg.lstsq` | |
| 8 | +and explicit sandwich formulas — exactly as in the original study — so that | |
| 9 | +re-running the pipeline reproduces the published numbers bit-for-bit. Do not | |
| 10 | +"modernize" the numerics (e.g. switch to statsmodels) without re-validating | |
| 11 | +every result table against ``results/``. | |
| 12 | +""" | |
| 13 | + | |
| 14 | +import numpy as np | |
| 15 | +import pandas as pd | |
| 16 | +from numpy.linalg import lstsq | |
| 17 | + | |
| 18 | + | |
| 19 | +# -------------------------------------------------------------------------- | |
| 20 | +# Transformations | |
| 21 | +# -------------------------------------------------------------------------- | |
| 22 | +def winsorize(s: pd.Series, q: float = 0.01) -> pd.Series: | |
| 23 | + """Clip a series at its ``q`` and ``1-q`` empirical quantiles.""" | |
| 24 | + lo, hi = s.quantile(q), s.quantile(1 - q) | |
| 25 | + return s.clip(lo, hi) | |
| 26 | + | |
| 27 | + | |
| 28 | +def standardize(X: np.ndarray) -> np.ndarray: | |
| 29 | + """Column-standardize (population std, zero-variance columns left at 1).""" | |
| 30 | + means = X.mean(axis=0) | |
| 31 | + stds = X.std(axis=0) | |
| 32 | + stds[stds == 0] = 1 | |
| 33 | + return (X - means) / stds | |
| 34 | + | |
| 35 | + | |
| 36 | +def add_constant(X: np.ndarray) -> np.ndarray: | |
| 37 | + """Prepend an intercept column of ones.""" | |
| 38 | + return np.column_stack([np.ones(len(X)), X]) | |
| 39 | + | |
| 40 | + | |
| 41 | +def design_matrix(data: pd.DataFrame, features: list) -> np.ndarray: | |
| 42 | + """Standardized feature matrix with intercept, ready for ``lstsq``.""" | |
| 43 | + return add_constant(standardize(data[features].values)) | |
| 44 | + | |
| 45 | + | |
| 46 | +# -------------------------------------------------------------------------- | |
| 47 | +# OLS with robust inference | |
| 48 | +# -------------------------------------------------------------------------- | |
| 49 | +def ols(X: np.ndarray, y: np.ndarray) -> np.ndarray: | |
| 50 | + """Least-squares coefficients.""" | |
| 51 | + coefs, _, _, _ = lstsq(X, y, rcond=None) | |
| 52 | + return coefs | |
| 53 | + | |
| 54 | + | |
| 55 | +def r_squared(y: np.ndarray, y_pred: np.ndarray) -> float: | |
| 56 | + ss_res = np.sum((y - y_pred) ** 2) | |
| 57 | + ss_tot = np.sum((y - y.mean()) ** 2) | |
| 58 | + return 1 - ss_res / ss_tot if ss_tot > 0 else 0 | |
| 59 | + | |
| 60 | + | |
| 61 | +def adjusted_r_squared(r2: float, n: int, k: int) -> float: | |
| 62 | + return 1 - (1 - r2) * (n - 1) / (n - k - 1) | |
| 63 | + | |
| 64 | + | |
| 65 | +def _xtx_inverse(X: np.ndarray) -> np.ndarray: | |
| 66 | + try: | |
| 67 | + return np.linalg.inv(X.T @ X) | |
| 68 | + except np.linalg.LinAlgError: | |
| 69 | + return np.linalg.pinv(X.T @ X) | |
| 70 | + | |
| 71 | + | |
| 72 | +def hc1_tstats(X: np.ndarray, y: np.ndarray, coefs: np.ndarray, | |
| 73 | + n_features: int) -> tuple: | |
| 74 | + """Heteroskedasticity-robust (HC1) standard errors and t-statistics. | |
| 75 | + | |
| 76 | + ``n_features`` excludes the intercept; the small-sample factor is | |
| 77 | + ``n / (n - k - 1)`` as in the original study. | |
| 78 | + """ | |
| 79 | + n = len(y) | |
| 80 | + e = y - X @ coefs | |
| 81 | + XtX_inv = _xtx_inverse(X) | |
| 82 | + # X' diag(e²) X computed by broadcasting (identical to the dense-diagonal | |
| 83 | + # formula, but O(nk) memory instead of O(n²)). | |
| 84 | + S = (X * (e ** 2)[:, None]).T @ X * n / (n - n_features - 1) | |
| 85 | + se = np.sqrt(np.abs(np.diag(XtX_inv @ S @ XtX_inv))) | |
| 86 | + t_stats = coefs / np.where(se > 0, se, 1) | |
| 87 | + return se, t_stats | |
| 88 | + | |
| 89 | + | |
| 90 | +def newey_west_tstats(X: np.ndarray, y: np.ndarray, coefs: np.ndarray, | |
| 91 | + n_lags: int = 5) -> tuple: | |
| 92 | + """Newey-West HAC standard errors with Bartlett kernel weights.""" | |
| 93 | + n, k = X.shape | |
| 94 | + e = y - X @ coefs | |
| 95 | + XtX_inv = _xtx_inverse(X) | |
| 96 | + | |
| 97 | + S = np.zeros((k, k)) | |
| 98 | + for j in range(n): | |
| 99 | + S += e[j] ** 2 * np.outer(X[j], X[j]) | |
| 100 | + for lag in range(1, n_lags + 1): | |
| 101 | + w = 1 - lag / (n_lags + 1) | |
| 102 | + for j in range(lag, n): | |
| 103 | + cross = e[j] * e[j - lag] * np.outer(X[j], X[j - lag]) | |
| 104 | + S += w * (cross + cross.T) | |
| 105 | + | |
| 106 | + V = XtX_inv @ S @ XtX_inv | |
| 107 | + se = np.sqrt(np.abs(np.diag(V))) | |
| 108 | + t_stats = coefs / np.where(se > 0, se, 1) | |
| 109 | + return se, t_stats | |
| 110 | + | |
| 111 | + | |
| 112 | +def double_clustered_tstats(X: np.ndarray, y: np.ndarray, coefs: np.ndarray, | |
| 113 | + tickers: np.ndarray, dates: np.ndarray) -> tuple: | |
| 114 | + """Two-way (ticker + date) clustered SEs, Cameron-Gelbach-Miller (2011).""" | |
| 115 | + k = X.shape[1] | |
| 116 | + e = y - X @ coefs | |
| 117 | + XtX_inv = _xtx_inverse(X) | |
| 118 | + | |
| 119 | + def cluster_meat(labels: np.ndarray) -> np.ndarray: | |
| 120 | + S = np.zeros((k, k)) | |
| 121 | + for g in np.unique(labels): | |
| 122 | + mask = labels == g | |
| 123 | + u = (X[mask].T * e[mask]).sum(axis=1, keepdims=True) | |
| 124 | + S += u @ u.T | |
| 125 | + return S | |
| 126 | + | |
| 127 | + S_hc = (X * (e ** 2)[:, None]).T @ X | |
| 128 | + V = XtX_inv @ (cluster_meat(tickers) + cluster_meat(dates) - S_hc) @ XtX_inv | |
| 129 | + se = np.sqrt(np.abs(np.diag(V))) | |
| 130 | + t_stats = coefs / np.where(se > 0, se, 1) | |
| 131 | + return se, t_stats | |
| 132 | + | |
| 133 | + | |
| 134 | +def quantile_regression(X: np.ndarray, y: np.ndarray, tau: float, | |
| 135 | + max_iter: int = 50) -> np.ndarray: | |
| 136 | + """Quantile regression via iteratively reweighted least squares.""" | |
| 137 | + coefs = ols(X, y) | |
| 138 | + for _ in range(max_iter): | |
| 139 | + residuals = y - X @ coefs | |
| 140 | + weights = np.where(residuals >= 0, tau, 1 - tau) | |
| 141 | + weights = np.maximum(weights / (np.abs(residuals) + 1e-6), 1e-6) | |
| 142 | + Xw = X * weights[:, None] | |
| 143 | + try: | |
| 144 | + coefs = np.linalg.solve(Xw.T @ X, Xw.T @ y) | |
| 145 | + except np.linalg.LinAlgError: | |
| 146 | + break | |
| 147 | + return coefs | |
| 148 | + | |
| 149 | + | |
| 150 | +def pooled_regression_summary(data: pd.DataFrame, features: list, target: str, | |
| 151 | + label: str = "", min_obs: int = 100): | |
| 152 | + """Winsorize → standardize → pooled OLS with HC1; compact summary dict. | |
| 153 | + | |
| 154 | + Returns ``None`` when fewer than ``min_obs`` complete observations exist. | |
| 155 | + """ | |
| 156 | + sub = data[features + [target]].dropna() | |
| 157 | + if len(sub) < min_obs: | |
| 158 | + return None | |
| 159 | + for f in features: | |
| 160 | + sub[f] = winsorize(sub[f]) | |
| 161 | + sub[target] = winsorize(sub[target]) | |
| 162 | + | |
| 163 | + X = design_matrix(sub, features) | |
| 164 | + y = sub[target].values | |
| 165 | + coefs = ols(X, y) | |
| 166 | + r2 = r_squared(y, X @ coefs) | |
| 167 | + _, t = hc1_tstats(X, y, coefs, len(features)) | |
| 168 | + return { | |
| 169 | + 'label': label, | |
| 170 | + 'n_obs': len(sub), | |
| 171 | + 'r2': r2, | |
| 172 | + 'adj_r2': adjusted_r_squared(r2, len(y), len(features)), | |
| 173 | + 'n_significant': int(np.sum(np.abs(t[1:]) > 1.96)), | |
| 174 | + } | |
| 175 | + | |
| 176 | + | |
| 177 | +# -------------------------------------------------------------------------- | |
| 178 | +# Fama-MacBeth | |
| 179 | +# -------------------------------------------------------------------------- | |
| 180 | +def fama_macbeth(data: pd.DataFrame, features: list, target: str, | |
| 181 | + min_obs_per_day: int = 10, min_periods: int = 30): | |
| 182 | + """Daily cross-sectional regressions; time-series means and t-statistics. | |
| 183 | + | |
| 184 | + Returns ``(results_df, n_periods, n_tickers)`` or ``None`` when the panel | |
| 185 | + is too small. | |
| 186 | + """ | |
| 187 | + sub = data[features + [target, 'ticker', 'trade_date']].dropna() | |
| 188 | + if len(sub) < 100: | |
| 189 | + return None | |
| 190 | + for f in features: | |
| 191 | + sub[f] = winsorize(sub[f]) | |
| 192 | + sub[target] = winsorize(sub[target]) | |
| 193 | + | |
| 194 | + coef_series = [] | |
| 195 | + for dt in sub['trade_date'].unique(): | |
| 196 | + day = sub[sub['trade_date'] == dt] | |
| 197 | + if len(day) < min_obs_per_day: | |
| 198 | + continue | |
| 199 | + X = add_constant(standardize(day[features].values)) | |
| 200 | + try: | |
| 201 | + coef_series.append(ols(X, day[target].values)) | |
| 202 | + except np.linalg.LinAlgError: | |
| 203 | + continue | |
| 204 | + | |
| 205 | + if len(coef_series) < min_periods: | |
| 206 | + return None | |
| 207 | + | |
| 208 | + coef_array = np.array(coef_series) | |
| 209 | + avg = coef_array.mean(axis=0) | |
| 210 | + se = coef_array.std(axis=0) / np.sqrt(len(coef_series)) | |
| 211 | + t = avg / se | |
| 212 | + results = pd.DataFrame({ | |
| 213 | + 'variable': ['const'] + features, | |
| 214 | + 'fm_coefficient': avg, | |
| 215 | + 'fm_std_error': se, | |
| 216 | + 'fm_t_stat': t, | |
| 217 | + 'fm_significant_5pct': np.abs(t) > 1.96, | |
| 218 | + 'fm_significant_1pct': np.abs(t) > 2.576, | |
| 219 | + }) | |
| 220 | + return results, len(coef_series), sub['ticker'].nunique() | |
| 221 | + | |
| 222 | + | |
| 223 | +# -------------------------------------------------------------------------- | |
| 224 | +# Time-series: Granger causality and bivariate VAR | |
| 225 | +# -------------------------------------------------------------------------- | |
| 226 | +def granger_test(y: np.ndarray, x: np.ndarray, max_lag: int = 5): | |
| 227 | + """F-test of the null that ``x`` does not Granger-cause ``y``.""" | |
| 228 | + n = len(y) | |
| 229 | + if n < max_lag + 50: | |
| 230 | + return None | |
| 231 | + | |
| 232 | + Y = y[max_lag:] | |
| 233 | + X_r = np.column_stack([y[max_lag - i - 1:n - i - 1] for i in range(max_lag)]) | |
| 234 | + X_r = add_constant(X_r) | |
| 235 | + ssr_r = np.sum((Y - X_r @ ols(X_r, Y)) ** 2) | |
| 236 | + | |
| 237 | + X_u = np.column_stack([X_r] + [x[max_lag - i - 1:n - i - 1] for i in range(max_lag)]) | |
| 238 | + ssr_u = np.sum((Y - X_u @ ols(X_u, Y)) ** 2) | |
| 239 | + | |
| 240 | + n_eff = len(Y) | |
| 241 | + f_stat = ((ssr_r - ssr_u) / max_lag) / (ssr_u / (n_eff - 2 * max_lag - 1)) | |
| 242 | + | |
| 243 | + from scipy import stats | |
| 244 | + try: | |
| 245 | + p_value = 1 - stats.f.cdf(f_stat, max_lag, n_eff - 2 * max_lag - 1) | |
| 246 | + except Exception: | |
| 247 | + p_value = np.nan | |
| 248 | + return {'f_stat': f_stat, 'p_value': p_value, 'n_obs': n_eff} | |
| 249 | + | |
| 250 | + | |
| 251 | +def estimate_var(y1: np.ndarray, y2: np.ndarray, lags: int = 5, | |
| 252 | + irf_periods: int = 20): | |
| 253 | + """Bivariate VAR(p) by equation-wise OLS, with companion-form IRFs.""" | |
| 254 | + n = len(y1) | |
| 255 | + if n < lags + 50: | |
| 256 | + return None | |
| 257 | + | |
| 258 | + Y1, Y2 = y1[lags:], y2[lags:] | |
| 259 | + X_lags = [] | |
| 260 | + for lag in range(1, lags + 1): | |
| 261 | + X_lags.append(y1[lags - lag:n - lag]) | |
| 262 | + X_lags.append(y2[lags - lag:n - lag]) | |
| 263 | + X = np.column_stack([np.ones(len(Y1))] + X_lags) | |
| 264 | + | |
| 265 | + coefs1 = ols(X, Y1) | |
| 266 | + r2_1 = 1 - np.sum((Y1 - X @ coefs1) ** 2) / np.sum((Y1 - Y1.mean()) ** 2) | |
| 267 | + coefs2 = ols(X, Y2) | |
| 268 | + r2_2 = 1 - np.sum((Y2 - X @ coefs2) ** 2) / np.sum((Y2 - Y2.mean()) ** 2) | |
| 269 | + | |
| 270 | + # Companion matrix | |
| 271 | + A = np.zeros((2 * lags, 2 * lags)) | |
| 272 | + for lag in range(lags): | |
| 273 | + A[0, 2 * lag] = coefs1[1 + 2 * lag] | |
| 274 | + A[0, 2 * lag + 1] = coefs1[1 + 2 * lag + 1] | |
| 275 | + A[1, 2 * lag] = coefs2[1 + 2 * lag] | |
| 276 | + A[1, 2 * lag + 1] = coefs2[1 + 2 * lag + 1] | |
| 277 | + for i in range(2, 2 * lags): | |
| 278 | + A[i, i - 2] = 1.0 | |
| 279 | + | |
| 280 | + irf = np.zeros((irf_periods, 2, 2)) | |
| 281 | + for h in range(irf_periods): | |
| 282 | + power = np.eye(2 * lags) if h == 0 else power @ A | |
| 283 | + irf[h] = power[:2, :2] | |
| 284 | + | |
| 285 | + return {'coefs_eq1': coefs1, 'coefs_eq2': coefs2, | |
| 286 | + 'r2_eq1': r2_1, 'r2_eq2': r2_2, | |
| 287 | + 'irf': irf, 'n_obs': len(Y1)} | |
added
src/wp7/forecasting.py
+93 −0
@@ -0,0 +1,93 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Realized-variance forecasting utilities (RQ2/RQ5): OLS forecasts on raw | |
| 6 | +feature levels, rolling out-of-sample evaluation, and loss functions.""" | |
| 7 | + | |
| 8 | +import numpy as np | |
| 9 | +import pandas as pd | |
| 10 | +from numpy.linalg import lstsq | |
| 11 | + | |
| 12 | + | |
| 13 | +def ols_forecast(train: pd.DataFrame, test: pd.DataFrame, | |
| 14 | + features: list, target: str) -> dict: | |
| 15 | + """Fit OLS on ``train`` and evaluate on ``test`` (non-negative forecasts). | |
| 16 | + | |
| 17 | + Features enter in levels (no standardization), matching the original | |
| 18 | + forecasting design. Returns MSE, MAE, out-of-sample R², QLIKE and the | |
| 19 | + fitted coefficients. | |
| 20 | + """ | |
| 21 | + X_train = np.column_stack([np.ones(len(train)), train[features].values]) | |
| 22 | + y_train = train[target].values | |
| 23 | + coefs, _, _, _ = lstsq(X_train, y_train, rcond=None) | |
| 24 | + | |
| 25 | + X_test = np.column_stack([np.ones(len(test)), test[features].values]) | |
| 26 | + y_test = test[target].values | |
| 27 | + y_pred = np.maximum(X_test @ coefs, 0) | |
| 28 | + | |
| 29 | + mse = np.mean((y_test - y_pred) ** 2) | |
| 30 | + mae = np.mean(np.abs(y_test - y_pred)) | |
| 31 | + ss_res = np.sum((y_test - y_pred) ** 2) | |
| 32 | + ss_tot = np.sum((y_test - y_test.mean()) ** 2) | |
| 33 | + r2_oos = 1 - ss_res / ss_tot if ss_tot > 0 else 0 | |
| 34 | + | |
| 35 | + y_pred_safe = np.maximum(y_pred, 1e-10) | |
| 36 | + qlike = np.mean(y_test / y_pred_safe - np.log(y_test / y_pred_safe) - 1) | |
| 37 | + | |
| 38 | + return {'mse': mse, 'mae': mae, 'r2_oos': r2_oos, 'qlike': qlike, 'coefs': coefs} | |
| 39 | + | |
| 40 | + | |
| 41 | +def rolling_evaluation(data: pd.DataFrame, models: dict, target_col: str, | |
| 42 | + target_label: str, window: int = 500, | |
| 43 | + step: int = 250) -> pd.DataFrame: | |
| 44 | + """Per-ticker rolling-window out-of-sample evaluation of competing models. | |
| 45 | + | |
| 46 | + For each ticker and model, fits on ``window`` observations and evaluates | |
| 47 | + on the following ``step`` observations, advancing by ``step``. Returns | |
| 48 | + one row per (ticker, model) with average losses across windows. | |
| 49 | + """ | |
| 50 | + all_results = [] | |
| 51 | + for ticker in data['ticker'].unique(): | |
| 52 | + td = data[data['ticker'] == ticker].reset_index(drop=True) | |
| 53 | + if len(td) < window + 100: | |
| 54 | + continue | |
| 55 | + | |
| 56 | + for model_name, features in models.items(): | |
| 57 | + sub = td[features + [target_col]].dropna() | |
| 58 | + if len(sub) < window + 50: | |
| 59 | + continue | |
| 60 | + | |
| 61 | + losses = {'mse': [], 'mae': [], 'r2': [], 'qlike': []} | |
| 62 | + for start in range(0, len(sub) - window - 50, step): | |
| 63 | + train = sub.iloc[start:start + window] | |
| 64 | + test = sub.iloc[start + window:start + window + step] | |
| 65 | + if len(test) < 10: | |
| 66 | + continue | |
| 67 | + try: | |
| 68 | + res = ols_forecast(train, test, features, target_col) | |
| 69 | + except np.linalg.LinAlgError: | |
| 70 | + continue | |
| 71 | + losses['mse'].append(res['mse']) | |
| 72 | + losses['mae'].append(res['mae']) | |
| 73 | + losses['r2'].append(res['r2_oos']) | |
| 74 | + losses['qlike'].append(res['qlike']) | |
| 75 | + | |
| 76 | + if losses['mse']: | |
| 77 | + all_results.append({ | |
| 78 | + 'ticker': ticker, | |
| 79 | + 'model': model_name, | |
| 80 | + 'target': target_label, | |
| 81 | + 'avg_mse': np.mean(losses['mse']), | |
| 82 | + 'avg_mae': np.mean(losses['mae']), | |
| 83 | + 'avg_r2_oos': np.mean(losses['r2']), | |
| 84 | + 'avg_qlike': np.mean(losses['qlike']), | |
| 85 | + 'n_windows': len(losses['mse']), | |
| 86 | + }) | |
| 87 | + return pd.DataFrame(all_results) | |
| 88 | + | |
| 89 | + | |
| 90 | +def diebold_mariano(e1: np.ndarray, e2: np.ndarray) -> float: | |
| 91 | + """DM statistic on squared-error differentials (positive favors model 2).""" | |
| 92 | + d = e1 ** 2 - e2 ** 2 | |
| 93 | + return np.mean(d) / (np.std(d) / np.sqrt(len(d))) if np.std(d) > 0 else 0 | |
added
src/wp7/portfolio.py
+78 −0
@@ -0,0 +1,78 @@ | ||
| 1 | +# ============================================================================= | |
| 2 | +# Author: Simon-Pierre Boucher | |
| 3 | +# Contact: contact@spboucher.ai | |
| 4 | +# ============================================================================= | |
| 5 | +"""Portfolio construction: daily cross-sectional quintile sorts, double | |
| 6 | +sorts, and performance statistics (annualized returns, Sharpe ratios).""" | |
| 7 | + | |
| 8 | +import numpy as np | |
| 9 | +import pandas as pd | |
| 10 | + | |
| 11 | + | |
| 12 | +def portfolio_sort(data: pd.DataFrame, sort_var: str, ret_var: str, | |
| 13 | + n_quantiles: int = 5): | |
| 14 | + """Daily equal-weighted quantile portfolios sorted on ``sort_var``. | |
| 15 | + | |
| 16 | + Returns a dict keyed by quantile (1..n) plus ``'LS_5_1'`` (top minus | |
| 17 | + bottom), each holding performance statistics, or ``None`` when the | |
| 18 | + sample is too small. Annualization: 252 for 1-day returns, 52 otherwise. | |
| 19 | + """ | |
| 20 | + data = data[[sort_var, ret_var, 'ticker', 'trade_date']].dropna() | |
| 21 | + if len(data) < 1000: | |
| 22 | + return None | |
| 23 | + | |
| 24 | + data['quantile'] = data.groupby('trade_date')[sort_var].transform( | |
| 25 | + lambda x: pd.qcut(x, n_quantiles, labels=False, duplicates='drop') + 1 | |
| 26 | + if len(x) >= n_quantiles else np.nan | |
| 27 | + ) | |
| 28 | + data = data.dropna(subset=['quantile']) | |
| 29 | + data['quantile'] = data['quantile'].astype(int) | |
| 30 | + | |
| 31 | + port_ret = data.groupby(['trade_date', 'quantile'])[ret_var].mean().reset_index() | |
| 32 | + port_ret = port_ret.pivot(index='trade_date', columns='quantile', values=ret_var) | |
| 33 | + | |
| 34 | + # Long-short: top quantile minus bottom (key 'LS_5_1' for quintiles, | |
| 35 | + # 'LS_10_1' for deciles, ...) | |
| 36 | + ls_key = f'LS_{n_quantiles}_1' | |
| 37 | + if n_quantiles in port_ret.columns and 1 in port_ret.columns: | |
| 38 | + port_ret[ls_key] = port_ret[n_quantiles] - port_ret[1] | |
| 39 | + else: | |
| 40 | + return None | |
| 41 | + | |
| 42 | + results = {} | |
| 43 | + for q in list(range(1, n_quantiles + 1)) + [ls_key]: | |
| 44 | + if q not in port_ret.columns: | |
| 45 | + continue | |
| 46 | + s = port_ret[q].dropna() | |
| 47 | + ann_factor = 252 if '1d' in ret_var or ret_var == 'ret_1d' else 52 | |
| 48 | + results[q] = { | |
| 49 | + 'mean_daily': s.mean(), | |
| 50 | + 'std_daily': s.std(), | |
| 51 | + 'annualized_return': s.mean() * ann_factor, | |
| 52 | + 'annualized_vol': s.std() * np.sqrt(ann_factor), | |
| 53 | + 'sharpe': (s.mean() / s.std() * np.sqrt(ann_factor)) if s.std() > 0 else 0, | |
| 54 | + 't_stat': (s.mean() / (s.std() / np.sqrt(len(s)))) if s.std() > 0 else 0, | |
| 55 | + 'n_days': len(s), | |
| 56 | + 'pct_positive': (s > 0).mean(), | |
| 57 | + 'max_drawdown': (s.cumsum() - s.cumsum().cummax()).min(), | |
| 58 | + } | |
| 59 | + return results | |
| 60 | + | |
| 61 | + | |
| 62 | +def double_sort(data: pd.DataFrame, var1: str, var2: str, ret_var: str, | |
| 63 | + n1: int = 3, n2: int = 3) -> pd.DataFrame: | |
| 64 | + """Independent daily double sort; mean returns and t-stats per cell.""" | |
| 65 | + data = data.copy() | |
| 66 | + for var, col, n in ((var1, 'q1', n1), (var2, 'q2', n2)): | |
| 67 | + data[col] = data.groupby('trade_date')[var].transform( | |
| 68 | + lambda x, n=n: pd.qcut(x, n, labels=False, duplicates='drop') + 1 | |
| 69 | + if len(x) >= n else np.nan | |
| 70 | + ) | |
| 71 | + data = data.dropna(subset=['q1', 'q2']) | |
| 72 | + data['q1'] = data['q1'].astype(int) | |
| 73 | + data['q2'] = data['q2'].astype(int) | |
| 74 | + | |
| 75 | + results = data.groupby(['q1', 'q2'])[ret_var].agg(['mean', 'std', 'count']).reset_index() | |
| 76 | + results['mean_bps'] = results['mean'] * 10000 | |
| 77 | + results['t_stat'] = results['mean'] / (results['std'] / np.sqrt(results['count'])) | |
| 78 | + return results | |
| 79 | ||