Back to Projects

Bull vs Bear Market Detection Model

2025

Developed an ML model that classifies financial market regimes (bull, bear, static) using time-series indicators and predictive modeling techniques.

Bull vs Bear Market Detection Model
PythonPandasScikit-learnXGBoostFinanceMachine LearningTime-Series

Overview

Built as part of a financial modeling initiative, this project aimed to classify short- and medium-term financial market states into bull, bear, or static regimes. Correct regime classification improves investment allocation and risk management for institutions and individuals.

"Your interpolation step meaningfully improved model robustness." – Competition mentor

Key Features

  • Collected and engineered time-series features from S&P 500 data and macroeconomic indicators.
  • Trained Random Forest and Gradient Boosting classifiers (Scikit-Learn, XGBoost) for predictive modeling.
  • Applied rolling-window smoothing and interpolation for improved signal extraction.
  • Implemented backtesting framework to evaluate predictive and investment outcomes.
  • Optimized investment strategies based on model outputs to outperform buy-and-hold benchmarks.

Applications

Tech Stack

Key Achievements

  • Improved predictability from baseline ~22% accuracy to ~43% with advanced preprocessing.
  • Delivered working end-to-end Python pipeline for training, evaluation, and visualization.
  • Positioned for extension into reinforcement learning for dynamic portfolio allocation (future work).

Impact

Improved accuracy in detecting static vs trending periods, relevant for portfolio hedging decisions.Provided quantitative evidence on performance of machine learning vs heuristic models.Backtesting showed potential for enhanced returns with reduced market volatility exposure.Demonstrated generalization potential to multi-asset and international market datasets.