Backtest: Account For Costs, Execution, And Live Drift
A practical Backtest lesson for reducing false confidence by separating the displayed historical result from trading costs, execution quality, and live behavior after the test.
Educational only
The examples teach workflow and risk framing. They do not provide trade recommendations, personalized advice, leverage guidance, or guaranteed outcomes.
Chapter 01
Separate the visual assumption from full cost
Trader question
What could make this historical result worse in real trading?
The current visual Backtest path makes a fixed commission assumption visible. That is useful, but total implementation cost also includes spread, slippage, taxes, fees, liquidity, and execution quality.
Desk checklist
- Read the displayed commission assumption separately.
- Add spread, slippage, taxes, fees, and liquidity as review layers.
- Do not call a gross result realistic until cost drag is named.
Interactive proof
Current visual engine commission assumption and result caveat
Use the Cost Drag Lab to keep the app assumption visible while changing the learning slider for total implementation cost.
A backtest result is historical research. Before it earns more trust, name the cost model, execution gap, and forward-observation plan that could make live behavior worse than the chart.
Interactive desk lab
Backtest Cost Drag Lab
A practical Backtest cost lab for comparing gross historical return with commission, spread, slippage, fees, turnover, execution drift, and forward-observation caveats.
A practical Backtest cost lab for comparing gross historical return with commission, spread, slippage, fees, turnover, execution drift, and forward-observation caveats.
Separate the app assumption from the full cost stack
The visual Backtest commission assumption stays visible while spread, slippage, taxes, and fees appear as separate review layers.
A result card shows the current visual commission assumption.
Additional cost layers stack beside it instead of replacing it.
The net return line moves lower as implementation drag is named.
The final frame says: assumption visible, live model still incomplete.
Remotion code
FixedCommissionCostStackVideo
The snippet is stored with the lesson so a future Remotion project can render the chapter video.
Show component snippet
import {AbsoluteFill, Easing, Sequence, interpolate, useCurrentFrame} from "remotion";
export const FixedCommissionCostStackVideo = () => {
const frame = useCurrentFrame();
const stack = interpolate(frame, [24, 84], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing: Easing.bezier(0.16, 1, 0.3, 1),
});
const net = interpolate(frame, [72, 118], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
});
const layers = ["Spread", "Slippage", "Fees/taxes", "Fill quality"];
return (
<AbsoluteFill style={{background: "#fff8e8", color: "#071126", padding: 72}}>
<h1 style={{fontSize: 52, margin: 0}}>Commission is visible. Total cost still needs review.</h1>
<div style={{display: "grid", gridTemplateColumns: "0.82fr 1.18fr", gap: 30, marginTop: 62}}>
<div style={{border: "1px solid #d9caa7", background: "#fffdf7", padding: 28}}>
<p style={{fontSize: 18, color: "#5f6b7c"}}>Visual Backtest assumption</p>
<strong style={{display: "block", fontSize: 44, marginTop: 12}}>0.10%</strong>
<span style={{fontSize: 20, color: "#8a5a0a"}}>commission layer</span>
</div>
<div style={{display: "grid", gap: 12}}>
{layers.map((layer, index) => (
<div key={layer} style={{border: "1px solid #b69a5b", background: index === 1 ? "#fff6d8" : "#fffdf7", padding: 17, opacity: stack, transform: "translateX(" + String((1 - stack) * 120) + "px)"}}>
<strong style={{fontSize: 24}}>{layer}</strong>
</div>
))}
</div>
</div>
<Sequence from={94} layout="none">
<div style={{marginTop: 34, height: 18, background: "#d9caa7"}}>
<div style={{width: String(76 - net * 22) + "%", height: 18, background: "#047857"}} />
</div>
<p style={{fontSize: 24}}>Net evidence gets smaller when implementation drag is named.</p>
</Sequence>
</AbsoluteFill>
);
};Sources used for this tutorial
Next step
Open the tool with the checklist beside you.
Move from the lesson into the matching Bullion Brains tool, keep the checklist visible, and treat the output as evidence until the caveats are clear.