Modeling Bitcoin volatility with a Markov-switching model
A Bitcoin price chart shows the path prices took. For this report, I wanted to estimate how the volatility of daily returns changed along that path. I used a Markov-switching model and built the visual report in OWL Compose. The report includes state probabilities, a transition matrix and a comparison between two-state and three-state specifications. Start with returns and a fixed cutoff The input is Binance Spot BTCUSDT daily OHLCV data, using completed UTC candles through September 13, 2026. Daily returns are calculated as: 100 * ln(close_today / close_yesterday) I kept weekends and excluded the incomplete daily candle. The training period runs from January 2, 2022 through June 30, 2026: 1,641 daily returns. The holdout contains 75 days, from July 1 through September 13. That split matters. Parameters fitted over the entire history would let later observations influence the apparent success of an earlier classification. Fit states with different variances The analysis uses statsmodels MarkovRegression with switching means and variances. Both the two-state and three-state models were fitted using multiple starting values and three random seeds. I retained the converged fit with the highest likelihood for each specification. In the two-state model, the fitted daily return standard deviations are about 1.53% and 4.30%. Both means are close to zero, so I label the states by volatility. Large positive and negative returns can both fit the high-volatility state. Keep the probability path visible For the holdout period, training parameters stay fixed. Filtered probabilities update using returns observed up to each day. The report places the most likely state on the price timeline, then shows the full probability series below it. A hard label can change when the probabilities cross 50%; the probability chart shows whether that change was decisive or marginal. The January-June portion is explicitly marked as a retrospective training view. Check the model choice The three-state model has a slightly lower training BIC. The two-state model has a slightly better mean predictive log score over this holdout. That is useful evidence of sensitivity, rather than proof of a universal winner. The score evaluates the probability density assigned to observed returns. It does not measure directional trading accuracy. Make the assumptions inspectable The report includes fitted distributions, model parameters, transition probabilities and reproducibility notes. Constant transition probabilities and Gaussian returns remain simplifying assumptions. I built OWL Compose, and used it to present this analysis alongside its charts and data. If you work on time-series analysis, the English report shows the complete result. What would you test next: rolling refits, a different training window, or a heavier-tailed return distribution? Top comments (0)
Comments
No comments yet. Start the discussion.