diff --git a/src/fxhnt/domain/strategies/growth_discipline.py b/src/fxhnt/domain/strategies/growth_discipline.py index c39eac0..a470375 100644 --- a/src/fxhnt/domain/strategies/growth_discipline.py +++ b/src/fxhnt/domain/strategies/growth_discipline.py @@ -8,6 +8,10 @@ def daily_returns(qqq: dict[str, float], multistrat_closes: dict[str, dict[str, w_equity: float = 0.70) -> list[tuple[str, float]]: ms = dict(multistrat.book_series(multistrat_closes)) qdates = sorted(qqq) + # Intentional alignment choice vs foxhunt original: foxhunt samples QQQ on the book's date grid; + # this port computes QQQ returns on QQQ's own consecutive dates then intersects with the book dates. + # Identical on a clean shared trading calendar; on a data hole this drops the gap day's move rather + # than bridging it as a mislabelled 1-day return. qret = {qdates[i]: qqq[qdates[i]] / qqq[qdates[i - 1]] - 1.0 for i in range(1, len(qdates))} common = sorted(set(ms) & set(qret)) return [(d, w_equity * qret[d] + (1.0 - w_equity) * ms[d]) for d in common]