ETF market-data analytics project for market-structure, ETF strategy and quant research interviews.
This repository focuses only on ETF market-quality analytics. It uses LSEG / Refinitiv data when available, and can fall back to cached daily price data for metrics that do not require bid/ask or NAV.
This is not a PnL trading strategy. It is a monitoring and analytics dashboard designed to measure how efficiently ETFs trade.
- Bid-ask spread: execution-cost proxy computed from
BIDandASK. - Premium/discount to NAV: fair-value alignment computed from ETF price and NAV.
- Tracking error: how closely the ETF follows its mapped benchmark.
- Beta: ETF sensitivity to the mapped benchmark.
- Realized volatility: recent realized risk.
- Drawdown: recent peak-to-trough loss.
- Liquidity indicators: volume and spread-based monitoring.
- Market-quality risk score: simple ranking of ETFs requiring attention.
ETF teams care about market quality because an ETF can be liquid, cheap to trade, and close to NAV, or it can show wider spreads, larger NAV gaps and higher tracking risk. This project turns those concepts into a reproducible Python workflow with LSEG data, benchmark mapping, reports and figures.
Install dependencies:
pip install -r requirements.txtRun with live LSEG Workspace data:
python scripts/pull_project1_lseg.py --rics SPY,EFA,EEM --with-nav --out data/raw_lseg_project1_nav_core
python scripts/audit_project1_benchmarks_lseg.py --etfs SPY,EFA,EEM,DIA,IWM,XLK,XLF,XLE
python scripts/run_project1_market_quality.py --lseg-folder data/raw_lseg_project1_nav_core
python scripts/plot_project1_market_quality.py
pytest -qRun in price-only fallback mode:
python scripts/run_project1_market_quality.py --use-daily-cache
python scripts/plot_project1_market_quality.py
pytest -qWith LSEG Workspace open, scripts/pull_project1_lseg.py pulls:
- price;
- bid;
- ask;
- volume;
- NAV, when
--with-navis used.
This enables true spread and true premium/discount analytics.
If live LSEG fields are not available, the project can use cached daily prices. In that mode, spread and NAV analytics are not faked. The report explicitly says when proxy metrics are used.
Raw LSEG / Refinitiv data is not committed. See DATA_LICENSE_NOTE.md.
reports/project1_market_quality.mdreports/project1_explanation_fr.mdreports/market_quality_report.mdreports/figures/project1/market_quality_dashboard.pngreports/figures/project1/liquidity_vs_tracking.pngreports/figures/project1/nav_alignment_detail.pngreports/figures/project1/premium_discount_timeseries.pngreports/figures/project1/spread_timeseries.pngreports/figures/project1/normalized_price_vs_nav.png
I built an ETF market-quality dashboard using LSEG Workspace data. It pulls ETF price, bid, ask, volume and NAV, maps ETFs to appropriate benchmarks such as S&P 500, MSCI EAFE and MSCI Emerging Markets, and computes spread, premium/discount to NAV, tracking error, beta, realized volatility and drawdown. The goal is not to generate PnL directly, but to monitor ETF trading quality and identify products that require attention.




