Retrospective
Run after-the-fact analysis of past decisions and trades using workspace snapshots and order history to understand what worked and why.
The retrospective capability replays your workspace history — snapshots, order files, and research notes — to produce a structured analysis of past decisions: what was proposed, what was executed, how positions performed, and where the reasoning held or broke down.
What a retro analyzes
A retrospective draws on three primary sources: the snapshots/ directory (point-in-time book state), the orders/ directory (full lifecycle of every order from proposal to fill or cancellation), and the research/ directory (the agent's notes and rationale written at decision time).
By combining these sources, the retro can answer questions like: how much P&L was generated by a specific strategy over a time window? Did the agent's stated thesis bear out? Which orders were rejected and why? How did position sizing evolve over time relative to volatility?
Running a retrospective
# Run a retro covering the last 30 days, all positions
qoc run retro --since 30d
# Run a retro for a specific symbol only
qoc run retro --symbol NVDA --since 90d
# Run a retro between two explicit dates
qoc run retro --from 2026-05-01 --to 2026-06-30
# Run a retro and write the report to a specific file
qoc run retro --since 30d --output research/retro-june-2026.mdWhat the report contains
The retro report is a Markdown file written to research/ (or the path you specify with --output). It is structured into sections: an executive summary (total P&L, win rate, average hold duration), a decision log (each order with its proposal rationale, fill details, and outcome), a thesis audit (did the research note's stated conditions actually materialize?), and a sizing review (position sizes relative to ATR and portfolio equity at entry time).
Each section is written by the agent using the actual data from the workspace files — no estimates or reconstructions. The report is plain Markdown so you can open it in any editor, share it, or commit it to a git remote alongside the workspace.
Retro report sections
| Section | Content |
|---|---|
| Executive summary | Total realized P&L, unrealized P&L, trade count, win rate, average hold duration. |
| Decision log | One entry per order: proposal date, symbol, side, fill price, exit price, P&L, and link to the research note. |
| Thesis audit | For each closed trade, whether the agent's stated conditions in the research note were confirmed by subsequent price action. |
| Sizing review | Entry size as a fraction of equity vs. ATR-normalized size; flags positions that exceeded the implied risk budget. |
| Rejection log | Orders that were proposed but rejected (by you or by a guard), with the stated reason. |
| Open positions | Current unrealized P&L for any positions still open within the review window. |
Retros require snapshot history
The retrospective tool relies on the snapshots/ directory for mark-to-market P&L at any point in time. If snapshots were not taken at sufficient frequency during the review window, P&L figures will be interpolated between the available snapshot points. Ensure snapshot_interval in desk.toml is set to a frequency appropriate for the hold durations in your strategy.
Using the retro as a feedback loop
The most productive use of a retrospective is as input to your next strategy iteration. After reading the report, drop a brief into inbox/ that references the retro file and asks the agent to propose changes to the guard thresholds, sizing logic, or screening criteria based on what the analysis surfaced.
The agent can read the retro Markdown file directly and produce a structured proposal for adjustments to desk.toml guards or entity watchlist criteria — giving you a complete feedback loop from execution, to analysis, to revised strategy, all inside the same workspace.
Schedule a monthly retro automatically
Add a schedule file to schedules/monthly-retro.toml that runs qoc run retro --since 30d on the first trading day of each month. The agent will write a fresh report to research/ overnight, ready for you to review the next morning without any manual trigger.