Cost-model Realism
By LuxAlgoJul 19, 2026
Cost-model Realism makes cost-model realism visible: the same trades priced twice, once at zero cost and once honestly. A simple reference rule generates the trades — a moving-average cross, or a faster-turning RSI reversion — with signals read on the close and filled at the next open. Entries lift the ask, exits hit the bid, and every round trip pays commissions, slippage, optional size impact, and carry per day held.
How to Trade the Cost-model Realism?
- Cost Drag wedge: the shaded gap between the Gross Equity (Zero-Cost) and Net Equity (Modeled Costs) curves — everything a frictionless test pretends was kept.
- Turnover audit: gross yearly return versus the yearly cost hurdle (round-trip cost x trades per year), needing 2x coverage by default.
- Verdict row: withheld until the minimum sample, then graded from UNREALISTIC through FAIL and THIN to REALISTIC PASS.
Within the wider validation suite it supplies the honest base case; alerts fire on expectancy or coverage loss.
Cost-model Realism Settings
- Reference Rule (default Moving Average Cross): the system re-priced.
- Average Type (default EMA), Fast Length (default 20), Slow (default 50): the cross rule.
- RSI Length (default 14), RSI Entry Levels: Long (default 30), Short (default 70): the reversion rule, exiting at 50.
- Trade Direction (default Long & Short): reverse or exit to flat.
- Commission per Side (%) (default 0.05): fees on each side.
- Quoted Spread (default 0.05, % of price or ticks): each side pays half.
- Slippage (% of Spread, Round Trip) (default 50): adverse-fill allowance past the touch.
- Size Impact per Side (bps) (default 0): adverse move for size.
- Carry: Long (%/yr) and Short (%/yr) (defaults 0): funding and borrow per day held.
- Required Hurdle Coverage (x) (default 2) and Minimum Closed Trades (default 10): the audit's bar and floor.
- Show Dashboard (default enabled; Top Right, Small), plus gross-curve and drag-fill toggles.
Frequently Asked Questions
How does this relate to cost sensitivity?
This build sets the honest base case; cost sensitivity then stresses it, re-running at cost multiples to find where profitability dies. Realism first, stress second.
Why fill at the next bar's open?
A signal computed on a close cannot honestly fill at that close. The next open removes the look-ahead and mirrors a live order.
Is the reference rule meant to be traded?
No — it exists to generate realistic turnover for the model to re-price, its variants trading at different speeds. The message is the gap between the curves, not the curves themselves.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
