skillfed

ml-strategy

ML-Strategy generates trading signals by applying sklearn classifiers (RandomForest, GradientBoosting, Ridge) to engineered OHLCV features with walk-forward validation to prevent data leakage. The skill extracts momentum, volatility, and technical indicators, trains models incrementally, and outputs clean directional signals in the [-1.0, 1.0] range.

ML-Strategy generates trading signals by training sklearn models on engineered OHLCV features with walk-forward validation.

AI-generated summary based on this skill's SKILL.md

28,096 4,557 MIT updated by HKUDS

Install

HKUDS/Vibe-Trading/ml-strategy · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/HKUDS/Vibe-Trading
cp -r Vibe-Trading/agent/src/skills/ml-strategy ~/.claude/skills/ml-strategy

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does ml-strategy generate trading signals using machine learning models?

ml-strategy generates trading signals by applying sklearn classifiers—RandomForest, GradientBoosting, and Ridge—to engineered OHLCV features. The skill extracts momentum, volatility, and technical indicators from price data, trains models on historical windows, and outputs directional signals in the [-1.0, 1.0] range for buy/sell decisions.

What is walk-forward validation and why does ml-strategy use it?

ml-strategy implements walk-forward training to avoid future data leakage—a critical flaw in backtesting where models train on data they later predict. The skill retrains models incrementally on rolling windows, ensuring each prediction uses only historical information available at that point in time.

Which features does ml-strategy engineer for price direction prediction?

ml-strategy builds custom feature engineering for price direction prediction using momentum indicators, volatility measures, and technical signals like RSI and Bollinger Bands extracted from OHLCV data. These engineered features feed into the classifier pipeline to improve signal quality.

How do RandomForest, GradientBoosting, and Ridge models compare in ml-strategy?

ml-strategy lets you compare three ensemble and regression approaches: RandomForest captures non-linear patterns through multiple decision trees, GradientBoosting iteratively improves predictions by correcting errors, and Ridge regression provides a simpler linear baseline. Each model trades complexity for interpretability differently.

How does ml-strategy handle OHLCV data quality and prevent overfitting?

ml-strategy validates and handles OHLCV data quality issues within its ML pipeline and prevents overfitting through walk-forward validation—retraining on expanding historical windows rather than static train-test splits. This rolling approach ensures models adapt to market regime changes without memorizing future patterns.

Is ml-strategy open source and what license does it use?

Yes, ml-strategy is released under the MIT license, making it free to use, modify, and distribute in both open-source and commercial projects with minimal restrictions.

SKILL.md

rendered from the published skill — quoted content, verbatim

Machine-Learning Predictive Strategy

Purpose

Use sklearn machine-learning models (RandomForest / GradientBoosting / Ridge) to predict the direction of future returns and generate trading signals. Walk-forward training is used to avoid future data leakage, and feature engineering extracts useful factors from OHLCV data.

Signal Logic

  1. Validate input: check OHLCV columns, minimum row count, NaN ratio — skip symbols that fail
  2. Feature engineering: build multi-dimensional factors from raw OHLCV data (momentum, volatility, RSI, moving-average ratios, volume ratio, and more). All features are sanitized (inf removed, division-by-zero guarded)
  3. Label construction: future N-day return > 0 is the positive class (1), < 0 is the negative class (0)
  4. Walk-forward training: use an expanding or sliding window, train on historical data only, and roll forward day by day for prediction
  5. Signal generation: map predict_proba[:, 1] to `[-1.0,

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
agent/src/skills/ml-strategy/SKILL.md

Related skills

Tags

ensemble-learning backtesting-framework feature-extraction time-series-prediction risk-mitigation algorithmic-trading data-leakage-prevention hyperparameter-tuning signal-generation