Отслеживать
1
0
Ответвление
У вас уже есть ответвление Warrior_EA
2
ответвлён от animatedread/Warrior_EA
Warrior_EA/research/gf_summary.py
AnimateDread 6192393511 research(fx): forex and metals - thirteen registered families, nothing passed
Hypotheses were registered in FX_PLAN.md before each round. Trend,
breakout, cross reversion, hour seasonality, month-end USD, carry-cross
dip-buy, metals dip-buy and flight-to-safety all fail the bar.

The weekend-gap fade looked like the best result of the project on bar
data (OOS t 20, 28/28 pairs) and loses on real ticks (EURCHF PF 0.52,
AUDNZD PF 0.53): the Sunday-open spread is as wide as the gap.
WarriorGapFade is kept as the research artifact that proved it and is
flagged DO NOT TRADE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 13:24:57 -04:00

37 строки
1,9 КиБ
Python

"""Summarise WarriorGapFade real-tick tester runs: python gf_summary.py claude_gf2_EURCHF_d0 ..."""
from __future__ import annotations
import sys
import numpy as np
sys.path.insert(0, __file__.rsplit("\\", 1)[0] if "\\" in __file__ else ".")
import grid_summary as gs # noqa: E402
COMMON = gs.COMMON
if __name__ == "__main__":
print(f"{'run':<24}{'n':>5}{'net':>9}{'PF':>6}{'eqDD':>7}{'win':>6}{'target':>8}{'stop':>6}{'time':>6}"
f"{'bp/trade':>10}{'2016-20':>9}{'2021-26':>9}")
for nm in sys.argv[1:]:
try:
rp = gs.report(nm)
raw = np.genfromtxt(rf"{COMMON}\gapfade_trades_{nm}.csv", delimiter=",", skip_header=1,
dtype=str, encoding="ansi")
except Exception as e: # noqa: BLE001
print(f"{nm:<24} unreadable: {e}")
continue
if raw.ndim == 1:
raw = raw[None, :]
net = raw[:, 7].astype(float)
ep = raw[:, 3].astype(float)
vol = raw[:, 4].astype(float)
why = raw[:, 8]
yr = np.array([int(x[:4]) for x in raw[:, 2]])
#--- price return per trade, independent of lot size, in bp
xp = raw[:, 6].astype(float)
side = raw[:, 12].astype(float)
bp = side * (xp - ep) / ep * 1e4
early, late = bp[yr <= 2020], bp[yr >= 2021]
print(f"{nm:<24}{len(net):>5}{net.sum():>+9.0f}{rp.get('pf', float('nan')):>6.2f}{rp.get('eqdd', float('nan')):>7.2%}"
f"{np.mean(net > 0):>6.0%}{np.sum(why == 'target'):>8}{np.sum(why == 'stop'):>6}{np.sum(why == 'expert'):>6}"
f"{bp.mean():>+10.1f}{early.mean() if len(early) else float('nan'):>+9.1f}{late.mean() if len(late) else float('nan'):>+9.1f}")
print("bp/trade = fill-to-fill price move (spread paid at both fills); 'target' exits are in-EA closes"
" counted by the journal as expert, so the split is approximate.")