# Arena brief: correctness and robustness audit of the Prime Academy approach

You are one of three independent auditors. Produce an audit of the **current** Prime Academy
zero-edge prop-firm approach: is what the paper, the notebook and the code claim actually true
(correctness), and does the deployed decision survive the plausible range of its uncertain inputs
(robustness)? You are not asked to redesign the play. You are asked to find what is wrong or
fragile, prove it, size it, and say what would fix or settle it.

## The approach in one paragraph

A trader with no edge buys a $38 evaluation on the $3,000 tier of Prime Academy FX, trades one fair
EURUSD bracket a day (reward-to-risk 1, a random side each trade, stop max(0.75 x yesterday's daily
sigma, 30 pips), mean 34.8 pips), risks 3% a trade in the assessment (the 35% single-day cap read
gross is 3.15%) and 1.575% once funded (chosen by a line search inside the plateau of the funded
chance of any payout), clips the target to land on +9% and the stop on the -9% floor, and draws
payouts from the funded account until it dies. A purchase is made only if the $1,000 wallet's
expected log growth over three years is positive with 80% of payouts honoured. A Pareto front over
days to first cash, cash a year and wallet drawdown (stop 15 to 45 pips, 1 to 3 accounts) picks
40 pips with one account under the random side's swap. The gate is open at +0.013 with the swap
charged and closed at the measured news step-aside rate (a purchase returns 1.01 times its fee).

## Ground truth (read these; do not take this brief's numbers on trust)

- Project rules: `/root/Projects/trading-framework/CLAUDE.md` (read it first).
- Paper: `/root/Projects/trading-framework/src/notebooks/reports/topics/prime_academy/paper/prime_academy.tex`
  (57 pages; built PDF beside it), numbers from `make_numbers.py` reading `decision.json`,
  `front.json`, `broker_map.json`, `broker_results.json` in the same folder.
- Research modules: `/root/Projects/trading-framework/src/notebooks/reports/topics/prime_academy/modules/`
  (`prime.py` chains and wallet, `spread.py`, `hedge.py`, `fxcontrol.py`, `news.py`).
- Rules as inferred: `.../prime_academy/rules.json`. Do NOT browse the web for the firm's rules.
- Notebook (sections 20-26 are the recent work; 24 broker map, 25 deployed decision and gate,
  26 the front): `/root/Projects/trading-framework-prime/src/notebooks/reports/topics/prime_academy/prime_academy.ipynb`
  (branch `prime-academy`; its `modules/broker_map.py` is there too).
- An executed copy with outputs: `/tmp/claude-0/-root/a069d553-8ca2-46bc-b13c-3f588b51dbbf/scratchpad/s26/run2.ipynb`.
- Strategy and live runner: `/root/Projects/trading-framework-prime/src/strategies/prime_academy_strategy/`
  (`prime_academy_strategy.py`, `acceptance.py`, `run_live.py`).
- Past findings: `/root/Projects/trading-framework-mdgraph/prime-academy-*.md` (grep the descriptions first).
- The formulation behind section 26: `/tmp/claude-0/-root/a069d553-8ca2-46bc-b13c-3f588b51dbbf/scratchpad/fable_formulation.md`.

## What to examine (at least)

1. **Rules encoding.** Does every rule in `rules.json` reach the chains, the wallet and the strategy
   the way the paper says (floor on the tick, target and floor clips net of the round trip, 35% cap
   read gross, 5% daily rule, payout clock, $100 minimum, 3-day minimum, allocation cap)?
2. **The chains and the wallet.** Are `eval_chain`, `funded_chain`, `funded_line_search`, `plateau`,
   `wallet_mc`, `spread.family`, `hedge.shared_wallet`, `day_split_mc` correct? Off-by-one in clocks,
   horizons, ruin, first-cash day; refusal handling; the 14-day clock converted to 7 trades.
3. **The inputs.** Cost share decomposition and its scaling with the stop; the broker pace mapped
   from reward-to-risk to stop (Wald a x b); swap nights; step-aside rate; spread; correlation of
   accounts; the stop-rule mapping.
4. **The decisions.** The purchase gate, the funded pick, the front and the 40-pip pick. For each,
   which uncertain input flips it, and at what value (a threshold, not "it is sensitive").
5. **Paper-to-code agreement.** Any sentence, table or figure the code does not support.
6. **Strategy and live runner.** Does the code that would trade match the model (sides, sizing,
   clips, the clock in `set_account`, what `run_live.py` actually wires)?

## Hard constraints

- **Read-only.** Do not edit, create or commit anything in any repository, the mdgraph, the
  notebook, systemd units or `/etc`. Write only inside your own output folder.
- **Memory is tight** (8 GB host, about 3.5 GB free, two other auditors running at once). Prefer
  the exact chains, which are cheap. Any Monte Carlo at most 5,000 paths, one process at a time. Do
  not execute the notebook, `make_numbers.py`, or any broker replay that is not already cached.
- No data purchases, no network calls for rules, no live trading, do not touch the
  `prime-academy` systemd service.
- Scripts you run go in your output folder; cite them by path.

## Output (in your folder)

1. `audit.md`: findings ranked by severity. For each: a one-line claim; the evidence (file:line,
   the command or script you ran, the number it gave); whether it changes a decision (which one and
   how) or is cosmetic; the fix or the measurement that settles it. Label each claim verified (by
   execution or reading the code), inferred, or unverified.
2. A **robustness table**: each decision against each uncertain input, with the value at which the
   decision flips.
3. `rationale.md`, short: what you looked at, what you chose not to examine and why, and the
   alternatives you considered for how to audit.

Be adversarial. A finding you did not try to reproduce is not a finding. Say plainly when
something checked out.
