Regime systems and market intelligence dashboards for NinjaTrader. The advanced tools implement published quantitative models — HAR volatility forecasting, cointegration and statistical jump models — calibrated on twenty years of index futures data. The dashboards read trend structure and market risk in plain language. Every one of them measures market conditions; none of them tells you to place a trade.
Three quantitative regime tools that measure what state the market is in — how much movement to expect next, how linked two markets are, and which regime price is trading in. Each implements a published model from the quantitative finance literature, calibrated on twenty years of index futures data. They measure; they do not signal. Where a model was tested and failed to add anything, that is written into the description rather than left out.
A volatility forecast, a Kalman trend state, and a volume-profile gradient. The Market State Engine forecasts how much the market is about to move, then describes the state it is moving in. It publishes a per-bar volatility forecast for normalizing and sizing, an expected total move across the forecast horizon for setting stop and target distances, a Kalman-filtered level and velocity, and a force derived from the developing volume profile. It draws no signals — its only visible output is a regime wash behind price.
The forecast is a HAR model: Heterogeneous Autoregressive. The idea, from Fulvio Corsi, is that volatility is produced by participants acting on different horizons — intraday, weekly, monthly — so the coming variance is best predicted by combining realized variance measured over several window lengths at once. It is the workhorse of modern realized-volatility forecasting because it captures long memory with a handful of terms and almost never loses to far more complex models.
This implementation extends the standard form in four ways. Variance is split into upside and downside semivariance, since falling markets and rising markets do not forecast alike. A time-of-day factor learns the seasonal shape of the session online and projects it across the horizon — clock time is known in advance, so it adds no lookahead. A fluidity term measures price movement per unit of root volume, the square-root impact law form, and was the single largest improvement to the forecast. Finally, because the model is fitted in logs, the forecast is corrected with a smearing estimate rather than being exponentiated naively.
A volatility forecast is the input almost everything else depends on. It sets position size under volatility targeting, so exposure shrinks as risk rises; it scales stop and target distances so they mean the same thing in a quiet market and a violent one; it normalizes signals so a move can be compared across instruments and across time; and it feeds value-at-risk, margin and option-pricing work. Forecasts are compared using the QLIKE loss function, which penalizes under-forecasting volatility far more than over-forecasting it — the asymmetry a risk manager actually cares about.
The Kalman filter running alongside is a state-space estimator: it treats the true price level and its velocity as hidden states and updates them from each noisy observation, weighting new information by how uncertain it currently is. The volume-profile component borrows from statistical mechanics, converting the session’s traded volume into a density and then into a potential, so the gradient at the current price describes whether structure is pushing price away or pulling it in.
Against a random-walk benchmark on the most recent year, the shipped coefficients scored +37.2% (NQ) and +36.8% (ES) at the short horizon under QLIKE loss, and +73.4% and +72.2% at the long horizon. Fitted on 20 years of 1-minute NQ and ES, ratio back-adjusted so percentage moves stay exact across contract rolls.
Corsi, F. (2009), Journal of Financial Econometrics 7(2) — the HAR model. · Barndorff-Nielsen, Kinnebrock & Shephard — realized semivariance. · Duan, N. (1983) — smearing retransformation.
Cointegration regime between two markets — linked, or drifting apart. Apply it to one market’s chart and name a second. The engine answers four questions continuously: are the two holding a steady relationship or is one pulling away; how tightly are their bar-to-bar moves correlated right now, and is that normal for this pair; which one is leading since the last session close, after adjusting for how much each normally moves; and how far the spread sits from its own recent average, in standard deviations and in dollars per contract.
Two price series are cointegrated when each wanders unpredictably on its own, but some combination of the two stays inside a stable range. It is the formal version of “these two belong together.” The engine runs the Engle–Granger test on a rolling window: regress one market on the other, then run an Augmented Dickey–Fuller test on the leftover residual to ask whether that residual is stationary. The resulting statistic becomes a p-value through MacKinnon’s response surface, verified here against statsmodels to 1e-7.
The hedge ratio between the two is not fixed. It is tracked by a Kalman filter on log prices in the form set out by Ernest Chan, so the relationship moves as the markets do, and the estimate from before each bar defines that bar’s spread — nothing looks ahead. The spread’s distance from its rolling mean, in rolling standard deviations, is the stretch you see plotted.
Cointegration is the statistical foundation of pairs trading and statistical arbitrage. Relative-value desks use it to decide whether a spread is a genuinely mean-reverting object worth modeling or simply two assets that have drifted together by coincidence. The same machinery sets hedge ratios for offsetting positions, prices calendar and inter-market spreads, measures basis risk between a position and its hedge, and underpins index-arbitrage and ETF-versus-constituents work. The Kalman-filtered dynamic hedge ratio is the standard answer to the fact that a ratio fitted once by regression goes stale.
The thresholds come from measurement rather than convention. The textbook p < 0.05 is far too loose at this bar size: on deliberately unrelated pairs it fired on 10.5–12.5% of bars instead of 5%. The defaults are therefore tightened, with hysteresis so the label does not flicker, putting unrelated markets at 5.9–6.9%. Real pairs read linked well above that — ZB/ZN 28%, YM/ES 16%, RTY/ES 13%, NQ/ES 13%, NQ/YM 12%. 6B/6E came in at 7%, indistinguishable from noise, and we say so.
Engle, R. & Granger, C. (1987), Econometrica 55(2). · MacKinnon, J. (1994), Journal of Business & Economic Statistics 12(2). · Chan, E. (2013), Algorithmic Trading, Wiley. · Calibrated on 5-minute bars across NQ/ES, YM/ES, NQ/YM and RTY/ES 2006–2026, ZB/ZN and 6B/6E 2020–2026.
A statistical jump model that labels market state — and holds it. This assigns the market to one of three persistent states and, crucially, keeps it there. The dashboard reports the current state, how long it has been held, how close the market is to switching, and how far live conditions have drifted from the data the model was fitted on.
A statistical jump model is clustering with a memory. Ordinary clustering assigns each bar to whichever state it most resembles, which produces labels that flicker between neighbours from one bar to the next. A jump model adds a single term: a penalty for switching. Each bar chooses the state minimizing its distance to that state’s center plus a fixed cost if it differs from the last bar. Staying put is free; moving must be justified. That one term is the entire method, and it is why this is stable where a hidden Markov model flickers.
The state vector is two features measured over a rolling window: realized variance, and the same fluidity term used in the Market State Engine — price movement per unit of root volume. The classifier runs the online rule only. The offline smoothed path that the fitting procedure produces uses future information and must never be used live or in a backtest; it is not implemented here.
Regime models exist because a strategy’s edge is rarely constant — what works in a quiet, liquid market often fails in a violent one. Quant desks use regime labels to switch strategies on and off, to scale risk by state, to condition allocation in portfolio construction, and to stratify backtests so a result is not reported as robust when it only ever worked in one kind of market. Hidden Markov models are the traditional tool; jump models have gained ground because they need no assumption about the distribution inside each state and produce far more persistent labels, which matters when acting on a label costs money.
Calibration drift is the real failure mode, so it is shown rather than hidden. The fluidity feature divides by volume, and volume levels move over the years, so the dashboard continuously reports how far live features sit from the fitted distribution and tells you when a refit is due.
Bemporad, Breschi, Piga & Boyd (2018) — fitting jump models. · Nystrup, Kolm & Lindström — jump models for financial regimes. · Fitted on 5-minute Globex bars, NQ and ES, on the most recent two years and refitted annually.
Visual dashboards that read the market in plain language — trend structure and exhaustion and market state, and an overall market risk score. These are the place to start: no statistical background required, and everything is shown on the chart.
Five market states, read straight off the color of the chart. The Market Structure System classifies what kind of market you are in right now — mean reverting, range bound, transitional, trending, or trend accelerating — and colors the chart to match. Instead of reading six indicators and trying to reconcile them, you get one answer to the question that comes before every other one: is this a market that goes somewhere, or a market that comes back?
The states sit on a single axis, running from a market with no direction to one with nothing but direction. Knowing where you are on that axis changes what the same chart pattern means.
Mean reverting. Price is orbiting a value. Moves away from it are pulled back, extremes tend not to hold, and continuation is the exception rather than the rule.
Range bound. Price is contained between boundaries without actively snapping back to a center. There is no directional pull, but the edges are doing the work rather than a mid-point.
Transitional. The market is changing character — the old structure is breaking down and the new one has not established itself. This is the lowest-confidence state on the dashboard, and the system says so rather than guessing which way it resolves.
Trending. Direction with follow-through. Moves extend, pullbacks are shallow relative to the move, and structure keeps building in one direction.
Trend acceleration. The trend is expanding rather than merely continuing — range and momentum are both increasing. It is the strongest directional reading available, and also where exhaustion risk builds fastest, which is why the system tracks exhaustion alongside it.
The classification is shown as color on the chart itself, so the state is visible at a glance without reading a panel. When the color changes, the market’s character has changed — that transition is the information, as much as the state it lands in.
Almost every technique has a regime it belongs to. Fading extremes assumes mean reversion. Trading breakouts assumes direction and follow-through. Holding for an extended target assumes a trend that keeps going. Applied in the wrong state, each of these fails for reasons that have nothing to do with the setup itself — which is why “it stopped working” is usually a regime change rather than a broken method. Classifying the state first is how professional desks avoid that, and this is the visual, no-statistics version of what the Market Regime Classifier does numerically.
A real-time market risk & opportunity score.MIRS (Market Institutional Risk System) is an advanced market-intelligence indicator that continuously analyzes market volatility, trend quality, market efficiency, participation, statistical behavior, and institutional market conditions to deliver a real-time, institutional-grade risk assessment.
Rather than generating trade signals, MIRS empowers traders by identifying when market conditions are categorically favorable, uncertain, or excessively dangerous. Featuring a dynamic 0–100 Risk Score, Opportunity Score, market-regime classification, and directional bias, MIRS transforms complex market data into a clear, actionable dashboard — helping traders improve consistency and avoid low-quality trading environments before placing a single trade.
Analytical tools, not trade recommendations. Every system on this page measures market conditions and displays the result. None of them generates buy or sell signals, places orders, or recommends a trade, and nothing here is investment advice. Market Monarch LLC is a software and educational-technology company, not a registered investment adviser or broker-dealer.
Measurement basis. Forecast-accuracy and calibration figures quoted on this page come from historical testing on past market data and describe how a model behaved over the periods stated. They are not predictions, and past statistical relationships do not guarantee future behavior. Model calibrations are instrument-specific and require periodic refitting as markets change. Futures trading involves substantial risk of loss and is not suitable for every investor.