← Back to projects

Representative Case Study

Volatility Forecasting & Regime Analytics API

A versioned analytics API for volatility estimates and regime probabilities with explicit data lineage, uncertainty, and monitoring.

PROPOSED TECHNOLOGIES

PythonFastAPINumPyPostgreSQLMLflow-compatible registry

01

Problem

Volatility regimes are useful abstractions, but labels can change with the model, sample, and threshold. Treating a regime as an objective market fact can create brittle controls and misleading certainty.

The engineering problem is to expose estimates, probabilities, uncertainty, and lineage in a form downstream systems can consume without hiding model limitations.

02

Approach

The proposed pipeline produces a baseline realized-volatility estimate, one or more forecast horizons, and probabilistic regime scores. It stores the observation cutoff, feature version, model version, training window, and calibration metadata with each response.

Downstream users consume a continuous estimate and confidence information. Discrete regime labels are treated as a presentation layer with configurable thresholds and hysteresis, not as the underlying truth.

03

Architecture & proposed technologies

Python supports the research and service layers, with NumPy-based numerical routines and FastAPI for typed HTTP contracts. PostgreSQL stores dataset and model metadata. A registry with MLflow-compatible concepts can manage promotion states without coupling the API to a particular training framework.

  • Data preparation: point-in-time returns, calendars, and quality flags.
  • Training: rolling-origin evaluation with immutable configuration manifests.
  • Calibration: compare predicted distributions with realized outcomes by horizon.
  • Serving: return estimate, uncertainty, cutoff time, and model lineage together.
  • Monitoring: track freshness, feature drift, calibration drift, and fallback use.

04

Key technical decisions

A simple robust baseline is retained beside more complex candidates. Model promotion depends on out-of-sample behavior across multiple regimes rather than a single aggregate score. The API contract allows an explicit unavailable state instead of forcing a stale or invalid number.

Threshold changes are versioned independently from the statistical model. This separates business policy from forecast generation and makes changes easier to audit.

05

Validation process

Evaluation would use rolling-origin splits with embargoes where labels overlap. Forecast loss, calibration, stability, turnover induced by thresholds, and behavior during stressed periods would be inspected together. A naive persistence or historical-volatility forecast would remain a visible benchmark.

Scenario tests would cover missing bars, revised data, calendar gaps, extreme returns, and model-registry rollback. This case study contains no live forecast, trading result, or claim of predictive performance.

06

Limitations & status

This representative research design was prepared for this portfolio; it is not a deployed forecasting service. Regime definitions are model-dependent, structural breaks can invalidate historical relationships, and good statistical calibration does not guarantee profitable decisions. Production work would require an agreed universe, licensed data, latency target, validation policy, and accountable model governance.