trading-bot
0/37 complete

Module 7: Risk Controls — Estimation Error and Paper Limits · 35 min

Paper Exit Rules — Slippage, Stops, and Stale Data

// sabak

Turn this lesson into one checked practice output

By the end, you should be able to explain the core idea behind “Paper Exit Rules — Slippage, Stops, and Stale Data” in your own words, apply it to one small real or sample task, and identify what still needs human review.

  1. 1

    Learn

    Read the 35-minute lesson without copying an output blindly.

  2. 2

    Try

    Use a small, non-sensitive example that you can inspect line by line.

  3. 3

    Review

    Check facts, fit, and risk; save one improvement note for next time.

Paper exits are scenario rules, not evidence that a real exit was available. Define them before evaluation and apply them to timestamped snapshots. Every exit requires an eligible open paper position, a fresh validated quote, and a policy reason. Missing data produces ABSTAIN_EXIT, never an invented price.

Create separate rules for scheduled review, data-quality stop, hypothesis invalidation, synthetic adverse threshold, and final resolution. A “stop” is a paper control evaluated at captured times; it is not a guaranteed protection. Price can move between snapshots, spreads can widen, and no quote may exist at the threshold.

The fill assumption uses the adverse visible side plus predeclared slippage stress and latency. Record quote time, evaluation time, assumed delay, quote fields, spread, stress increment, policy version, and result. If age exceeds the limit, append STALE_NO_EXIT and keep the position unresolved in the report.

Avoid intraperiod lookahead. With hourly snapshots, you cannot claim an exit at a price briefly visible between them unless that observation exists in the dataset. Do not use daily high/low to simulate an exact stop without an explicit conservative ordering rule. When both a stop and favorable threshold appear in the same coarse interval, mark ordering ambiguous and run adverse/best scenarios separately.

Run sensitivity analysis across latency and slippage values fixed in advance. Show paper outcome, blocked-exit count, and maximum stale duration. A robust report highlights when performance depends on optimistic exit assumptions.

Also compare scheduled-review exits with threshold exits on the same sealed dataset. The comparison must use identical eligibility and cost policies, and it must include cases where neither policy could produce a synthetic fill. Publish the event-family contribution table so one unusual case cannot create a misleading difference between policies.

Idempotency links one exit scenario to position ID and policy version. A corrected snapshot creates a new scenario, never edits the old result. Resolution exits remain separate from mark-based scenarios.

🇵🇰 Pakistan Angle

Connectivity gaps can make paper stops especially unrealistic. Report outages and blocked exits rather than filling gaps. This is a software reliability exercise with fictional points; it offers no risk protection, signal, or instruction for financial accounts.

Hands-On Exercise

Build fixtures for fresh exit, stale quote, missing side, wide spread, ambiguous same-window thresholds, and final resolution. Generate adverse and optimistic scenario tables but designate the conservative one as primary. Prove a retry does not duplicate the event.

Completion Rubric

  • Exit policies and assumptions are frozen before evaluation.
  • Stale/missing data blocks rather than invents an exit.
  • Coarse-window ordering ambiguity is disclosed.
  • Sensitivity results include blocked counts and stale duration.
  • All events remain synthetic, idempotent, and auditable.

Sources

Key takeaway: A paper exit is credible only when timing, quote availability, costs, and ambiguity are recorded instead of assumed away.

Self-check

Before you mark Lesson 7.2 complete

  • Can I explain “Paper Exit Rules — Slippage, Stops, and Stale Data” without reading the lesson back word for word?
  • Did I complete the lesson’s practice step on a real or clearly labelled sample task?
  • Did I check the result for invented facts, private data, unsafe actions, and mismatch with the brief?