Class ExecutionAlgoBacktester
execution.BenchmarkExecutor (built for live intervals)
and the backtest lane: replay a session's bars, let the executor
re-decide each bar exactly as it would live, fill against the bar with
a TradeCostModel, and grade the result the way a TCA desk
would (implementation shortfall vs arrival, slippage vs the session
VWAP). ExecutionAwareBacktester answers "how do fills change a
STRATEGY's results?"; this answers the execution desk's own question:
"which benchmark algorithm, and at what cost?" — one parent
order, N bars, a number per benchmark.
Honest simplifications (each visible, none silent): fills
print at the bar close plus the cost model's bps (no intra-bar
microstructure); the per-bar liquidity cap is
participationCap × bar volume — and it is the ONLY cap: the
executor is constructed with its internal depth fraction at 1 so the
two knobs cannot silently compound; the VWAP volume curve uses the
session's REALIZED cumulative volume — an oracle curve, so the VWAP
benchmark result here is an upper bound on what a live volume-curve
forecast can achieve (live, use microstructure.VolumeCurve);
and each bar's volume enters the POV target BEFORE that bar trades —
one bar of look-ahead versus a strictly reactive live POV, so POV
completion here is mildly optimistic. Deterministic: same bars, same
config, same numbers. Research lane.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordThe TCA-style verdict for one parent worked over one session. -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionrun(BarSeries series, Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark) run(com.quantfinlib.core.BarSeries, com.quantfinlib.orderbook.Side, long, com.quantfinlib.execution.BenchmarkExecutor.Benchmark, double)for the time/volume benchmarks (no POV rate needed).run(BarSeries series, Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark, double povRate) WorksparentQtythrough the session underbenchmarkand grades it.
-
Constructor Details
-
ExecutionAlgoBacktester
-
ExecutionAlgoBacktester
public ExecutionAlgoBacktester()
-
-
Method Details
-
run
public ExecutionAlgoBacktester.Result run(BarSeries series, Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark, double povRate) WorksparentQtythrough the session underbenchmarkand grades it. PARTICIPATION parents useBenchmarkExecutor.pov(com.quantfinlib.orderbook.Side, long, double)withpovRate; other benchmarks ignore it. -
run
public ExecutionAlgoBacktester.Result run(BarSeries series, Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark) run(com.quantfinlib.core.BarSeries, com.quantfinlib.orderbook.Side, long, com.quantfinlib.execution.BenchmarkExecutor.Benchmark, double)for the time/volume benchmarks (no POV rate needed).
-