How kholmetskii/realized-vol works
This Python package downloads Dukascopy tick data, turns quotes into FX-session realized variance, and compares next-session forecasts through a walk-forward evaluation. The principal workflow runs from tick acquisition through daily RV, forecast-table preparation, model refitting, smearing correction, and statistical scoring. README statements and sampled source support the main stages; several secondary evaluation capabilities are documented but their precise runtime wiring is not fully sampled.
Main entry points: experiment.py Experiment workflow · dataset.py Daily RV dataset · download.py Range downloader · dukascopy_client.py HTTP client
Components 22
Tick acquisition
- Range downloader
src/rvol/data/sources/dukascopy/download.py - HTTP client
src/rvol/data/sources/dukascopy/dukascopy_client.py - Tick decoder
src/rvol/data/sources/dukascopy/decoding.py - Hourly cache
src/rvol/data/sources/dukascopy/raw_hour_cache.py
Market data
- Tick files
- FX sessions
src/rvol/data/market/sessions.py - RV estimators
src/rvol/estimators/variance.py - Daily RV dataset
src/rvol/data/volatility/dataset.py
Forecasting
- Trailing features
src/rvol/data/preparation/trailing_mean_features.py - Forecast targets
src/rvol/data/preparation/targets.py - Forecast table
src/rvol/data/preparation/forecast_data.py - Experiment workflow
src/rvol/experiment.py - Model wrapper
src/rvol/models/forecast_model.py - Forecast rules
src/rvol/models/linear_regression.py - Walk-forward
src/rvol/walkforward/walk_forward.py
Evaluation
- Smearing correction
src/rvol/walkforward/smearing.py - QLIKE scoring
src/rvol/evaluation/qlike.py - DM comparison
src/rvol/evaluation/diebold_mariano.py - Robustness checks
src/rvol/evaluation/robustness.py - Comparison results
src/rvol/experiment.py
Other components
- Researcher
- Dukascopy feed
Connections 22
- Researcher → Range downloader: requests range
README.md - Range downloader → HTTP client: fetches hours
src/rvol/data/sources/dukascopy/download.py - HTTP client → Dukascopy feed: requests data
src/rvol/data/sources/dukascopy/dukascopy_client.py - Range downloader → Hourly cache: reads/writes hours
src/rvol/data/sources/dukascopy/download.py - Range downloader → Tick decoder: decodes hours
src/rvol/data/sources/dukascopy/download.py - Researcher → Daily RV dataset: builds dataset
README.md - Tick files → Daily RV dataset: reads tick chunks
src/rvol/data/volatility/dataset.py - Daily RV dataset → FX sessions: assigns sessions
src/rvol/data/volatility/dataset.py - Daily RV dataset → RV estimators: estimates variance
src/rvol/data/volatility/dataset.py - Researcher → Experiment workflow: runs comparison
README.md - Experiment workflow → Trailing features: builds features
src/rvol/experiment.py - Experiment workflow → Forecast targets: builds targets
src/rvol/experiment.py - Experiment workflow → Forecast table: prepares table
src/rvol/experiment.py - Daily RV dataset → Experiment workflow: supplies daily RV
README.md - Experiment workflow → Walk-forward: runs forecasts
src/rvol/experiment.py - Walk-forward → Model wrapper: fits model
src/rvol/walkforward/walk_forward.py - Model wrapper → Forecast rules: delegates fitting
src/rvol/models/forecast_model.py - Experiment workflow → Smearing correction: corrects forecasts
src/rvol/experiment.py - Experiment workflow → QLIKE scoring: scores QLIKE
src/rvol/experiment.py - QLIKE scoring → DM comparison: compares losses
- Experiment workflow → Comparison results: summarizes results
src/rvol/experiment.py - Researcher → Robustness checks: may inspect robustness
README.md