ml-strategy

Generate machine-learning trading signals from OHLCV data with walk-forward training.

30.4k|4.9k|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/HKUDS/Vibe-Trading --skill ml-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-strategy
Source: https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/ml-strategy
Command: npx skills add https://github.com/HKUDS/Vibe-Trading --skill ml-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ML strategies on trading data often suffer from data leakage, inf-laden features, and unbounded predictions, so this Skill validates OHLCV inputs, sanitizes every feature, and keeps outputs clipped while relying solely on historical windows for training.

Core Features & Use Cases

  • Data hygiene and feature engineering: OHLCV columns are validated, momentum/volatility/RSI ratios are guarded against division-by-zero, and inf values are scrubbed before modeling.
  • Walk-forward training with model choice: Expanding or sliding training windows retrain RandomForest, GradientBoosting, or Ridge classifiers every configurable interval, and the prediction is normalized to a [-1.0, 1.0] confidence range.
  • Use Case: Feed the Skill your universe of daily OHLCV time series, let it generate probability-based signals for each symbol, and consume those signals in your systematic rebalancing engine.

Quick Start

Run the ml-strategy on recent OHLCV data to receive normalized buy and sell signals with walk-forward ML.

Frequently Asked Questions about ml-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate machine-learning trading signals from OHLCV data?

Generate machine-learning trading signals by feeding daily OHLCV time series into a walk-forward training loop that predicts five-day directional returns and outputs clipped [-1.0, 1.0] confidence values. Models include RandomForest, GradientBoosting, or Ridge.

How does walk-forward training prevent data leakage in ML trading models?

Walk-forward training prevents data leakage by relying solely on expanding or sliding historical windows to retrain models at configurable intervals. This ensures predictions for future periods only use past data, keeping feature engineering and model fitting strictly chronological.

Can I use sklearn models like RandomForest and GradientBoosting for predicting stock returns?

Yes, you can use sklearn models like RandomForest, GradientBoosting, or Ridge classifiers to predict five-day directional returns. The workflow normalizes model probabilities into a [-1.0, 1.0] confidence range to ensure bounded trading signals.

Why do my machine-learning features have inf values and how do I sanitize them?

Inf values often result from division-by-zero in momentum, volatility, or RSI ratio features. Sanitize these features by validating OHLCV columns and scrubbing inf values before modeling to ensure clean inputs for the training pipeline.

What's the best way to handle unbounded predictions in systematic rebalancing engines?

Handle unbounded predictions by clipping model outputs to a strict [-1.0, 1.0] confidence range without NaN values. This normalization allows systematic rebalancing engines to directly consume probability-based signals as position sizing weights.

Does ml-strategy work with any symbol's OHLCV feed for signal generation?

Yes, ml-strategy works with any symbol's OHLCV feed by validating the input columns and applying sanitized feature engineering. You can apply this workflow across your entire universe of daily time series to generate independent trading signals.