Skip to main content

04Quantitative Risk Research Platform

Market Regime + Portfolio Risk Platform

An auditable research platform for portfolio risk, regime diagnostics, stress testing, and chronologically valid strategy evaluation.

  • Python
  • Streamlit
  • Risk Analytics
  • Regime Detection
  • Backtesting
Ownership
Owned project
Timeline
August 2026
Status
Open-source research platform
Market Regime + Portfolio Risk Platform
Market risk research dashboard showing portfolio metrics, regime diagnostics, stress tests, and chronologically controlled backtesting.

Research interface on the bundled sample portfolio; results are illustrative and not investment advice.

Overview

Builds validated ETF research datasets, estimates portfolio and tail risk, compares multiple regime-detection approaches, runs defined stress scenarios, and evaluates shifted, cost-aware strategies without presenting the output as investment advice.

Problem

Quantitative research becomes difficult to trust when data validation, feature construction, model fitting, signal timing, transaction costs, and reporting are scattered across notebooks. The project packages those stages into an inspectable workflow whose assumptions and failure modes can be reviewed.

My role

Designed and implemented the end-to-end research platform, including dataset construction, portfolio analytics, regime features and models, stress testing, backtest controls, reporting, automated tests, CI, and the Streamlit interface.

System architecture

Config

Configuration

Ingest

Data ingestion

Validate

Data validation

Features

Feature + risk layer

Regimes

Regime research

Stress

Stress engine

Backtest

Backtest lab

Report

Reporting

Proof

Validation

What I built

  • Configuration-driven ETF universe and portfolio construction.
  • Price ingestion and validation with explicit data-quality reporting.
  • Return, volatility, drawdown, tail-risk, and risk-adjusted performance metrics.
  • Portfolio concentration, correlation, beta, and risk-contribution views.
  • Regime feature diagnostics.
  • Threshold, K-means, Gaussian-mixture, hidden-Markov, and change-point research approaches.
  • Chronological splitting and train-only fitting for learned transformations or models.
  • Defined stress scenarios and portfolio impact analysis.
  • Shifted-signal backtesting, so a decision cannot trade on the observation that created it.
  • Turnover and transaction-cost modeling.
  • Quarterly memo and report generation.
  • A tracked synthetic dataset and an offline-capable validation path.
  • Future-mutation tests intended to detect accidental look-ahead leakage.
  • Unit, integration, and Streamlit AppTest coverage across supported Python versions.

Technical decisions

  • Chronological boundaries instead of random train/test splitting for time-series research.
  • Train-only fitting for learned steps, to reduce leakage.
  • Explicit signal shifting before return attribution.
  • Configurable turnover and cost assumptions instead of frictionless-only reporting.
  • Multiple regime methods rather than presenting one method as ground truth.
  • Synthetic tracked inputs, so tests stay reproducible when remote market data is unavailable.
  • Data-quality and regime-diagnostic pages, so model output is never divorced from its inputs.
  • Future-data mutation tests as a direct guard against look-ahead errors.

Testing and validation

  • 322 passing checks across Python 3.12, 3.13, and 3.14 in the current CI matrix.
  • Unit, integration, and Streamlit AppTest coverage.
  • A deterministic synthetic-data path so tests run without remote market data.
  • Future-mutation tests that fail if a future observation can influence a past decision.
  • Nine Streamlit pages are implemented in the checked-in application and covered by AppTests.

Measured evidence

  • 322

    Automated checks in the CI matrix

    Latest successful main-branch CI run 32056520339 (2026-08-17): 322 checks on each of Python 3.12, 3.13, and 3.14; rechecked 2026-08-18.

    Point-in-time count, not a live counter.

  • 9

    Streamlit research pages in the application

    Counted from the checked-in application navigation; repository state rechecked 2026-08-18.

  • 5

    Regime-detection approaches compared

    Threshold, K-means, Gaussian mixture, hidden Markov, and change-point methods in the checked-in implementation.

A reproducible research environment that brings portfolio diagnostics, regime analysis, stress tests, and cost-aware backtesting into one inspectable workflow. The value is the research discipline and testability, not a forecasting edge.

Limitations

  • Research and education only; not investment advice.
  • No brokerage or live order-execution integration.
  • No claim of profitable live performance.
  • No claim that any regime method discovers a uniquely “true” market state.
  • The dashboard uses sample or synthetic data unless configured otherwise.
  • No public hosted demo is currently offered; the source remains available.
  • Model outputs depend on the chosen universe, period, data source, and assumptions.
  • Backtest output is historical and simulated; it is not evidence of future returns.

Technology stack

  • Python
  • Streamlit
  • scikit-learn
  • Risk Analytics
  • Regime Detection
  • Backtesting
  • Time Series
  • GMM
  • HMM
  • KMeans
  • GitHub Actions

Data and privacy

Runs on a configured ETF universe and a tracked synthetic dataset. No personal holdings, brokerage credentials, or account data are involved.