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:
2026-10-01 02:24:01 -07:00
parent 761725d2c8
commit 722cade974
45 changed files with 1561 additions and 1021 deletions

View File

@@ -18,21 +18,15 @@ Three sequential layers, each PIT-safe:
Restore when gain drops below 20% (hysteresis band = 10%).
Entry price = yesterday's close at symbol change (PIT-safe).
Why profit-take works on leveraged ETFs
---------------------------------------
3x ETFs (TQQQ, UPRO) suffer from volatility drag: daily rebalancing
erodes multi-day compound returns proportional to variance. After a
+30% gain, the position sits on a large base where subsequent
volatility causes disproportionate drag. Clearing the position:
1. Locks in geometric gains before vol drag erodes them.
2. Reduces the base on which the drag operates.
3. Forces rebalancing from an asset that has become "overweight."
This is not alpha from prediction — it is alpha from mechanical
rebalancing of a negatively-convex instrument, a structural effect
documented in the leveraged ETF literature.
Research boundary
-----------------
Profit-taking is an empirical timing rule. Daily leverage compounding alone
neither proves that the 30% threshold earns alpha nor makes it independent
of the development window. Compare against no profit-taking and a simple
trend rule using the shared cash ledger and out-of-period stress scenarios.
The following legacy figures used the earlier execution model and are not
comparable to cash-ledger-pit-v2 results:
Empirical 10y (2016-05-16 to 2026-05-13, 10bps one-way cost):
Ann 54.7%, Vol 24.2%, Sharpe(rf=5%) 1.72, MaxDD -25.7%,
Sortino 2.23, Calmar 2.13.