ml-strategy

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

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill ml-strategy-daddyelonmusk69
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-strategy
Source: https://github.com/DaddyElonMusk69/motis-agent/tree/main/skills/finance/ml-strategy
Command: npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill ml-strategy-daddyelonmusk69

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Train machine-learning models on historical OHLCV data to predict future directional returns and produce clean, per-timestep trading signals while preventing look-ahead leakage and data-sanitization issues.

Core Features & Use Cases

  • Feature engineering: constructs momentum, volatility, RSI, moving-average ratios, volume ratios, Bollinger positions, and other guarded features from OHLCV series.
  • Walk-forward training: expanding or sliding-window retraining with configurable frequency to avoid future data leakage.
  • Model selection & safety: supports RandomForest, GradientBoosting, and LogisticRegression with standardized scaling, NaN/inf sanitation, retraining cadence, and clipped outputs in [-1,1].
  • Use Cases: generate per-symbol predictive signals for equities, ETFs, or crypto for research, signal generation for backtesting, and batched signal production for portfolio strategies.

Quick Start

Generate 5-day predictive trading signals for AAPL using the ml-strategy with a random_forest model and default preprocessing.

Frequently Asked Questions about ml-strategy

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

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

Generate trading signals from OHLCV data by applying walk-forward machine-learning training to predict directional returns and outputting clean, clipped signals in [-1,1]. The process applies feature engineering, model retraining, and NaN/inf sanitation to per-symbol historical time series.

What is walk-forward training in predictive trading models?

Walk-forward training in predictive trading models involves using expanding or sliding windows to retrain machine-learning algorithms on scheduled frequencies. This mechanism prevents future data leakage by ensuring models only learn from past data when predicting future directional returns.

How do I prevent look-ahead leakage when building predictive models on historical time series?

Prevent look-ahead leakage on historical time series by implementing walk-forward training with expanding or sliding-window retraining. This approach strictly separates training data from prediction periods, ensuring machine-learning models never access future information during signal generation.

Can I use RandomForest and GradientBoosting with scikit-learn to predict directional returns?

Yes, you can use scikit-learn to predict directional returns with RandomForest, GradientBoosting, and LogisticRegression models. The workflow applies standardized scaling, NaN/inf sanitation, and walk-forward retraining to produce valid per-timestep trading signals.

Does this machine-learning signal generation approach work for crypto and equities?

Yes, this machine-learning signal generation approach works for crypto, equities, and ETFs. It processes per-symbol historical OHLCV datasets, applying feature engineering and sliding or expanding window training to generate predictive signals across various asset classes.

Why do my machine-learning trading signals contain NaN values?

Machine-learning trading signals contain NaN values due to unsanitized input data or feature engineering gaps. Resolve this by enforcing input validation, sanitizing inf/NaN values during preprocessing, and applying clipped output ranges in [-1,1] to ensure clean signal generation.