Hidden Markov Model Utility for Market Regime Detection

A clean HMM.py utility for market regime detection with Hidden Markov Models. This module: - Trains a Gaussian HMM on the most recent 900 trading days - Accepts a DataFrame + configurable feature columns - Validates inputs and handles missing data - Returns both the fitted model and labeled output with: - hidden_state - per-state probabilities (state_prob_k) Designed it to be practical for quant workflows: reproducible (random_state), configurable (n_states, covariance_type, n_iter), and ready to plug into signal pipelines. #Python #QuantFinance #AlgorithmicTrading #SoftwareEngineering

  • text

To view or add a comment, sign in

Explore content categories