Trader OS
Phase 6 · Professional trading

Chapter 34 · PnL Attribution

You made money this month—do you know exactly why?

Reading mode
Skills to practice
Capital allocationRecognize failure
3D simulation
None

Market scene

Your current reading mode collapses this section.

Lin's virtual position report shows $112 profit. He says, “Great signal; give it more capital next month.” Zhe asks how much the advance benchmark position would earn without the signal, and where savings while waiting for execution belong.

They unpack the same trade. Explained amounts total only 109, leaving 3 unreconciled. May those 3 dollars conveniently become “signal skill”?

Your decision

Your current reading mode collapses this section.

Choose how to explain and reconcile the $112 report.

Observe the result

Your current reading mode collapses this section.
ComponentDollars
Advance benchmark position+50
Position beyond benchmark+50
Independent holding cash flow+5
Funding−8
Independently measured basis change+12
Decision-to-arrival price difference+10
Fees−6
Arrival-to-fill price difference−4
Unexplained difference+3
Total+112

This is a teaching price bridge, not nine independent sources of skill. A positive component may merely be favorable on this occasion.

The mechanism

Hold 2 units, with an advance benchmark of 1. Decision price is 1,000, arrival 995, fill 997, and terminal valuation 1,050. Prices use the same definition, stripping separately listed basis changes.

First decompose prices. The benchmark times decision-to-terminal change contributes 50; the extra unit contributes 50. The decline from 1,000 to 995 while waiting improves two units by 10. Filling 2 above arrival costs 4. Total price PnL is 106, exactly two units from 997 to 1,050.

Then add independent holding cash flow 5, funding −8, basis 12, and fees −6, yielding 109. Independent observation is 112, leaving 3. Begin with an independent total and retain unexplained differences; using the same formula for totals cannot prove independent reconciliation.

  1. Fix benchmarks and classification boundaries before trading
  2. Build a price bridge with consistent prices and times
  3. Add nonoverlapping cash flows and costs
  4. Compare with independently observed net PnL
  5. Retain and investigate Residual

This covers one fixed-position interval. Size changes require separate intervals and retained ledgers; collapsing everything into an average price must not erase quantity changes.

What it is called

PnL attributionPnL Attribution
Decompose observed PnL using advance benchmarks and nonoverlapping rules, then reconcile totals. This chapter uses nine components.
DirectionalDirectional
Price PnL of the advance benchmark. Do not choose the benchmark after seeing results.
SignalSignal
Here, price PnL from active positions beyond the benchmark. One positive result does not prove a signal; OOS and net-cost validation remain required.
CarryCarry
Only independent holding cash flows here. Funding and Basis are separate and cannot reenter Carry.
ExecutionExecution
This bridge assigns decision-to-arrival changes to Execution, arrival-to-fill spread/impact to Slippage, and fees to Fee. Both price intervals can improve execution too.
ResidualResidual
Independently observed net PnL minus eight explained amounts. Nonzero residual requires checking, not automatic assignment to Signal.

Real markets

Funding can be paid without a price movePerpetuals

Chapter 17 models holding costs. Deducting funding in net cash flow and again in Carry exaggerates costs. Check whether ledgers already include it.

Basis convergence differs from directional movesDated futures

Use the Chapter 17 spot/futures example. If price changes already include basis, listing Basis again duplicates it. Unify underlying/contract valuations before decomposition.

Market making has spreads and inventory changesCEX and DEX

Chapter 15 separates spread, adverse selection, and inventory; Chapter 16 shows pool price changes. Business explanations may differ, but must reconcile to one account total. Fee income is not all profit.

Hands-on

LabMake nine components sum back to 11225 minutesThis site's price-bridge experiment

Teaching long of 2 units, decision price 1,000, arrival 995, final 1,050; Carry +5, Funding −8, Basis +12, Fee $6. Separately reported basis is stripped from price; cash flows do not overlap.

Directional
USD 50.00
Signal
USD 50.00
Carry
USD 5.00
Funding
USD -8.00
Basis
USD 12.00
Execution
USD 10.00
Fee
USD -6.00
Slippage
USD -4.00
Residual
USD 3.00

Eight explained components109.00; residual3.00; nine-component total112.00 USD.

Course versionV1-docs; sourcep4:attribution;Chapter 34 / TRD-PRO-004

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

Changing execution price while holding observed total fixed leaves the difference in residual first. Agree the benchmark before trading. Moving it is a sensitivity experiment, not permission to choose the prettiest retrospective decomposition. Signal does not mean proven skill.

  1. Calculate four price contributions from defaults and verify price PnL of 106.
  2. Add nonoverlapping cash flows and costs; verify explained 109 and residual 3.
  3. Change only fill price, keeping observed total fixed; explain the residual change.
  4. Write an attribution note defining the benchmark, component boundaries, and residual investigation. Do not infer benchmarks from results.

Change one variable

IfChange benchmark quantity from 1 to 0
Active-position attribution rises and direction falls, but total price PnL stays fixed. This is teaching sensitivity, not permission to select a flattering benchmark afterwards.
IfChange independent observed PnL from 112 to 109
Eight explained components stay 109 and residual becomes 0. Alignment establishes only this bridge's consistency, not valid classification or causality.
IfChange fill price from 997 to 1002
Arrival-to-fill cost worsens by $10. With observed total fixed, residual grows by 10. Investigate fills and cash flows rather than inflating Signal.

Three depths

One knowledge nodeTRD-PRO-004: one question at each of three depths
  1. FoundationIf you profited this month, do you know why?Chapter 34
  2. AdvancedHow can PnL be split into direction, signal, Carry, Funding, Basis, execution, fees, slippage, and residual?Advanced F · Institutional trading
  3. InstitutionalHow should attribution determine capital increases and retirement?Institutional

Ask first whether totals are independent, then whether components overlap. Explaining totals is only the first step; signal quality still needs cross-sample validation. Retain every discrepancy.

Questions to take away

10
After the outcome, how do I distinguish luck from decisions?
Without active choices, how much would the advance benchmark earn?
7
Is there enough liquidity, and what will execution cost?
Which data supports decision, arrival, and fill prices?
3
What would show that I am wrong?
What residual size pauses capital increases and triggers investigation?

Chapter self-test

One idea to take away

Separate direction, signal, carry, execution, and fees to distinguish skill from luck.

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

If you profited this month, do you know why?

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.

  • PnL attribution:Not read

  • Directional return:Not read

  • Signal return:Not read

  • Carry:Not read

  • Execution drag:Not read

  • Residual: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 34 · TRD-PRO-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