ml-strategy

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

Updated May 5, 2026
One-click install
npx skills add https://github.com/wudye/traderAssistHK --skill ml-strategy-wudye
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-strategy
Source: https://github.com/wudye/traderAssistHK/tree/main/backend/src/skills/ml-strategy
Command: npx skills add https://github.com/wudye/traderAssistHK --skill ml-strategy-wudye

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scikit-learn, pandas, numpy.

What problem does it solve?

This Skill helps you generate trading signals by learning whether future returns are likely to be positive or negative, while reducing future data leakage through walk-forward training.

Core Features & Use Cases

  • OHLCV validation and safety: checks required columns, minimum data length, and NaN ratio, skipping symbols that fail quality gates.
  • Feature engineering from market data: derives momentum, volatility, RSI, moving-average ratios, volume ratios, Bollinger Band position, and intraday ratios with division-by-zero guards and inf/NaN sanitization.
  • Walk-forward predictive signaling: trains an sklearn classifier using expanding or sliding windows and converts predicted probabilities into continuous signals in [-1.0, 1.0].
  • Typical use case: for a portfolio of symbols, compute daily (or bar-by-bar) long/short strength signals using a 5-day prediction horizon from OHLCV histories.

Quick Start

Use the ml-strategy skill to generate per-symbol trading signal series in the range [-1.0, 1.0] from your OHLCV data map.

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 from OHLCV data by predicting the sign of future returns with walk-forward training, converting predicted probabilities into continuous signals in the [-1.0, 1.0] range.

How does walk-forward validation prevent data leakage in backtesting pipelines?

Walk-forward validation prevents data leakage in backtesting pipelines by training an sklearn classifier using expanding or sliding windows, ensuring feature engineering and label alignment remain strictly chronological across time.

Can I use scikit-learn to predict the sign of future returns for a portfolio of symbols?

Yes, you can use scikit-learn to predict the sign of future returns for a portfolio of symbols. The skill applies walk-forward training to compute daily long or short strength signals using a 5-day prediction horizon.

What indicators are used for feature engineering from market data in a leakage-safe workflow?

Feature engineering from market data derives momentum, volatility, RSI, moving-average ratios, volume ratios, Bollinger Band position, and intraday ratios, applying division-by-zero guards and inf or NaN sanitization for leakage safety.

How does OHLCV validation handle symbols with missing data or insufficient length?

OHLCV validation handles missing data by checking required columns, minimum data length, and NaN ratio, automatically skipping any symbols that fail these quality gates before feature construction begins.

What are the limitations of using sklearn classifiers for continuous signal mapping?

Limitations of using sklearn classifiers for continuous signal mapping include the requirement for sanitized feature construction and NaN or inf handling, as the model outputs probabilities that must be safely mapped to the [-1.0, 1.0] range.