exec(open("/opt/fw2/mc5size.py").read().split("SIZES = ")[0]) for V in (3000, 5000, 7500, 10000, 15000, 20000, 30000): R = [(P.t, *trade(P, V)) for P in PS] o = summ(R, V) srt = sorted(((v - 1) * V for t, v, w, pk in R), reverse=True) sl = [] for P in PS: eu = P.t["eu"]; x = V / eu; i = P.at(300); xin = (x * 0.99 - 0.05 / eu) * (1 - P.pf) * 1e18 q = swap(P.S[i], xin, not P.is0, 0.0); q0 = swap(P.S[i], xin / 1e4, not P.is0, 0.0) * 1e4; sl.append(q / q0 if q0 else 0) print("$%d mean %.2fx (H1 %.2fx H2 %.2fx) med %.2fx /tday $%+.0f (H1 %+.0f H2 %+.0f) worst day %+.0f worst3 %+.0f green %d/%d | top3 $%+.0f rest $%+.0f | entry fill vs spot med %.3f p10 %.3f %s" % ( V, o["all"]["mean"], o["H1"]["mean"], o["H2"]["mean"], o["all"]["med"], o["all"]["perday"], o["H1"]["perday"], o["H2"]["perday"], o["worst_day"], o["worst3"], o["green"], o["days"], sum(srt[:3]), sum(srt[3:]), st.median(sl), sorted(sl)[len(sl) // 10], o["why"]), flush=True)