How alphaAI Detects Market Risk: Comparing Our Proprietary Signal to Academic Standards
We tested our proprietary risk signal against 8 configurations of the most widely used regime detection model in quantitative finance. The results weren't close.

The Simple Version
The stock market has two moods: calm and stormy. During calm periods, most investments grow steadily. During stormy periods, portfolios can lose months of gains in a matter of weeks. The challenge is figuring out which mood the market is in right now, before the storm hits your portfolio.
Think of it like weather forecasting. You can't stop a hurricane, but if you know it's coming, you can board up the windows. That's what market risk detection does: it watches for signs of a storm so your portfolio can prepare.
Why this is hard
You might wonder: why can't we just look at the market and tell? The problem is that the market's true mood is hidden. You can see the prices, the trading volume, the headlines, but none of these directly tell you whether the market is in a calm period that will continue, or whether a storm is quietly forming. A big drop could be a brief dip in an otherwise healthy market, or the start of a prolonged crash. A calm day could be genuine stability, or the quiet before a sell-off. The data you can see is just a symptom. The underlying condition is invisible.
This is why the technique described below is called a "Hidden" Markov Model. The mood is hidden. All you can do is observe symptoms and make your best guess.
How most quantitative funds do it
The standard approach among quantitative hedge funds and institutional investors is called a Hidden Markov Model, or HMM. It's a technique from the 1980s that's still widely used today, and for good reason: academic research has shown that HMMs can reduce portfolio drawdowns during volatile periods, improve risk-adjusted returns in factor strategies, and help portfolios adapt to changing market conditions.
Imagine you're trying to figure out if your friend is having a good day or a bad day, but you can only hear their music through a wall. You can't knock on the door and ask. When you hear upbeat songs, you guess they're happy. When you hear slow, sad music, you guess they're upset. But here's the catch: you need to hear several songs before you're confident their mood actually changed. One sad song on a good day doesn't mean much.
That's how an HMM works. It listens to market data (the music) and tries to guess the market's mood (calm or stormy). It's a proven approach that has delivered real value for institutional investors. But it has a weakness: it can be slow to react when things suddenly change. By the time it's heard enough "sad songs" to be confident, the storm may have already done its damage.
How alphaAI does it differently
Instead of one person listening through one wall, imagine you have an entire neighborhood watching. One person hears the music. Another watches the lights. Someone across the street notices whether the car has moved. A neighbor tracks how often the mailbox gets checked. Someone else pays attention to whether the blinds are open or closed. Dozens of observers, each picking up on a different detail that the others might miss.
Each observer reports what they see. Individually, none of them can be certain. But when most of them agree the mood has changed, you can be far more confident, and far faster, than relying on any single clue.
That's how the alphaAI Market Risk Signal (AMRS) works. It processes hundreds of market features through an ensemble of independently trained machine learning models, each analyzing different dimensions of market behavior. When the ensemble reaches consensus that conditions have shifted, the signal flips. This breadth of observation is what makes it both faster and more reliable than the traditional approach.
What we found
We tested AMRS against the best available HMM configurations on real market data from 2019 to 2026. Here's what happened:
- AMRS achieved a regime separation score 7 times higher than the best HMM, meaning it is far more effective at distinguishing safe market conditions from dangerous ones.
- During the COVID crash of March 2020, AMRS detected the danger on the exact day the market peaked, before a single dollar was lost. It also identified the bottom and got back in immediately. The best HMM was significantly slower to react.
- During the 2022 bear market, AMRS switched to safety within 30 trading days, avoiding roughly two-thirds of the total decline. It then re-entered on the exact day the market bottomed.
- AMRS cut the worst portfolio drawdown nearly in half compared to buy-and-hold (from -34% to -18%).
The remainder of this paper provides the technical methodology and detailed results for readers who want to understand how we arrived at these conclusions.
Introduction
Market regime detection is the problem of identifying which state the market is currently in. Is it a low-volatility growth environment? A high-volatility drawdown? A transitional period? The answer determines how an investment strategy should position itself.
For institutional investors, regime-aware strategies have been a core risk management tool for decades. The ability to reduce exposure before or during major drawdowns, and re-enter the market as conditions stabilize, is a primary driver of risk-adjusted returns.
For retail investors, these tools have historically been inaccessible. The most widely used regime detection framework in quantitative finance, the Hidden Markov Model, requires statistical expertise to implement and calibrate. alphaAI's goal is to make institutional-grade risk management available to all investors.
This paper compares the alphaAI Market Risk Signal (AMRS) to multiple configurations of the industry-standard Hidden Markov Model, using a standardized evaluation framework drawn from the academic literature.
The Industry Standard: Hidden Markov Models
Hidden Markov Models were introduced to finance by Hamilton (1989) as a framework for modeling economic time series that exhibit distinct behavioral regimes. The core idea is that the market's true state (calm, stressed, or transitional) is unobservable, but we can infer it from observable data like returns, volatility, and market indicators.
HMMs have since become the most widely used regime detection framework in quantitative finance. Jim Simons described their role at Renaissance Technologies, and they remain the baseline against which newer methods are benchmarked (Bocconi Students Investment Club, 2025).
The academic literature has demonstrated the practical value of HMMs across multiple applications in portfolio management:
- Regime-switching factor strategies using HMMs have been shown to deliver higher absolute returns and better risk-adjusted performance than individual factor models, particularly by shielding portfolios from drawdowns during volatile periods (Koki et al., 2020).
- HMM-based dynamic asset allocation has been shown to yield superior portfolio results by adapting exposure to changing market conditions, rather than maintaining a static allocation through all environments (Kim et al., 2019).
- Smart beta portfolios using HMMs for regime detection have demonstrated improved performance over single-regime allocations, with particular benefits in managing short-term drawdown risk (Nystrup et al., 2015).
These results explain why HMMs remain the standard tool for institutional regime detection: they provide a principled, well-understood framework for adapting portfolios to market conditions.
We evaluated eight HMM configurations spanning the major design choices documented in the literature. The best-performing configuration used the following parameters:
- Features: S&P 500 daily returns and 10-day realized volatility (rolling standard deviation of returns). These directly observe price behavior rather than relying on derivative indicators like VIX.
- Training window: adaptively selected from 126 days (6 months), 252 days (1 year), or 378 days (1.5 years) using the Bayesian Information Criterion (BIC), which balances model accuracy against complexity.
- State count: 2 or 3 states (risk-on, neutral, risk-off), also selected by BIC at each retraining point based on whichever number of states best fits the current data.
- Retraining frequency: monthly (every 21 trading days), allowing the model to adapt to changing market structure.
- Execution lag: 1 trading day, preventing lookahead bias.
The other seven configurations tested variations of these parameters, including VIX-based features, PCA dimensionality reduction, fixed versus adaptive windows (126 to 504 trading days), and retraining frequencies from weekly to quarterly. All configurations used Gaussian emission distributions with full covariance matrices, following the methodology described in Nystrup et al. (2015) and Gupta et al. (2025).
Our Approach: The alphaAI Market Risk Signal
The alphaAI Market Risk Signal (AMRS) takes a fundamentally different approach from statistical time-series models. Rather than fitting a probabilistic model to a single data stream, AMRS synthesizes the outputs of an ensemble of independently trained machine learning models, each analyzing different dimensions of market behavior.
The ensemble architecture allows AMRS to incorporate a broader set of market signals than a single HMM can process, while the voting mechanism across models reduces the impact of any single model's noise or bias. The final output is a binary signal: risk-on (normal market conditions) or risk-off (elevated risk detected).
The specific models, features, and aggregation methodology are proprietary. For the purposes of this comparison, we evaluate AMRS purely on its output: how accurately does the binary signal separate favorable from unfavorable market conditions?
Evaluation Framework
We evaluate regime detection quality using three methods drawn from the academic literature on regime-switching investment strategies:
Regime Separation
For each model, we compute the annualized Sharpe ratio of S&P 500 buy-and-hold returns within each detected state. A useful regime signal should produce a risk-on state with a meaningfully higher Sharpe ratio than the risk-off state. The difference between the two (the "separation score") measures how effectively the model distinguishes favorable from unfavorable conditions.
0/1 Strategy Benchmark
Following the standard methodology in Nystrup et al. (2020) and Shu et al. (2024), we apply a simple 0/1 strategy: 100% invested in the S&P 500 during risk-on periods, 100% cash during risk-off periods. This isolates the signal's value by removing allocation complexity. We report CAGR, Sharpe ratio, maximum drawdown, and the Calmar ratio (CAGR divided by maximum drawdown).
All returns use forward alignment: the signal on day T is paired with the return from close of day T to close of day T+1. This ensures no lookahead bias, as the signal is generated from data available before day T's close.
Crisis Detection Lag
For each major drawdown in the evaluation period, we measure how many trading days elapsed between the S&P 500's peak and the model's first risk-off signal, and how many days elapsed between the trough and the model's return to risk-on. Faster detection means less capital exposed during the drawdown.
AMRS is evaluated on January 2019 through February 2026 (approximately 1,780 trading days). The HMM evaluation covers a longer period (2004 through 2026, approximately 8,300 trading days) due to greater data availability for its input features.
Results
Regime Separation
The separation score measures how well each model distinguishes favorable from unfavorable market conditions. Higher is better.
AMRS achieved a separation score of 3.298, approximately 7 times higher than the best HMM configuration. AMRS's risk-off state exhibited a strongly negative Sharpe ratio (-1.921), indicating that the signal accurately identifies periods where the market experiences significant declines. The best HMM's risk-off state showed a positive Sharpe (0.287), indicating that while it identifies somewhat different conditions across states, the separation between favorable and unfavorable periods is less pronounced.
0/1 Strategy Performance
Using the simplified 0/1 benchmark strategy (fully invested during risk-on, cash during risk-off), AMRS produced the following results:
AMRS outperformed buy-and-hold on every metric. CAGR increased from 15.3% to 23.4% while being invested only 86.3% of the time. Maximum drawdown was reduced by nearly half, from -33.9% to -17.9%. The Calmar ratio, which measures return per unit of drawdown risk, improved from 0.45 to 1.31.
Crisis Detection Speed
The speed at which a signal detects regime changes is critical to its practical value. We measured detection lag for two major drawdowns in the evaluation period.
COVID-19 (February-March 2020)
The S&P 500 peaked on February 19, 2020 and reached its trough on March 23, 2020, declining 33.9%.
AMRS switched to risk-off on the exact day the market peaked, before any drawdown had occurred. It then returned to risk-on on the day of the market's trough. The best HMM configuration was significantly slower to detect the regime change and slower to identify the recovery.
2022 Bear Market (January-October 2022)
The S&P 500 peaked on January 3, 2022 and reached its trough on October 12, 2022, declining 25.4%.
AMRS detected the 2022 bear market within 30 trading days, switching to risk-off after a 6.8% decline and avoiding the remaining 18.6% of the drawdown. It returned to risk-on on the day of the market's trough. The best HMM configuration required significantly more time to detect the regime change.
Conclusion
Hidden Markov Models are a proven and well-established tool in quantitative finance. They have demonstrated real value in reducing drawdowns, improving risk-adjusted returns, and enabling portfolios to adapt to changing market conditions. They remain the standard for institutional regime detection for good reason.
Our evaluation demonstrates that a purpose-built ensemble of modern machine learning models can meaningfully extend beyond what HMMs achieve. AMRS produced 7 times the regime separation, faster crisis detection, and stronger drawdown reduction. These improvements stem from the ensemble architecture's ability to process a broader set of market signals through independently trained models, rather than relying on the probabilistic assumptions of a single statistical framework.
This signal is one component of alphaAI Capital's broader investment management system, which combines regime detection with portfolio construction, position sizing, and automated risk management to deliver systematic, rules-based portfolio management.
References
[1] Hamilton, J.D. (1989). "A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle." Econometrica, 57(2), 357-384.
[2] Nystrup, P., Madsen, H., & Lindström, E. (2015). "Stylised facts of financial time series and hidden Markov models in continuous time." Quantitative Finance, 15(9), 1531-1541.
[3] Kim, W.C., Bae, G.I., & Mulvey, J.M. (2019). "Global Asset Allocation Strategy Using a Hidden Markov Model." Journal of Risk and Financial Management, 12(4), 168.
[4] Koki, C., Leonardos, S., & Piliouras, G. (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
[5] Nystrup, P., Lindström, E., & Madsen, H. (2020). "Learning hidden Markov models with persistent states by penalizing jumps." Expert Systems with Applications, 150, 113307.
[6] Shu, L., Lu, C., & Nystrup, P. (2024). "Downside Risk Reduction Using Regime-Switching Signals: A Statistical Jump Model Approach." SSRN Working Paper. https://arxiv.org/abs/2402.05272
[7] Gupta, R., Kapoor, S., Gupta, H., & Natesan, S. (2025). "A forest of opinions: A multi-model ensemble-HMM voting framework for market regime shift detection." Data Science in Finance and Economics, 5(4), 466-501. https://www.aimspress.com/article/id/69045d2fba35de34708adb5d
[8] Bocconi Students Investment Club (2025). "Regime Detection and Risk Allocation Using Hidden Markov Models." BSIC Research. https://bsic.it/regime-detection-and-risk-allocation-using-hidden-markov-models/
[9] Hirsa, A., Xu, Z., & Malhotra, R. (2024). "Explainable Regime Aware Investing." arXiv preprint. https://arxiv.org/abs/2603.04441
Important Disclosures
This content is for informational and educational purposes only and is not intended to constitute investment advice, a recommendation, solicitation, or offer to buy or sell any security.
All performance results presented in this paper are hypothetical and based on simulated, backtested data. They do not represent actual trading, actual client accounts, or actual investment returns. Hypothetical results have inherent limitations: they are designed with the benefit of hindsight, do not reflect the impact of all market factors, and do not account for transaction costs, slippage, taxes, management fees, or other expenses that would reduce returns. Actual results would differ materially.
The 0/1 strategy used for evaluation is a simplified benchmark framework for comparing signal quality. It is not a strategy offered by alphaAI Capital, and its hypothetical results should not be interpreted as representative of any actual investment strategy's expected performance.
The HMM configurations tested in this paper represent a sample of possible implementations. Different configurations, features, or calibration approaches may produce different results. The comparison is intended to illustrate relative signal quality against a well-established baseline, not to characterize the full range of HMM performance.
Past performance, whether actual or hypothetical, is not indicative of future results. All investing involves risk, including the possible loss of principal. No investment strategy, risk management technique, or technology can guarantee profits or eliminate the risk of loss.
The alphaAI Market Risk Signal is one input among many in alphaAI Capital's investment management system. Signal quality as measured in this paper does not guarantee the performance of any portfolio or strategy that uses the signal.
alphaAI Capital Management LLC is an investment adviser registered with the Securities and Exchange Commission. Registration does not imply a certain level of skill or training.
Systematic investing, made accessible.
Educational & Research Disclosure: The content provided is for informational and educational purposes only and is not intended to constitute investment advice, a recommendation, solicitation, or offer to buy or sell any security. Any discussion of market trends, historical performance, academic research, models, examples, or illustrations is presented solely to explain general financial concepts and does not represent a prediction, guarantee, or assurance of future results. Past performance is not indicative of future results. All investing involves risk, including the possible loss of principal.
Related articles
Frequently Asked Questions
Find answers to common questions about alphaAI.



