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.
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-strategyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/ml-strategy ~/.gemini/antigravity-cli/skills/ml-strategyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
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
ANo 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 →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
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.
