How teddyarvin86-coder/rmt-portfolio works
RMT Portfolio is a quantitative research package for denoising return covariance estimates, constructing portfolios, and evaluating them out of sample. A researcher selects a universe and experiment; price data is loaded and cleaned, covariance spectra are analyzed and denoised, and allocators produce weights for rolling backtests. Separate research workflows assess spectral structure, forecast risk, and robustness, with results and figures as outputs. The README documents these product capabilities; sampled source excerpts are partial, so links between unsampled experiment code and internals reflect documented workflow rather than inspected call sites.
Main entry points: run_main_backtest.py Rolling backtest · run_risk_forecast.py Risk forecast · run_robustness.py Robustness scans · loader.py Price loader
Components 18
Market data
- Asset universes
src/rmt_portfolio/data/universes.py - Price loader
src/rmt_portfolio/data/loader.py - Experiment config
src/rmt_portfolio/config.py
Covariance research
- MP law
src/rmt_portfolio/rmt/mp_law.py - Covariance estimators
src/rmt_portfolio/rmt/denoise.py
Portfolio construction
- Weight allocators
src/rmt_portfolio/portfolio/optimizers.py - HRP clustering
src/rmt_portfolio/portfolio/clustering.py
Evaluation
- Rolling backtest
experiments/run_main_backtest.py - Walk-forward engine
src/rmt_portfolio/backtest/engine.py - Performance metrics
src/rmt_portfolio/backtest/metrics.py
Research outputs
- Spectrum analysis
experiments/run_spectrum_analysis.py - Risk forecast
experiments/run_risk_forecast.py - Robustness scans
experiments/run_robustness.py - Figure generation
experiments/run_figures.py - Research results
results - Research figures
figures
Other components
- Researcher
- Market data providers
Connections 32
- Researcher → Rolling backtest: runs
- Researcher → Spectrum analysis: runs
- Researcher → Risk forecast: runs
- Researcher → Robustness scans: runs
- Researcher → Figure generation: runs
- Rolling backtest → Experiment config: loads settings
- Spectrum analysis → Experiment config: loads settings
- Risk forecast → Experiment config: loads settings
- Robustness scans → Experiment config: loads settings
- Price loader → Asset universes: selects assets
- Price loader → Market data providers: downloads prices
- Rolling backtest → Price loader: loads returns
- Spectrum analysis → Price loader: loads returns
- Risk forecast → Price loader: loads returns
- Robustness scans → Price loader: loads returns
- Spectrum analysis → MP law: analyzes spectrum
- Rolling backtest → Covariance estimators: estimates covariance
- Risk forecast → Covariance estimators: evaluates estimators
- Robustness scans → Covariance estimators: varies estimator settings
- Covariance estimators → MP law: fits MP noise model
- Rolling backtest → Weight allocators: allocates weights
- Robustness scans → Weight allocators: varies allocation settings
- Weight allocators → HRP clustering: uses HRP clustering
- Rolling backtest → Walk-forward engine: runs strategies
- Walk-forward engine → Performance metrics: evaluates returns
- Risk forecast → Performance metrics: scores risk forecasts
- Rolling backtest → Research results: writes backtest tables
- Spectrum analysis → Research results: writes spectrum tables
- Risk forecast → Research results: writes forecast tables
- Robustness scans → Research results: writes scan tables
- Figure generation → Research results: reads result data
- Figure generation → Research figures: writes figures