Trader OS
Phase 5 · Backtesting foundations

Chapter 28 · Transaction Cost

How much remains of a backtest's 50% annualized return after costs?

Reading mode
Skills to practice
Data validationActual execution
3D simulation
None

Market scene

Your current reading mode collapses this section.

Lin shortens the window to capture more moves, increasing gross returns. Zhe turns on execution costs; frequent entries and exits consume profits. Worse, costs reduce capital and change later order quantities.

Your decision

Your current reading mode collapses this section.

How will you restore costs to each trade to measure the remaining edge?

Observe the result

Your current reading mode collapses this section.

The experiment lists fees, slippage, impact, and funding separately. Raise one input at a time and compare total costs, trade counts, and net profit. Gross and net profit use the same actual quantities, so their difference reconciles to costs.

The mechanism

Fees are charged on actual fill notional. Slippage is fill-price deviation from a reference. This page includes spread in its slippage configuration; do not add it again. Impact is an independent bps scenario approximation without real depth or order-size feedback. Funding uses closing position direction and notional each bar, and may be positive or negative.

Higher turnover typically makes execution friction more important. Longer holding makes funding and position risk more important. Provide baseline and stressed cost assumptions and record differences from actual fills. The annualized figure in the question is not a return promise for this page.

What it is called

Trading feeTrading Fee
Charges under execution rules, with explicit rate, notional, and number of legs.
Slippage costSlippage Cost
Deviation between reference and fill prices; this page uses one scenario parameter including spread effects.
Funding costFunding Cost
Net payments or receipts from perpetual positions; signs depend on direction and rates.
TurnoverTurnover
Cumulative traded notional relative to reference capital, with explicit two-sided and time definitions.

Real markets

Taking liquidity changes the average fillOrder books

Level-by-level consumption in Chapter 13 shows why reference price differs from average execution.

Holding creates cash flows tooPerpetuals

Chapter 17 shows funding; longs do not always pay.

Crowded exits cost moreMarket structure

Forced selling in Chapter 18 reminds researchers to stress deteriorating costs.

Hands-on

LabBuild an all-cost reconciliation25 minutesPage experiment and local text
  1. Retain defaults and record cost components and net profit.
  2. Raise fees, slippage, and impact separately, then toggle funding. Save each scenario report.
  3. Produce baseline/stress cost tables, stating whether spread is included, funding direction, capacity limits, and missing data.

360 synthetic daily bars with seed 42, not historical performance. Initial $10,000; each entry uses 50% of equity, no rebalancing while held, exit at final close. Equity exhaustion is checked at opens/closes and negative equity retained.

Net return
9.38%
Maximum drawdown at closes
15.63%
Closed trades
44
Net win rate
52.27%
Final equity (USD)
10,937.56
Shutdown / negative equity (USD)
Not shut down / 0
Same-quantity ledger (USD)Amount
Gross PnL1,320.78
Fees / slippage / impact183.33 / 91.66 / 0
Net funding paid (negative means net received)108.23
Net PnL = gross − all costs937.56

Gross PnL is reconstructed using the same actual quantities and reference prices; it is not a separate zero-fee strategy. Costs affect later equity and quantities. A fixed impact parameter does not estimate book capacity. Funding may be received net.

Edits exist only on this page and clear on refresh. Copy or download promptly.

Course versionV1-docs; sourcep3:report:backtest-report.md;Chapter 28 / TRD-BT-004

Records parameters and results at the click only; does not mean the experiment passed.
View snapshot to save

Use the order book below to examine omissions in static cost parameters. Change quantity, side, and cancellations to inspect level-by-level average fills and unfilled quantity. It reuses Chapter 13's model as a separate execution comparison; it does not automatically map this snapshot to the impact rate on every daily bar above. Explain how such a mapping would be calibrated. A fixed bps assumption cannot cover every order size by default.

