Guide · Agent skill
How to use the Cross-Market Strategy Builder agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cross-market-strategy skill teaches an AI agent how to write a trading strategy file called signal_engine.py for backtests that combine assets from different markets, such as Chinese A-shares with crypto or US stocks with forex. It is aimed at quantitative traders, developers building on the Vibe-Trading framework, and students learning volatility-adjusted position sizing. After this guide you will know what the skill does, how to install it, how to ask for it in plain language, and what to check before trusting the code it produces.
Quick start
- 1Download and unzip. Download the skill ZIP from this page and unzip it. You should see SKILL.md and example_signal_engine.py.
- 2Place the skill folder. Copy the folder to ~/.claude/skills/ for personal use, or to .claude/skills/ inside a project. Alternatively, upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 3Confirm the framework is set up. Make sure Python with numpy and pandas is installed and that you have the Vibe-Trading framework with its CompositeEngine.
- 4Ask for a cross-market backtest. Describe the symbols from different markets, the date range and the starting cash in a plain request.
- 5Set config.json. Use source "auto" so each symbol routes to its own loader, and set extra_fields to null.
- 6Review the generated signal_engine.py. Check the market grouping, parameter table and volatility weighting before running the backtest.
- 7Run and interpret the backtest. Run it inside the framework and treat the output as a historical test, not a forecast.
What the skill makes the agent do
The skill applies when you ask for a backtest that includes symbols from different markets, for example ["000001.SZ", "BTC-USDT"], ["TD.TO", "PNG.V"] or ["AAPL.US", "EUR/USD", "600519.SH"]. The agent then writes a strategy that outputs per-symbol signals, grouping symbols by market and using market-specific indicator settings.
The skill's guidance is that different markets need different parameters. For example, its table uses a 5/20 moving-average pair for A-shares, 7/25 for crypto, 10/50 for US equities and 10/30 for forex. It also explains volatility-adjusted weights, so a volatile asset such as Bitcoin does not take up the entire risk budget.
- Detects each symbol's market from its code format (for example .SZ/.SH for A-shares, -USDT for crypto, EUR/USD for forex)
- Applies per-market moving-average, RSI and volatility-lookback settings
- Scales each symbol's signal by its recent volatility, capped between -1.0 and 1.0
- Describes four cross-market patterns: momentum spillover, risk-on/risk-off, hedging and correlation regimes
Install the cross-market-strategy skill
Download the skill ZIP from this page and unzip it. Then put the resulting folder in one of two places, depending on how you want to use it.
For a personal install available across your projects, place it in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder. If you use the Claude apps instead, you can upload the ZIP under Settings → Capabilities → Skills.
- Personal: ~/.claude/skills/
- Single project: .claude/skills/ inside the project folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Check the requirements before you run anything
The skill's code is designed to run inside the Vibe-Trading backtest framework, specifically its CompositeEngine. It also needs Python with numpy and pandas, and market data access through the framework's loaders. The skill's config sets source to "auto", which routes each symbol to its market's data source.
The skill is not standalone. Without the Vibe-Trading framework, the generated signal_engine.py has nothing to run inside.
- Python with numpy and pandas
- The Vibe-Trading framework with its CompositeEngine
- Market data access through the framework's loaders
- config.json with "source": "auto" for cross-market runs
{
"source": "auto",
"codes": ["000001.SZ", "BTC-USDT"],
"start_date": "2024-01-01",
"end_date": "2025-03-31",
"interval": "1D",
"initial_cash": 1000000,
"engine": "daily"
}Trigger the skill with a natural request
You do not need special syntax. Describe a backtest that spans markets and list the symbols, using the code formats the skill recognises. Be specific about the date range and starting cash so the config can be filled in.
Example requests: "Write a backtest for 000001.SZ and BTC-USDT from 2024-01-01 to 2025-03-31 with 1,000,000 starting cash, with position sizes scaled by volatility." Or: "Build a cross-market signal_engine.py for AAPL.US, EUR/USD and 600519.SH."
- Name the symbols and the markets they belong to
- Give the date range and initial cash
- Ask for volatility-adjusted sizing if you want the weighting logic
Read and check the generated code
The output is Python code and parameters, not trading advice. Read the generated signal_engine.py before running it, and confirm the parameters match what you intend. The bundled example_signal_engine.py shows a complete version of the approach and is a useful reference for comparison.
The skill's file says the engine handles trading calendars, fees and T+1 rules automatically. Treat that as a claim to verify in your framework version, not a guarantee. The skill also does not check market rules or data accuracy.
- Confirm the symbol list, date range and starting cash in config.json
- Check the market-to-parameter mapping for each symbol
- Verify that the framework's calendar, fee and T+1 handling matches your needs
- Compare against example_signal_engine.py
Safety notes: scripts and network access
This skill runs scripts and uses the network, according to its listing. Its bundled files are SKILL.md and example_signal_engine.py. Because the skill's data access goes through the framework's loaders, pulling market data requires network access.
Review any script before running it, especially code that fetches data or places orders. Keep the skill in a folder you control, and do not connect the generated code to live trading without separate testing.
- Read example_signal_engine.py and any generated script before execution
- Expect network calls when market data is loaded
- Use backtest mode only; the skill is not designed for live trading advice
Tips for better results
The skill's own guidance is that using one parameter set across all markets tends to produce poor results. Keep market-specific settings. Also note that volatility adjustment is what stops a high-volatility asset from dominating the portfolio, so keep it on when mixing crypto with lower-volatility assets.
Correlation-based patterns are described in the skill, such as reducing to single-market exposure when rolling correlation is high. Test these as separate variants so you can see their effect.
- Keep the per-market parameter table rather than one shared setting
- Use volatility-adjusted weights when crypto is in the basket
- Compare variants one change at a time
- Remember that backtest results do not predict future returns
What people use it for
- Testing a momentum strategy across A-shares and crypto in one shared capital pool
- Comparing equity and forex behaviour in a single backtest with per-market parameters
- Trying a hedge, such as long A-shares with a short crypto position, as a tail-risk variant
- Learning how volatility-adjusted position sizing changes portfolio weights
- Using example_signal_engine.py as a starting template for a custom multi-market strategy
Frequently asked questions
How do I install the cross-market-strategy agent skill?
Download the skill ZIP from this page and unzip it. Place the folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
What do I need to run it?
You need Python with numpy and pandas, the Vibe-Trading backtest framework with its CompositeEngine, and access to market data through the framework's loaders. The skill sets source to auto so each symbol uses its market's data source.
Is the cross-market-strategy skill free?
The skill is listed under the MIT licence, which is the licence of the HKUDS/Vibe-Trading repository it comes from. Check the licence text in the source repository for the full terms.
Does the skill give live trading advice?
No. According to its listing, the skill only produces backtest code and parameters. Past backtest results do not predict returns, so the output should be tested and understood before any real use.
Does the skill check market rules and data accuracy?
No. The skill states that the engine handles calendars, fees and T+1 rules automatically, but this should be confirmed by the user. It does not verify data accuracy.
Can a beginner use this skill?
It is best suited to people with programming or backtesting experience, because the output is Python code that must be read and checked. Beginners should learn the basics of backtesting first.
What are the alternatives?
This page does not compare the skill with other tools, so no alternatives are claimed here. If you do not use the Vibe-Trading framework, the generated code will not run as-is.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill is a good fit for quantitative traders, framework developers and students who want a clear template for multi-market backtests with volatility-adjusted sizing. It is a poor fit for anyone wanting live trading advice, or for anyone without Python and backtesting experience who cannot check the generated code.
Download the skill