fix: unify backtest execution and add forward validation candidates
Share point-in-time signals and a cash-funded order ledger across backtests and trading. Correct eligibility, missing-price fills, quality factors, regime inputs, warmup windows, and cash-injection accounting. Add reproducible registered-strategy comparisons and paired forward candidates with a 20% resize band. Validation: 125 Python tests, 23 web tests, TypeScript/Vite build, 87 strategy causality checks, and real-data target/order/equity parity for 10 strategies.
This commit is contained in:
@@ -20,6 +20,14 @@ class Strategy(ABC):
|
||||
pass
|
||||
|
||||
|
||||
def mask_scores(scores: pd.DataFrame, eligible: pd.DataFrame | None) -> pd.DataFrame:
|
||||
return scores if eligible is None else scores.where(eligible.reindex_like(scores).fillna(False))
|
||||
|
||||
|
||||
class StockStrategy(Strategy):
|
||||
accepts_eligibility = True
|
||||
|
||||
|
||||
class BarStrategy(Strategy):
|
||||
"""Strategy on completed daily bars with several fields.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user