What you will learn
- Execution-to-trade grouping
- Fees and financing
- Deposits and withdrawals
- Timezone-consistent sessions
Execution-to-trade grouping
Execution records describe fills; a trade is a grouping chosen under an accounting convention. Partial entries, partial exits and reversals require explicit grouping. Keep raw fills so a changed grouping rule can be audited.
Fees and financing
Fees and financing should be included consistently. Allocate account-level charges under a documented rule where direct attribution is unavailable. Distinguish estimates from known charges and reconcile aggregate totals.
Deposits and withdrawals
Deposits and withdrawals are external cash flows, not trading gains or losses. A balance change must be separated into trading result and contributions before it is used to judge performance.
Timezone-consistent sessions
Session tags depend on timezone and a defined boundary. A trade opening before midnight and closing after it can be classified in several ways; choose entry-based, exit-based or another stated convention and apply it consistently.
Worked example
One position is built with two entries and closed in three fills. Counting each fill as an independent completed trade would distort win rate and holding-period analysis.
Try it yourself
Write a grouping rule for that sequence and identify which raw fields must be retained to reconstruct it.
Show the worked solution
Retain account, instrument, direction, quantities, execution IDs and times. Group under a stated position or lot convention, allocate costs consistently and preserve the five original fills beneath the resulting trade record.
Apply this to your course project
Produce a weekly report that reconciles net P&L and explains uncertainty in small groups.
Keep the calculation inputs, assumptions and decisions with your work. Practical exercises are self-reviewed; the scored knowledge checks assess the questions shown, not an independent certification of practical competence.