cross-market-strategy
Cross-Market Strategy generates trading signals for portfolios spanning different asset classes and exchanges. It automatically detects market type, applies tailored indicator parameters, and adjusts position sizes by volatility so crypto or forex positions don't dominate your risk budget. The underlying engine handles calendar shifts, market rules, and capital allocation per symbol.
Cross-Market Strategy lets you backtest portfolios mixing stocks, crypto, and forex with market-specific parameters and volatility-adjusted position sizing.
AI-generated summary based on this skill's SKILL.md
Install
HKUDS/Vibe-Trading/cross-market-strategy · repository language: Python
git clone https://github.com/HKUDS/Vibe-Trading
cp -r Vibe-Trading/agent/src/skills/cross-market-strategy ~/.claude/skills/cross-market-strategynpx skillfed install HKUDS/Vibe-Trading/cross-market-strategyFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
Can cross-market-strategy backtest multiple markets at once?
Yes. Cross-Market Strategy generates trading signals for portfolios spanning different asset classes and exchanges simultaneously. It handles calendar shifts, market rules, and capital allocation per symbol, allowing you to backtest stocks, crypto, forex, and bonds in a single unified framework without manual synchronization.
How does cross-market-strategy adjust for volatility differences?
Cross-Market Strategy adjusts portfolio weights to account for volatility differences across asset classes, so crypto or forex positions don't dominate your risk budget. It automatically scales position sizes based on each market's volatility profile, keeping your overall portfolio risk balanced even when combining low-volatility bonds with high-volatility crypto.
What market-specific features does cross-market-strategy support?
Cross-Market Strategy detects market type and applies market-specific indicator parameters automatically. Rather than using one-size-fits-all settings, it tailors technical indicators and signal thresholds to stocks, crypto, forex, or bonds individually, then combines those signals into a coherent portfolio strategy.
Can cross-market-strategy detect risk-on/risk-off regimes?
Yes. Cross-Market Strategy implements cross-market signal patterns including risk-on/off detection and momentum spillover across asset classes. This lets you model how market sentiment shifts propagate—for example, when equity weakness triggers crypto selloffs—and adjust your portfolio positioning accordingly.
What license does cross-market-strategy use?
Cross-Market Strategy is released under the MIT license, allowing free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.
SKILL.md
rendered from the published skill — quoted content, verbatim
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:
def generate(self, data_map):
groups = {}
for code, df in data_map.items():
market = self._detect_market(code)
groups.setdefault(market, {})[code] = df
signals = {}
for market, market_data in groups.items():
params = MARKET_PARAMS[market]
for code, df in market_data.items():
signals[code] = self._market_signal(df, params)
return signals
2. Per-Market Parameter Tables
Different markets have very different dynamics. Using the same parameters everywhere produces poor results.
|
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 2 files
agent/src/skills/cross-market-strategy/SKILL.md
agent/src/skills/cross-market-strategy/example_signal_engine.py