fix(backtest): give mixed stock+ETF strategies their ETFs; derive markets from trader
trend_rider_v6 backtests failed ('SPY' not in data) because only the stock
universe was passed. Strategy markets in 'list' now follow the trader's
eligibility rule, so v6 is no longer offered for CN.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -268,6 +268,11 @@ DEFAULT_MONITOR_STRATEGIES = [
|
||||
]
|
||||
|
||||
|
||||
def strategy_extra_tickers(strategy_name: str) -> list[str]:
|
||||
"""Fixed ETF tickers a mixed stock+ETF strategy needs beside its stock universe."""
|
||||
return list(MIXED_STRATEGY_EXTRA_TICKERS.get(strategy_name.removeprefix("sim_"), []))
|
||||
|
||||
|
||||
def strategy_supports_market(strategy_name: str, market: str) -> bool:
|
||||
"""ETF-based strategies trade USD-listed ETFs, so they only run in the US book."""
|
||||
base_name = strategy_name.removeprefix("sim_")
|
||||
|
||||
Reference in New Issue
Block a user