Status: Research — not ready for feature-dev
Author: Kristerpher Henderson
Date: 2026-04-23
Strategy IDs in scope: IC-001 (iron condor), CS-001 (credit spread), CSP-001 (cash-secured put)
Related sources: docs/data-science/sources/
A Markov chain is a stochastic process over a finite set of states where the probability of transitioning to the next state depends only on the current state — not on the path that led there. Formally, P(S_t+1 | S_t, S_t-1, ...) = P(S_t+1 | S_t). This memoryless property is the Markov assumption. In market applications, a plain Markov chain is used when the regime is directly observable — for example, a coarse VIX-bucket model: Low (VIX < 15), Elevated (15–25), High (25–35), Stress (> 35). You read the current bucket off the ticker, look up the transition matrix, and get a probability distribution over tomorrow's regime. The transition matrix is estimated from historical frequency counts, making the model transparent and auditable. Plain Markov chains are the right choice when your states map clearly onto observable data, your state space is small (2–5 states), and you want a model that a compliance reviewer can explain to a regulator in plain language. They are NOT the right tool when the true regime is latent — when, for example, the market is drifting into a high-volatility regime days before VIX reacts.
Hamilton (1989) laid the foundational treatment of Markov regime-switching in economic time series: a two-state Markov chain governs the mean growth rate of U.S. GNP, with states interpreted as expansion and contraction. The key insight is that the regime itself is unobserved; the econometrician must draw probabilistic inference about which state is active from observed returns. Hamilton's filter produces a smoothed probability of being in each state at each time — the canonical tool for applications that follow. The academic citation is: Hamilton, J.D. (1989). "A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle." Econometrica 57(2), 357–384. DOI: 10.2307/1912559.
An HMM extends the Markov chain by separating the latent state (hidden) from observed data (emissions). The model has three components: an initial state distribution, a transition matrix governing how the hidden state evolves, and an emission distribution governing what observables are generated by each hidden state. In finance, the hidden state is typically "market regime" and the observations are returns, log-volatility, volume ratios, or implied volatility surfaces. Crucially, you never observe the regime directly — you infer it from the noisy observation sequence using the Baum-Welch algorithm (expectation-maximization for fitting the model) and the Viterbi algorithm (finding the most likely state sequence). HMMs are the right tool when the relationship between regime and observable is probabilistic and noisy, when you want to track current regime in real time (the forward algorithm gives you P(state | observations so far)), and when you can tolerate the interpretive cost of discussing latent variables with stakeholders. The limitation is model selection: the number of hidden states, the choice of emission family (Gaussian, Student-t, multivariate), and whether to constrain the transition matrix are all researcher choices that must be validated out-of-sample to avoid overfitting. Wang, Lin, and Mikhelson (2020) demonstrated that an HMM trained on SPY returns and applied to factor rotation outperformed any individual factor model in out-of-sample data from 2017–2020, providing a concrete example of the approach working at meaningful scale (DOI: 10.3390/jrfm13120311).
Hamilton-style regime-switching extends the HMM framework to regression contexts: the parameters of a regression or autoregression — intercept, slope, variance — switch between regimes according to a Markov chain. A two-regime Markov-switching model of SPY daily returns, for instance, would simultaneously estimate two mean return parameters, two variance parameters, and a 2×2 transition matrix. This is the class of model in statsmodels.tsa.regime_switching.MarkovRegression. The regime-switching model is the right choice when you have a specific time-series model you want to make regime-aware (e.g., "the implied-volatility drift process behaves differently in stress vs. calm"), when you want explicit parameter estimates per regime for interpretability, and when you want the model output to be a smooth posterior probability over regimes at each date rather than a hard assignment. The limitation relative to HMMs is that it typically requires a pre-specified observation model, which means your assumptions about the distribution of returns within each regime are baked into the parameterization. The key reference for this class beyond Hamilton (1989) is Ang and Bekaert (2002), who applied a two-regime switching model to international equity returns and demonstrated that high-volatility regimes exhibit elevated correlations across markets — with direct relevance to any strategy that assumes independence across underlyings (Review of Financial Studies 15(4), 1137–1187. DOI: 10.1093/rfs/15.4.1137).
When NOT to use any of these: When your horizon is tick-level or intraday (regime models are calibrated on daily or weekly frequencies), when you need deterministic rules for regulatory review (latent-state probabilities are inherently probabilistic and can be hard to justify under audit), or when your dataset covers fewer than ~5 years of daily observations (transition-matrix estimation requires adequate samples in each regime — see §4).
IC-001)What states would we define? A 3-state model is the natural starting point: (1) Low-volatility / sideways (VIX < 18, SPY in a 3-month range channel), (2) Elevated-volatility / trending (VIX 18–28, directional drift), (3) High-volatility / stress (VIX > 28, tail event in progress). The Raxx iron condor rules — IVR > 50, 15–20 delta strikes, 30–45 DTE — were designed for conditions approximating state 1 and the lower end of state 2. State 3 is where the strategy's 2× stop gets triggered repeatedly.
What observations drive state inference?
At minimum: VIX level and 21-day rate-of-change, IVR (already in the data_schema.json trade log), SPY 20-day realized volatility, and the slope of the VIX term structure (VIX3M / VIX ratio). More informative but requiring additional data sourcing: VIX9D / VIX ratio (front-end stress vs. 30-day stress), put/call open interest skew, SPY 50-day vs. 200-day MA relationship.
Where does the Markov assumption likely hold vs. break? It holds reasonably well at the persistence level: low-vol regimes tend to persist for months and transition to elevated vol gradually, not instantly. The CBOE's own Volatility Managed BuyWrite index (which switches between a condor-like index and SPY depending on regime) was designed around this persistence property. However, the assumption breaks at crisis onset: the VIX spikes in March 2020 and February 2018 were effectively instantaneous on a 1-day observation frequency. A first-order Markov chain with transition matrix estimated over calm periods will underestimate the probability of crisis onset by design, because it has seen relatively few transitions from state 1 → state 3 in history.
Verdict: moderate fit. The iron condor is the most regime-dependent of the three strategies, so regime awareness is highest value here. But the Markov assumption's weakness at crisis onset is also most dangerous here — a hard stop at 2× credit is the right blunt instrument for that failure mode, and a Markov model does not replace it. A regime-aware model adds value in the entry filter (do not open a new condor when the smoothed probability of state 3 exceeds a threshold) and in the width/delta selection (state 1 allows tighter wings; state 2 widens; state 3 should trigger no-new-trade). Exit mechanics remain rule-based.
CS-001)What states would we define? A credit spread (put credit spread or call credit spread) is directional within the range-income framework. Relevant states here are: (1) Directional-bullish / low-vol (sells put spreads, high win rate), (2) Directional-bearish / low-vol (sells call spreads), (3) Elevated-vol non-directional (either spread, but wider credit justifies selling), (4) Trending strongly (dangerous — stop triggers consistently).
What observations drive state inference? In addition to the VIX inputs above: SPY 10-day price momentum, 52-week high proximity (percent of max price), and put/call volume skew. The directional component requires trend observations beyond what the condor-only model uses.
Where does the Markov assumption hold vs. break? Regime persistence helps here for the same reason as condors. The additional challenge: trend regimes exhibit autocorrelation — today's bullish momentum predicts tomorrow's. A first-order Markov chain does not capture this because it is memoryless; the spread's directional edge is precisely what the Markov assumption throws away. A regime-switching model can still help if the regimes are coarse enough (bull / bear / sideways), but it will not capture the fine-grained momentum dynamics that determine which direction to sell credit in.
Verdict: weak-to-moderate fit. A regime model adds modest value as an entry gate (is the market in a strong-trend state? if so, widen spreads and tighten position size) but does not replace the directional signal Kristerpher currently applies implicitly. This is identified in strengths_weaknesses.md as "no defined entry edge" — a Markov regime filter is a partial improvement, not a complete solution. The directional signal layer (trend indicator) is probably a more impactful build for this strategy.
CSP-001)What states would we define? The CSP is a bullish-bias income trade: selling downside puts on underlyings you are willing to own at a discount. States: (1) Low-vol bull (optimal — high win rate, IVR elevated enough for decent credit), (2) Elevated-vol / moderate drawdown (trade with smaller size, wider OTM delta), (3) Stress / crash (do not sell new CSPs; existing positions at max risk).
What observations drive state inference? VIX, IVR, 20-day realized vol, SPY drawdown from 52-week high (a simple but effective stress indicator). Because the CSP is single-leg and single-direction, the observation set needed is simpler than the condor.
Where does the Markov assumption hold vs. break? Regime persistence is particularly relevant for CSPs because the trade's holding period (30–45 DTE) is long relative to a momentum move. A vol regime that persists for 4–6 weeks will have a material impact on P&L. The Markov assumption holds reasonably at this frequency. The break point: if the underlying is specifically selected for company-level events (earnings, FDA decisions), individual ticker regimes are not well-described by an index-level Markov model.
Verdict: moderate fit. A 3-state regime model as an entry filter (trade aggressively in state 1, reduce size in state 2, no new trades in state 3) maps cleanly onto the Raxx CSP workflow and addresses the documented weakness of "no volatility regime awareness." This is probably the lowest-friction integration point for a first Markov-adjacent feature.
Problem statement: strengths_weaknesses.md lists "no volatility regime awareness" as a distinct weakness. Currently, Raxx applies a fixed IVR > 50 threshold regardless of whether that elevated IV is occurring in a structurally calm market (regime 1, where a condor performs well) or in the early stages of a volatility explosion (regime 3, where IVR reads high but the trade loses immediately). The system enters trades in identical fashion across all environments.
Model class: 3-state Hidden Markov Model, Gaussian emissions on daily VIX log-returns and SPY 20-day realized volatility ratio. 3 states: Calm, Elevated, Stress. Model is pre-trained on 15+ years of daily VIX + SPY data; during live use, the Hamilton filter updates the posterior state probability each market close. The model does not retrain continuously — it is recalibrated quarterly on a rolling window to avoid survivorship bias.
Data inputs:
- SPY daily OHLCV (available via Alpaca Market Data; Raxx already has this feed per mbt-paper-trading-engine.md §7)
- CBOE VIX daily close (free; CBOE public data, no licensing issues)
- VIX3M daily close (free; CBOE) — slope of term structure (VIX3M / VIX)
- IVR for the selected underlying — already in the data_schema.json trade-log schema and captured at trade entry
Backtest spec:
- Training window: Jan 2007 – Dec 2019 (includes 2008–09 stress, 2010–11 European debt crisis, 2018 vol spikes)
- Test window: Jan 2020 – Dec 2025 (COVID crash + recovery, 2022 bear, 2023–24 bull)
- Baseline: Raxx baseline rule (enter any day IVR > 50, fixed parameters)
- Regime-aware rule: same entry rules, but suppress new opens when P(state = Stress) > 0.40
- Metrics: total trades, win rate, mean P&L per trade, max drawdown, Sharpe vs. baseline
- Slippage model: NBBO mid + 1 tick per leg (matches MBT fill model per mbt-paper-trading-engine.md §4)
- Options data source: ORATS historical data (referenced by spintwig LLC; requires paid license at ~$200/month for history — must be flagged to business-legal-researcher for data licensing review)
Deliverable: A regime_state signal output — a JSON object posted to a Redis key each market close:
{
"as_of_date": "2026-04-23",
"state_probabilities": {"calm": 0.72, "elevated": 0.24, "stress": 0.04},
"current_state": "calm",
"entry_gate": "open",
"model_version": "hmm-v1.0"
}
entry_gate is "open" when P(stress) < 0.40, "caution" when 0.40 ≤ P(stress) < 0.65, "closed" when P(stress) ≥ 0.65. The strategy layer reads entry_gate; it never reads raw state probabilities.
Plug-in point in MBT: The Celery task mbt.run_backtest (per §8 task inventory) is the closest analog; a new task mq_a.compute_regime_signal would run at market close (after EOD data lands), write to Redis, and be consumed by the order-routing logic in MQ-A. The signal is a gate, not a trade trigger — consistent with MBT invariant 2 (user-directed simulation; profile adjusts defaults, not auto-submits).
Problem statement: agent_prompt.txt specifies a fixed 15–20 delta for short strikes across all market conditions. This is a sensible default, but it is regime-blind: in an elevated-volatility state, 15-delta strikes on a 45-DTE iron condor sit proportionally closer to the current price than in a calm state, because the implied move (the expected range the strategy is trading around) is wider. The practical effect is that the condor wings are effectively tighter in stress, right when tighter wings have more risk.
Model class: Same 3-state HMM as Application A (shared infrastructure). On top of the regime signal, a simple lookup table maps (strategy, regime_state) to a recommended delta range:
| Strategy | Calm (state 1) | Elevated (state 2) | Stress (state 3) |
|---|---|---|---|
| Iron Condor | 15–20 delta | 10–15 delta | No new trade |
| Credit Spread | 15–20 delta | 12–16 delta | 10–12 delta (if trading) |
| CSP | 15–20 delta | 12–16 delta | No new CSP |
These lookup values are derived from backtest — they are not hardcoded by intuition. The backtest spec (same data as Application A, varying delta target by regime) would determine which delta range maximizes Sharpe per regime. The model card for this feature must be explicit that the lookup table is a starting point with tested-but-uncertain out-of-sample stability.
Data inputs: Same as Application A. No additional data sources required.
Backtest spec: Walk-forward parameter search over (regime, delta_target) combinations. Training window 2007–2017; out-of-sample 2018–2025. Grid: deltas from 8 to 22 in steps of 2, per-regime. Baseline: fixed 16-delta across all regimes (current default).
Deliverable: A regime_params JSON payload extending the regime_state signal:
{
"as_of_date": "2026-04-23",
"current_state": "calm",
"recommended_params": {
"iron_condor": {"short_delta_min": 15, "short_delta_max": 20},
"credit_spread": {"short_delta_min": 15, "short_delta_max": 20},
"csp": {"short_delta_min": 15, "short_delta_max": 20}
}
}
Plug-in point in MBT: Antlers renders the regime-state card in the trade-setup UI. Before the user selects strikes, the card shows: "Current regime: Calm. Suggested delta range: 15–20. Learn why." The user retains final strike selection. This is compatible with investor-profile narrative tone (teaching_heavy, balanced, assume_familiarity per mbt-investor-profiles.md §5): the card verbosity is profile-tuned.
This surfaces regime awareness as a teaching surface rather than automation — consistent with ADR 0013's user-directed simulation invariant and the §202(a)(11) posture documented in mbt-paper-trading-engine.md §13.
Problem statement: execution_workflow.md identifies "reactive trade management" as a gap. The current exit system is a fixed tripwire (50% profit, 2× loss, 21 DTE). There is no signal that says "the regime has shifted since entry; exit now regardless of P&L tripwires." A strategy entered in a calm regime and now sitting in an elevated regime is structurally riskier than the entry P&L suggests — the 2× stop may not trigger until significant damage is done.
Model class: The same regime state is evaluated daily against the entry regime. A regime shift (calm → elevated or calm → stress since entry) triggers an alert. This is NOT a forced exit — that crosses the user-directed simulation line. It is a notification: "Regime has shifted since you entered this position. Review."
Data inputs: Same as Applications A and B. Additionally: entry date and entry regime (logged to the trade schema — the data_schema.json needs a regime_at_entry field added).
Backtest spec: Event-study design: for all iron condor entries in the 2007–2025 dataset, what is the P&L distribution conditional on (a) no regime shift during the hold vs. (b) regime shifted within 14 days of entry? The hypothesis is that (b) exhibits meaningfully worse P&L and/or a higher rate of reaching the 2× stop. This is testable and is a clean, low-assumption analysis.
Deliverable: A mbt_activities row of type system_nudge with body: "The volatility regime has shifted to [Elevated] since you entered this position on [date]. Current P&L: [$X]. Consider reviewing your exit plan." No recommendation on what to do. Surfaced in the activity feed; suppressable from Settings (per mbt-investor-profiles.md §8 pattern for stretch-goal nudges).
Plug-in point in MBT: The Celery task mbt.eod_mark_all (nightly) would additionally call a mq_a.check_regime_shift_alerts step that scans open positions, compares current regime to regime_at_entry, and writes the nudge activity where applicable.
The core Markov assumption — that P(S_t+1 | S_t) is sufficient — fails in at least two documented ways in equity/options markets:
Momentum and autocorrelation. Return autocorrelation is a well-documented stylized fact of equity markets. A first-order Markov chain treats today's state as sufficient to predict tomorrow's — it cannot represent "we have been in a trending state for three weeks and the trend is accelerating." The regime-switching literature addresses this partially with duration-dependent semi-Markov models, but at the cost of tractability. For the Raxx use case (daily entry decisions on 30–45 DTE positions), the coarseness of the regime definition likely absorbs enough momentum that first-order Markov is a reasonable approximation. But it must be tested, not assumed.
Crisis onset. As noted in §2.1, the 2020 COVID crash and 2018 VIX spike were effectively instantaneous transitions from calm to stress on daily data. A Markov model trained on historical transition frequencies will assign a low but non-zero probability to calm → stress, but the magnitude of the stress, once triggered, is not captured by the model. The transition probability is not the same as the loss magnitude — a regime model can correctly say "stress is unlikely" and still expose the position to catastrophic loss when stress occurs. The 2× stop rule is the practical answer to this; the regime model cannot replace it.
Regime clustering beyond Markov memory. Realized volatility exhibits long-memory / fractional integration (Granger and Joyeux, 1980 is foundational; ORATS research on VIX term structure references this implicitly). First-order Markov chains cannot reproduce the slow decay of autocorrelation in squared returns. The FHMV model (Augustyniak et al., 2018, Journal of Business & Economic Statistics, DOI: 10.1080/07350015.2017.1415910) was designed specifically to address this by using a product of multiple Markov chains. At Raxx's stage, that complexity is not warranted, but it is the academically honest ceiling on what a simple HMM can capture.
Transition-matrix estimation requires observing actual transitions in the historical data. With 3 states and daily observations from 2007–2025, there are approximately 4,500 trading days. The number of stress-regime days in that sample is roughly 250–350 (2008–09, 2011, 2015–16, 2018, 2020, 2022). That gives roughly 250–350 samples in the most critical state. This is acceptable for fitting a Gaussian HMM but not generous: estimation uncertainty for the calm → stress transition probability will be high, and the model should carry explicit confidence intervals on that parameter. If Raxx expands to individual equity underlyings (rather than SPX/SPY index level), each ticker's regime must be estimated independently, and most individual tickers will have fewer stress-regime samples than the index.
Rule-based VIX buckets (no model — just VIX thresholds): Lower complexity, fully auditable, no estimation risk. The CBOE's Volatility Managed BuyWrite index uses a simple threshold (17th vs. 95th percentile of VIX). For the entry gate, a simple rule ("no new positions when VIX > 28") captures 70–80% of the benefit of a 3-state HMM at zero modeling cost. This is the correct baseline — the HMM must beat it after accounting for implementation complexity.
Random forest / gradient boosting: These will fit a richer nonlinear regime surface and typically outperform HMMs on in-sample accuracy. The risk is look-ahead bias in feature construction and overfitting to realized market history. Walk-forward validation is mandatory and harder to implement correctly with tree-based models than with HMMs. For a first iteration, HMMs are preferable because the generative model structure constrains overfitting more naturally.
LSTMs / sequence models: LSTMs can model long-memory dynamics that HMMs cannot. The tradeoff: far more data hungry, opaque to interpretation, and their point estimate of "current regime" does not come with calibrated uncertainty the way an HMM posterior does. For Raxx, where the regime signal is surfaced as a teaching card in Antlers, interpretability matters — users and the narrative service need to explain "why is this regime elevated?" LSTMs do not provide that.
Bayesian state-space models (e.g., Kalman filter with switching): These allow for continuous latent state rather than discrete regimes. The tradeoff: substantially more complex to specify and calibrate; less intuitive for the investor-profile audience. Appropriate if Raxx eventually models IV surface dynamics directly; overkill for the entry-gate application.
hmmlearnMaturity and license: Actively maintained (GitHub stars ~3k; last release 2024), BSD-3 license, scikit-learn-style API. Note from search results: as of 2024 the library self-describes as "limited-maintenance mode" — meaning it receives bug fixes but not major new features. Suitable for research and production workloads that do not need deep customization.
Fit for production Raxx (Flask / Heroku): Strong fit for a research and offline-calibration context. The model is serialized via pickle/joblib; the fitted object is small (< 1MB for a 3-state Gaussian HMM) and loads in milliseconds. The forward algorithm (online regime inference) runs in microseconds per observation. Flask integration is trivial: load the serialized model at app startup, call model.predict_proba() on the daily feature vector.
Trade-off read: hmmlearn is the shortest path from research to a working prototype. The limited-maintenance posture means technical debt accrues if the library stops accepting security patches. At the point Raxx moves to production, a lightweight wrapper that isolates the hmmlearn dependency (so it can be swapped for a custom implementation if needed) is prudent.
statsmodels.tsa.regime_switchingMaturity and license: Part of statsmodels (actively maintained; BSD-3), MarkovRegression and MarkovAutoregression classes. As of statsmodels 0.14.4, the API is stable.
Fit for production Raxx: Strongest fit for the Hamilton regime-switching regression variant (Application B's parameter lookup, if we want regime-conditional IV drift models). The MLE fitting routine is slower than hmmlearn (minutes for a 15-year daily dataset vs. seconds), which makes it calibration-time code, not inference-time code. Inference (computing current smoothed probabilities) is fast once fitted.
Trade-off read: statsmodels is the most academically standard implementation for the Hamilton switching-regression family. The output mirrors the academic literature directly (transition matrix, regime probabilities, regime-conditional parameter estimates), making backtests easier to validate against published results. Recommended for the parameter-tuner application (B) where interpretability of per-regime parameter estimates matters.
pomegranateMaturity and license: v1.0 rewrote the backend from Cython to PyTorch (MIT license; actively developed). Supports GPU acceleration and out-of-core learning.
Fit for production Raxx: The PyTorch backend is a double-edged sword: GPU support and autograd are valuable for large-scale fitting, but PyTorch adds ~200MB to the container image compared to the hmmlearn + numpy stack. For a Flask deployment on Heroku with limited slug size, this is a real constraint. pomegranate is the right choice if Raxx later wants to fit Bayesian HMMs (with prior on transition matrices) or multivariate emission distributions beyond Gaussian — it supports those cleanly. For the 3-state Gaussian HMM described in Applications A–C, hmmlearn or statsmodels is simpler.
Trade-off read: Treat pomegranate as the upgrade path if the HMM needs to be extended (more states, non-Gaussian emissions, Bayesian updating). Do not start there — the operational complexity is disproportionate to the v1 use case.
Hamilton (1989) — "A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle." Econometrica 57(2), 357–384.
https://users.ssc.wisc.edu/~behansen/718/Hamilton1989.pdf
Directly relevant: established the regime-switching framework that both statsmodels.MarkovRegression and the HMM filter build on. The 2-state expansion/contraction model is the template for the 3-state calm/elevated/stress model we propose.
Ang and Bekaert (2002) — "International Asset Allocation With Regime Shifts." Review of Financial Studies 15(4), 1137–1187. https://academic.oup.com/rfs/article-abstract/15/4/1137/1568247 Directly relevant: demonstrated that volatility is regime-dependent across equity markets, and that the high-volatility regime is accompanied by elevated correlations — meaning a condor's uncorrelated-wing assumption is most fragile exactly when the regime is most dangerous. Informs the §4.1 crisis-onset limitation.
Wang, Lin, and Mikhelson (2020) — "Regime-Switching Factor Investing with Hidden Markov Models." Journal of Risk and Financial Management 13(12), 311. https://www.mdpi.com/1911-8074/13/12/311 Directly relevant: the closest published analog to Application A. Trained an HMM on SPY ETF data to identify market regimes, then applied regime-conditional investment rules. Out-of-sample period (2017–2020) includes the COVID crash. Non-peer-reviewed journal (MDPI, open access) but methodology is reproducible and results are reported honestly.
Shu, Yu, and Mulvey (2024) — "Downside Risk Reduction Using Regime-Switching Signals: A Statistical Jump Model Approach." Journal of Asset Management. https://arxiv.org/abs/2402.05272 Directly relevant: compared HMM-based regime detection vs. a statistical jump model for reducing drawdown on major equity indices, 1990–2023. Key finding: both approaches reduce drawdown relative to buy-and-hold; the jump model outperforms the HMM (Sharpe 0.78 vs. 0.51 vs. 0.46 for market). The jump model approach is worth evaluating as an alternative to the standard HMM once a baseline is established.
Augustyniak et al. (2018) — "A New Approach to Volatility Modeling: The Factorial Hidden Markov Volatility Model." Journal of Business & Economic Statistics 37(4). https://www.tandfonline.com/doi/abs/10.1080/07350015.2017.1415910 Relevant to §4.1: the FHMV model was developed specifically to address the HMM's inability to reproduce long-memory volatility autocorrelation. Its existence confirms that simple HMMs have a documented empirical ceiling for volatility modeling — relevant for managing expectations.
Bondarenko (2019) for CBOE — "Historical Performance of Put-Writing Strategies." https://cdn.cboe.com/resources/education/research_publications/PutWriteCBOE19_v14_by_Prof_Oleg_Bondarenko_as_of_June_14.pdf Directly relevant to CSP-001: over a 32-year period, the PUT index produced comparable annualized returns to the S&P 500 (9.54% vs. 9.80%) with substantially lower standard deviation (9.95% vs. 14.93%). The persistent volatility risk premium (average VIX 19.3% vs. average realized vol 15.1% from 1990–2018) is the quantified edge underlying Kristerpher's strategies. Not a peer-reviewed academic paper — it is CBOE-commissioned research and should be weighted accordingly.
CBOE Volatility Managed BuyWrite Index methodology — available at CBOE's index governance page. https://cdn.cboe.com/api/global/us_indices/governance/BXMVM_Methodology.pdf Directly relevant: the CBOE designed a live index that switches between a condor-like income strategy and the S&P 500 based on VIX percentile thresholds. This is an institutional-grade precedent for regime-aware options income strategy. Not peer-reviewed.
Spintwig LLC — Short SPX Iron Condor 45-DTE backtest series (2007–2024). https://spintwig.com/short-spx-iron-condor-45-dte-s1-signal-options-backtest/ Relevant: independent backtester using ORATS options history; confirms that a selective entry signal (open only on days where SPX/VIX options are priced above fair value) outperforms a naive every-day-entry baseline on total return, risk-adjusted return, max drawdown, and capital efficiency over 17+ years. This is the practitioner analog to Application A's regime gate. Not peer-reviewed; methodology not fully public (paywalled). Treat as a directional reference, not a reproducibility target.
Volatility Box — "Iron Condor in High Volatility: When to Sell, How Wide, and How to Manage." https://volatilitybox.com/research/iron-condor-high-volatility/ Relevant: practitioner article with a specific VIX-bucket delta table (delta 16 at VIX 12–18; delta 10–14 at VIX 35+) that is numerically consistent with Application B's proposed parameter lookup. Not peer-reviewed; no public backtest data disclosed. Useful as a calibration sanity check, not a scientific source.
Tastytrade research — "Volatility Metrics (IVR, IV%, IVx, HV)."
https://support.tastytrade.com/support/s/solutions/articles/43000539059
Relevant as source documentation for the IVR > 50 rule that Raxx's agent_prompt.txt inherits. Tastytrade's own research acknowledges that IV rank is "regime-blind" — an IV rank of 60 during a sustained stress period means something different than the same number in a calm market. This is an internal acknowledgment by the source of Kristerpher's primary entry rule that regime context matters. Not peer-reviewed; represents retail-adjacent practitioner opinion.
QuantStart — "Market Regime Detection using Hidden Markov Models in QSTrader."
https://www.quantstart.com/articles/market-regime-detection-using-hidden-markov-models-in-qstrader/
Relevant as a reference implementation walkthrough: practical code showing a 2-state Gaussian HMM fitted on SPY returns using hmmlearn, with a backtest in QSTrader. Not peer-reviewed; useful for cross-checking the technical implementation path described in Application A.
What software-architect needs to design:
- A new MQ-A micro-service (or Celery task group) that runs nightly after EOD market data lands. Input: daily VIX, VIX3M, SPY realized vol (last 20 days). Output: regime_state JSON written to a Redis key with TTL of 26 hours.
- Data model: a new mq_a_regime_signals table (date, state, state_probabilities JSON, model_version, computed_at) for audit and UI charting.
- Service interface: GET /api/mq-a/regime/current returning the current regime JSON; GET /api/mq-a/regime/history?days=90 returning the time series.
What feature-developer builds:
- Celery task mq_a.compute_regime_signal: loads serialized HMM from /backend_v2/api/services/mq_a/models/hmm_regime_v1.pkl, fetches last 30 days of VIX/SPY data from the market-data service, runs forward algorithm, writes to Redis and DB.
- REST endpoints above (thin wrappers over Redis read + DB query).
- Entry-gate enforcement in the trade-setup flow: before allowing a user to open a new IC/CS/CSP position, the service reads entry_gate from Redis. If "closed," the order is rejected with a structured message pointing to the regime card.
UX surface:
- Antlers: a regime-state card on the MBT dashboard. Three states, color-coded (green / yellow / red). Profile-tuned narrative (teaching-heavy: explains what the regime means and why it affects the strategy; balanced: abbreviated; assume-familiarity: just the state label and the gate status). The card links to a /learn anchor per the narrative-service pattern in mbt-investor-profiles.md §6.
- When a new trade is blocked by entry_gate = "closed", the order-rejection response includes the narrative payload explaining the regime context.
Rough effort estimate: - Architecture design: 2–3 days (software-architect) - Model training + serialization (research artifact): 2–3 days (data-scientist research dispatch) - Feature development (task, endpoints, entry-gate enforcement): 1 week (feature-developer) - Antlers regime card UI: 3–4 days (feature-developer) - QA + shadow validation: 1 week - Total: 3–4 weeks end-to-end
What software-architect needs to design:
- Extension of the regime_state Redis payload to include recommended_params (per §3, Application B).
- No new service needed — this is an extension of the Application A signal pipeline. Model card must include the lookup table and its backtest basis.
What feature-developer builds:
- Extension of mq_a.compute_regime_signal to populate recommended_params.
- Antlers: before strike selection in the trade-setup flow, display a regime-params card: "Suggested delta range: 15–20 (current regime: Calm)." User override is always available.
UX surface: Same regime card as Application A, extended with the delta-range suggestion. Rendered as a soft suggestion, not a constraint — consistent with user-directed simulation invariant.
Rough effort estimate: - Lookup table derivation (backtest dispatch): 1–2 days (data-scientist) - Feature development (extend task + UI card): 3–4 days (feature-developer) - Total: 1–2 weeks, largely parallel with Application A delivery
What software-architect needs to design:
- data_schema.json extension: add regime_at_entry field to the trade-log schema (maps to mbt_orders.legs JSONB or a new mbt_order_metadata column).
- Extension of the nightly mbt.eod_mark_all task to call regime-shift check.
What feature-developer builds:
- Within mbt.eod_mark_all (or a new mq_a.check_regime_shift_alerts sub-task): for each open position, compare regime_at_entry to current regime; if shift detected and not already nudged within last 7 days, write a system_nudge activity row.
- Antlers renders the nudge in the activity feed per the existing narrative-service pattern.
UX surface: Activity feed nudge card. Suppressable from Settings. Low-profile — not a banner, not a modal. Matches the stretch-goals nudge pattern from mbt-investor-profiles.md §8.
Rough effort estimate:
- Event-study backtest (validates the nudge hypothesis): 1–2 days (data-scientist)
- Feature development (shift detection + activity write): 3–4 days (feature-developer)
- Total: 1–2 weeks, logically after Application A ships (requires regime_at_entry to be populated)
Markov-chain / HMM modeling is a genuine fit for the Raxx options-income context, but the value is concentrated, not universal:
The strongest application is the regime-aware entry gate (Application A): directly addresses "no volatility regime awareness" from strengths_weaknesses.md, has a clean data pipeline from feeds Raxx already accesses, maps onto MBT invariants without violating the user-directed simulation constraint, and has a direct institutional precedent (CBOE's own Volatility Managed BuyWrite index).
The cautionary note is that a VIX threshold rule captures 70–80% of the HMM's benefit at near-zero implementation cost. Before committing to the HMM, the data-scientist research dispatch should first backtest the simple rule (no new positions when VIX > 28) and confirm the HMM meaningfully outperforms it on the out-of-sample period. If the simple rule is within 15% of the HMM on Sharpe and drawdown, the simple rule ships first as the v1 entry gate, with the HMM deferred to v2 when the dataset is richer.
The hard blocker before any backtest work begins: options history data licensing. ORATS is the most credible retail-grade historical options data source; a data-licensing review with business-legal-researcher is required before any backtest that prices hypothetical fills against historical options chains.
End of document.