machine-learning-strategy

Generates trading direction signals from OHLCV time series using scikit-learn models with walk-forward training.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/loanntc/Paave --skill machine-learning-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: machine-learning-strategy
Source: https://github.com/loanntc/Paave/tree/main/skills/ml-strategy
Command: npx skills add https://github.com/loanntc/Paave --skill machine-learning-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill turns OHLCV market data into future-direction trading signals by training machine-learning models without look-ahead leakage.

Core Features & Use Cases

  • Walk-forward training: Uses expanding or sliding windows so each prediction is made using only historical data.
  • OHLCV feature engineering: Builds robust factors (momentum, volatility, RSI, moving-average ratios, volume ratios, Bollinger position, and intraday ratios) with sanitization and zero-division guards.
  • Signal generation contract: Produces clean outputs by mapping model probabilities to a continuous signal in [-1.0, 1.0], with NaN-safe fallbacks.
  • Use Case: When you have daily OHLCV for multiple symbols, you can generate per-symbol long/short confidence signals suited to a prediction horizon like N-day returns.

Quick Start

Use the machine-learning-strategy Skill to generate per-symbol signals from your OHLCV DataFrames by ensuring the columns open, high, low, close, and volume are present.

Frequently Asked Questions about machine-learning-strategy

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

FAQPage Schema
How do I predict stock return direction using machine learning without look-ahead bias?

Walk-forward validation prevents look-ahead bias by training machine learning models with expanding or sliding windows, ensuring each prediction uses only historical OHLCV data. This approach maps model probabilities to continuous trading signals in [-1.0, 1.0] for future N-day return direction.

What features can I engineer from OHLCV data for scikit-learn trading signals?

You can engineer robust factors from OHLCV data including momentum, volatility, RSI, moving-average ratios, volume ratios, Bollinger position, and intraday ratios. These features undergo sanitization and zero-division guards to ensure clean inputs for scikit-learn models generating trading signals.

Can I generate trading signals for multiple symbols simultaneously with walk-forward validation?

Yes, you can generate per-symbol long and short confidence signals for multiple symbols simultaneously. The workflow applies walk-forward training and forward-shifted return labels to your OHLCV DataFrames, producing continuous outputs clipped to [-1.0, 1.0] for each symbol.

Do I need pandas and numpy to build walk-forward machine learning models on OHLCV data?

Yes, you need pandas and numpy along with scikit-learn to build walk-forward machine learning models on OHLCV data. These dependencies handle data manipulation, numerical operations, and model training required for sanitized feature engineering and return prediction.

How are model probabilities mapped to continuous trading signals in financial backtests?

Model probabilities are mapped to continuous trading signals constrained within the range of [-1.0, 1.0]. This signal generation contract includes NaN-safe fallbacks to ensure clean outputs suitable for predicting future N-day return direction in financial backtests.

What are the limitations of using scikit-learn for walk-forward return prediction?

Limitations of using scikit-learn for walk-forward return prediction include the necessity for strict OHLCV validation and sanitized factor construction to avoid look-ahead bias. Rolling retraining is computationally intensive, and continuous outputs require clipping to manage extreme predictions.