Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

ml-strategy

Skill by HKUDS

ml-strategy is a skill that trains scikit-learn models to predict the direction of future returns and produce trading signals. It is built for any OHLCV price data.

  • Score 91
  • 40k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install ml-strategy

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/ml-strategy ~/.claude/skills/ml-strategy

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install ml-strategy in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

ml-strategy is an agent skill that uses scikit-learn models (RandomForest, GradientBoosting and Ridge) to predict the direction of future returns and generate trading signals. It builds features such as momentum, volatility, RSI, moving-average ratios and volume ratio from OHLCV data. Each day is labelled by whether the future N-day return is positive or negative. Infinite feature values are removed and division-by-zero is guarded.

Training uses walk-forward validation with an expanding or sliding window, so each prediction uses only historical data. Signals are mapped to the range -1.0 to 1.0 and contain no NaN values. The skill suits users who want a machine-learning strategy on OHLCV price data. It includes a complete SignalEngine example to copy and customise.

Written from the project's SKILL.md and checked against it.

What it can do

  • Data validationChecks OHLCV columns, minimum row count and NaN ratio before training.
  • Feature engineeringBuilds momentum, volatility, RSI, moving-average, volume and Bollinger Band features.
  • Label constructionLabels each day by whether the future N-day return is positive or negative.
  • Walk-forward trainingTrains on historical data only and rolls forward day by day for prediction.
  • Signal generationMaps predicted probabilities to signals in the range -1.0 to 1.0.
  • Model selectionSupports random_forest, gradient_boosting and ridge model types.

What you need

  • Python
  • scikit-learn
  • pandas
  • numpy

Try asking

  • Use ml-strategy to generate signals for my OHLCV price data.
  • Build walk-forward ML features from my daily stock data with ml-strategy.
  • Run ml-strategy with a sliding window and a gradient boosting model.

Good to know

  • Symbols with too little data or too many NaN values are skipped.
  • Pitfalls such as class imbalance still require the user's judgement.
  • Deep trees and too many features can overfit, so the source advises keeping max_depth at 3 to 5.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: agent/src/skills/ml-strategy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB

Alternatives to ml-strategy

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

ml-strategy: common questions

What data does ml-strategy need?

It is described as suitable for any OHLCV data, with open, high, low, close and volume columns. The validation step checks for these columns and a minimum row count.

How does ml-strategy avoid future data leakage?

It uses walk-forward training, where each model is trained only on data available before the prediction day. Standardization is fit only on the training set.

Which models does ml-strategy support?

It supports RandomForestClassifier, GradientBoostingClassifier and a Ridge option implemented as LogisticRegression with L2 penalty.

How do I install ml-strategy?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is ml-strategy free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is ml-strategy safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to ml-strategy?

Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.

ml-strategy Install

Add to stack

Loading.