A target position of 1,000 shares does not earn the return on 1,000 shares when only 600 fill. A backtest that multiplies desired weights by subsequent returns can silently assume away partial execution, cash constraints and costs. This lesson derives the holdings-and-cash ledger needed to convert a causally valid signal into portfolio P&L. It applies the timestamp contract and corporate-action rules at each event.
Learning objectives. By the end of this note you should be able to:
- distinguish forecast, target, order, fill and actual holding;
- derive the cash update and marked P&L identity;
- reconcile a partial fill against a portfolio valuation;
- explain when a weight-times-return approximation is valid;
- specify audit invariants for a backtest ledger.
In this lesson
- Follow the objects through the decision
- Derive the marked ledger
- Reconcile a complete example
- When weights times returns are sufficient
- Event ordering and missing execution
- Ledger invariants
Before you start
The full lesson, with worked examples and exercise solutions, is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or browse the Quantitative Research, Data and Backtesting syllabus.