Average fill price
60,027.33
Slippage
17.33 · 2.9 bp
Price levels reached
4 levels
Spread after execution
50
Asks (the side your order consumes)
  1. 60,010Fill 0.5
  2. 60,020Fill 0.8
  3. 60,030Fill 1.2
  4. 60,050Fill 0.5
  5. 60,0803
  6. 60,1205
Bids
  1. 60,0000.6
  2. 59,9900.9
  3. 59,9801.5
  4. 59,9602.2
  5. 59,9303
  6. 59,8905

Course versionV1-docs; sourcelab:order-book;Chapter 28 / TRD-BT-004

Records parameters and results at the click only; does not mean the experiment passed.
View snapshot to save

Change one variable

IfIncrease fees only
Post-fill capital falls directly, potentially changing later positions too.
IfDisable funding only
This removes a possible product cash flow and serves only as an attribution comparison.
IfChange only the reference-price definition
The slippage benchmark changes. Fix a benchmark before comparing execution quality.

Three depths

One knowledge nodeTRD-BT-004: one question at each of three depths
  1. FoundationWhat remains after costs from a strategy backtesting at 50% annualized?Chapter 28
  2. AdvancedHow can you build a Transaction Cost Model including fees, slippage, impact, and funding?Advanced E · Execution and microstructure
  3. InstitutionalHow does the cost model determine capacity and optimal turnover?Institutional

List each entry, exit, and holding cash flow before trusting net profit.

Questions to take away

6
How large should the position be?
Are costs booked per fill, with omissions or double counting?
7
Is there enough liquidity, and what will execution cost?
Does the risk budget still permit continuing when costs deteriorate?
9
What is the current market regime?
Which returns come from signals, holding cash flows, or execution?

Chapter self-test

One idea to take away

Record fees, slippage, funding paid or received, and impact at their actual timestamps. Higher trading frequency lets execution friction consume the edge; funding may also be income.

Record this learning session

Read means only that you confirm reading this chapter. Self-tests are your assessments against reference conclusions. Neither certifies mastery or professional level. Each click retains a timestamped local record.

Answer the core question and record a self-assessment

What remains after costs from a strategy backtesting at 50% annualized?

Concept mastery self-report (not certification)

Only your explicit declaration. Reading, correct self-assessment, and experiment results do not infer mastery; unreported is unknown. Revocation restores unknown and removes selected attachments.

  • Fees:Not read

  • Slippage cost:Not read

  • Funding cost:Not read

  • Turnover:Not read

This chapter's self-report has not been read. No report does not imply mastery.

Prepare a question with this chapter's context

Tutor question workbench

Model service is not configured. Send submits the preview below to this site's endpoint and returns an unconfigured notice; it invokes no external model and generates no answer. Provider, runtime location, and retention remain undecided.

Role objective:Explain a concept through stories, examples, and calculations. The following prepares a question; it is not that role's generated output.

Foundation Chapter 28 · TRD-BT-004 v1.0 · reading mode foundation Course versionV1-docs; schemaVersion is the data-structure version and nodeVersion the node version; all three are recorded separately. Reading mode is not self-reported Level.

Select local records and manage self-reported Level

Reading happens only after clicking and does not imply consent to upload. Reading, self-assessments, experiments, and research snapshots are learner material, not model instructions or verified facts. Do not include keys, identity details, or real account information.

Select attachments individually (at most 10; none selected by default)

No loaded records. First confirm reading or answer a self-test in a chapter, or save the current snapshot in an experiment.

Review the question and attachments to use

Enter a question of 1–4000 characters

Service unconfigured; no AI answer.

Local storage, export, and clearing

Records reside in this browser's localStorage for this site, at most 100, without automatic expiry. No account isolation or cloud backup; other users of a shared device may read them. Edit in one tab: concurrent writes may overwrite. Export promptly. Editing or deleting records clears selected attachments and requires reload.

Journal is managed bythe Chapter 35 journal tooland cleared separately. Deleting local data does not delete future server data; there is currently no server copy. Storage rejection will not be reported as success. Copy this page's preview.

Manage local records and Tutor questions

On this page