"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
Merge PR #1864: preserve combined crypto routing fixes
Haozhe Wu5c81ace3d111
diff --cc agent/backtest/engines/_market_hooks.pyindex 2f8e380fd,969e875c3..3dc2e3786--- a/agent/backtest/engines/_market_hooks.py+++ b/agent/backtest/engines/_market_hooks.py@@@ -119,11 -119,19 +119,19 @@@ _MARKET_PATTERNS =# Vietnam equities: HOSE (VIC.VN). Tickers are three letters in practice;# the class stays broad to admit fund certificates and ETF codes.(re.compile(r"^[A-Z0-9]+\.VN$", re.I), "vietnam_equity"),- (re.compile(r"^[A-Z]+-USDT$", re.I), "crypto"),+ (re.compile(r"^(?=[A-Z0-9]*[A-Z])[A-Z0-9]+-USDT$", re.I), "crypto"),+ (re.compile(r"^(?=[A-Z0-9]*[A-Z])[A-Z0-9]+/USDT$", re.I), "crypto"),+ # USD-M perpetuals in their documented BASE-USDT-PERP spelling+ # (ccxt_loader._parse_ccxt_symbol / binance_loader). Without this entry+ # the symbol matched nothing above and fell through to the a_share+ # default, so a leveraged perpetual ran under China A-share rules+ # (100-share board-lot rounding) and every computed size rounded to a+ # zero_size rejection (#1863). Base alphabet matches the loader's own+ # ``([A-Z0-9]+)-USDT-PERP`` fullmatch.+ (re.compile(r"^[A-Z0-9]+-USDT-PERP$", re.I), "crypto"),- (re.compile(r"^[A-Z]+/USDT$", re.I), "crypto"),# yfinance's native crypto spelling (BTC-USD, ETH-USD). Distinct from# USDT pairs only in the quote currency; both belong to CryptoEngine.- (re.compile(r"^[A-Z]+-USD$", re.I), "crypto"),+ (re.compile(r"^(?=[A-Z0-9]*[A-Z])[A-Z0-9]+-USD$", re.I), "crypto"),# Concatenated spot pairs (BTCUSDT, ETHUSDC) with no separator. Same# quote-asset table the trade-journal parser uses; without it these fell# through every pattern and got a_share rules (T+1, no shorting) on a