FrontierView
Pre-trade transaction cost analysis tool for institutional equity execution. Implements the Almgren et al. (2005) market impact model with property-tested correctness, an interactive efficient-frontier visualiser, regime sensitivity analysis, and a synthetic calibration tab demonstrating the η/γ parameter estimation methodology. FastAPI backend, custom-styled HTML frontend, deployed standalone.
// Overview
FrontierView solves the institutional execution problem: given an order, what's the optimal trade-off between expected cost and execution risk? It implements the Almgren et al. (2005) market impact model — temporary impact as a 0.6 power law, permanent impact linear by no-arbitrage — and produces an interactive efficient frontier showing the cost-variance trade-off across canonical execution schedules.
The implementation includes a synthetic calibration tab that demonstrates the parameter estimation methodology: synthetic fills are generated under known ground-truth η and γ, decomposed into permanent and temporary components per Almgren 2005 §4, and recovered via heteroskedastic weighted least squares. Recovered standard errors match the paper's published values to within sampling noise, verifying the estimator is consistent.
Model correctness is enforced by property-based tests asserting mathematical invariants: schedule-invariance of permanent cost (a consequence of linear g), monotonicity of the efficient frontier in risk aversion, and dimensional consistency of the impact denominators. One of these tests initially failed and surfaced a discretisation error in the path integral accumulator — switching from forward (left-Riemann) to midpoint (trapezoidal) accumulation restored schedule-invariance.