xiaodingdang2333/ai/cross-market-strategy
Claude Code and agent skill by xiaodingdang2333/ai
- community
Checking that the SKILL.md file is still in the repository.
Write signal_engine.py for portfolios spanning multiple markets (A-shares + crypto, equity + forex, etc.)
Install
npx vskill@latest install xiaodingdang2333/ai/cross-market-strategySKILL.md
The same SKILL.md was published earlier as greenhushaoqi-lang/stoc/cross-market-strategy.
When to Use
When the user requests a backtest with codes from different markets — e.g. ["000001.SZ", "BTC-USDT"] or ["AAPL.US", "EUR/USD", "600519.SH"].
The CompositeEngine handles calendar alignment, shared capital, and market rules automatically. The strategy only needs to output per-symbol signals.
Key Concepts
1. Market Classification in generate()
Group symbols by market type and apply market-specific indicator parameters:
2. Per-Market Parameter Tables
Different markets have very different dynamics. Using the same parameters everywhere produces poor results.
| Parameter | A-Share | Crypto | US Equity | Forex | |
|---|---|---|---|---|---|
| MA fast | 5 | 7 | 10 | 10 | |
| MA slow | 20 | 25 | 50 | 30 | |
| RSI period | 14 | 10 | 14 | 14 | |
| Vol lookback | 20 | 14 | 20 | 20 | |
| Typical daily vol | 1-2% | 3-8% | 1-2% | 0.3-0.8% |
3. Volatility-Adjusted Weights (Critical)
BTC daily vol ~ 5%, A-share daily vol ~ 1.5%. Without vol-adjustment, crypto eats the entire risk budget.
4. Cross-Market Signal Patterns
- Momentum spillover: BTC 7-day momentum as overlay for A-share tech sectors
- Risk-on/Risk-off: USD/CNH rate + VIX proxy to reduce equity exposure
- Hedging: Long A-shares + short crypto delta as tail hedge
- Correlation regime: When rolling correlation > 0.6, reduce to single-market exposure; when < 0.2, maximize diversification
5. What the Engine Handles (Don't Worry About)
- Trading calendar alignment: signals are shifted on each symbol's own calendar, then ffill'd to unified dates
- Market rules: T+1 for A-shares, funding fees for crypto, swap for forex — all per-symbol
- Capital allocation: shared pool, strategy just sets target weights via signals
- Commission/slippage: dispatched to correct sub-engine per symbol
config.json for Cross-Market
sourcemust be"auto"for cross-market (routes each symbol to its loader)extra_fieldsshould benull(not all markets support fundamentals)leveragedefaults to 1.0 (CompositeEngine inherits from config)
Market Detection Heuristics
| Pattern | Market | |
|---|---|---|
000001.SZ, 600519.SH | A-share | |
AAPL.US | US equity | |
700.HK | HK equity | |
BTC-USDT | Crypto | |
IF2406.CFFEX | China futures | |
ESZ4 | Global futures | |
EUR/USD | Forex |
Supporting Files
- example_signal_engine.py — complete cross-market strategy example
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcodex/skills/vibe-trading/src/skills/cross-market-strategy/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xiaodingdang2333/ai/cross-market-strategy)