SPB Git forge

spb/wp6_uqo

Public
3commits 1branches 1releases
6.7 MBsize
maindefault branch
1 h agolast push
TeX 62.4% Python 37.5%
2.5 KB

# Raw data — WP 6

# 5-minute bars (stage 1: scripts/01_analysis.py)

Four DuckDB databases of 5-minute OHLCV bars (2008–2026), each with a single table ohlcv(symbol, datetime, open, high, low, close, volume):

File Symbols used Source
futures_5min.duckdb ES, NQ, GC, CL (continuous front-month futures; VX is present but not used) FirstRate Data (CME/COMEX/NYMEX)
fx_5min.duckdb EURUSD, USDJPY, GBPUSD FirstRate Data (spot FX)
crypto_5min.duckdb BTC, ETH FirstRate Data (crypto spot, USD, composite of exchanges)
index_5min.duckdb VIX FirstRate Data (CBOE index, disseminated 03:15–16:15 ET; 09:30–16:15 before April 2016)

Time stamps are naive U.S. Eastern time (verified: Globex maintenance break at 17:00–18:00, VIX first bar at 03:15/09:30). A "day" in results/daily_rv_all.csv is therefore an Eastern-time calendar day. The May 2026 version of the paper read these stamps as UTC in its intraday analysis; the October 2026 revision converts them explicitly (America/New_York → UTC).

The files total several GB and are not committed. Place them in this directory (or point WP6_DATA_DIR to their location) before running scripts/01_analysis.py (≈ 10 min, ≈ 8 GB RAM). The script keeps 5-minute log returns within 20 sample standard deviations of the mean, builds daily annualized realized volatility (≥ 20 bars per day) and writes results/daily_rv_all.csv and results/table1_descriptive_stats.csv. Known data feature: the composite crypto feed shows 5-minute price oscillations of 5–10 % between venues on several days of 2017 (BTC realized volatility above 1,000 % annualized on 2017-04-24/27, 2017-05-02/03, 2017-12-24); this is a property of the source, reproduced on the vendor's 1-minute feed.

# 1-minute bars (stage 3: scripts/03_intraday_sessions.py)

The intraday session analysis uses FirstRate 1-minute bars for ES, NQ, VIX and BTC held locally in the sibling repository finance/realized-volatility-horse-race/data/raw/ (futures_ES_1min.parquet, futures_NQ_1min.parquet, index_VIX_1min.parquet, crypto_BTC_1min.parquet; 2013-01 → 2026-07, naive U.S. Eastern time stamps, not committed). Set WP6_MINUTE_DIR to their location. The script aggregates them to the paper's 5-minute grid over 2016-03-11 → 2026-03-11.

# Stage 2 (scripts/02_connectedness_revision.py)

Needs only results/daily_rv_all.csv (committed): every VAR/GFEVD result of the paper can be reproduced without the raw bars.