# Turtle reconstruction: independent engine audit

Audited 16 November 2026. Files: `recovered/turtle_backtest.py`, `prop_eval.py`, `prop_replay.py`, `portfolio_diagnostics.py`, and their tests. This is a source and synthetic-fixture audit; it does not establish that the underlying source quotes match an execution broker or certify a MetaTrader EA.

## Result

No current-session signal lookahead or obvious cash-accounting error was found in the inspected single-market engine. The existing 11 tests pass. Four additional independent tests in `test_audit.py` also pass, covering future-data invariance, New York DST session boundaries, weekend financing and net cash reconciliation, and final open-position marking. These checks support rerunning the engine, subject to the explicit modelling limitations below. No shared engine source was changed during this audit.

## Temporal rules and fills

- Donchian high, low and Wilder ATR all use a one-session shift. Wilder uses a simple-mean seed, followed by the Wilder recursion. The new session's extremes cannot enter that session's signal.
- Intraday input timestamps are treated as opening UTC timestamps. `America/New_York` conversion followed by a seven-hour calendar shift groups the trading session ending at 17:00 New York. A synthetic test verifies the UTC boundary changes from 22:00 to 21:00 when US DST starts.
- Signals require bid high to exceed the prior high. Entry uses the worse of opening bid and threshold, adds the observed opening spread and configured slippage. A later-in-bar breakout therefore uses opening spread as a proxy. Actual trigger spread, queue/fill delay and the one-tick strict-breakout increment are not observed.
- Carried stop exits use the worse of opening bid and stop before slippage. The synthetic gap test confirms a gap can lose more than nominal R.
- The entry bar's low can precede its high. Base convention assumes the stop is touched after entry; alternate convention skips the entry-bar stop except opening gaps. These bracket an important ambiguity but do not bracket every possible multi-market fill sequence. Intrabar adverse FTMO marks can also be conservatively attributed to entry time.
- A position closed during a strategy session cannot reenter in that session. The 10-session low is ratcheted with the preceding stop, so the stop never loosens. Both are reconstruction choices which should remain explicit; they are not proven to be the original indicator's exact mechanics.

## Sizing and accounting

- The baseline risk is 2% of the highest **realized balance**, updated on closing trades. The video's available transcript describes highest account **equity**. Those bases can differ materially while winners remain open. Consequently this is an independently specified reconstruction, not an exact reproduction of the video's high-water sizing or its claimed return.
- Reduced risk uses current realized balance. Quantity is capped by gross notional leverage; minimum-size scenarios round down and reject undersized orders. The symbol specifications are illustrative and cannot certify FTMO/Darwinex feasibility. In particular the US500 illustrative minimum point value differs from the Darwinex reference contract described in the report.
- Entry commission is debited immediately. Closing net P&L deducts entry commission, closing commission and allocated financing; balance has already absorbed entry commission and financing, so close adds price P&L less exit commission only. The independent test reconciles ending balance minus initial balance to the closed ledger.
- CFD financing is a fixed bps-per-calendar-day assumption charged at the next strategy session, including weekend gaps. It is not historical broker swap/triple-swap accrual, and dividends, margin calls and tiered leverage are absent.
- Open final positions are marked to bid and excluded from closed-trade metrics. A hypothetical final exit commission is absent. Reported closed-trade financing excludes financing associated with still-open positions, even though it is in account equity.
- Maximum drawdown uses session-close equity and can miss deeper intraday loss. The initial capital is included as a minimum peak. Sharpe omits the initial first-session return because it is calculated from `pct_change` of observed marks; the effect is generally small, but CAGR and total return include that session.
- BTC is unlevered Coinbase spot with modeled spread and 60 bps taker commission per side. It is not a target broker BTC CFD. A combined CFD/spot portfolio needs separate executable collateral and financing assumptions.

## FTMO replay

- The checker separates one-step and two-step objectives, uses Prague dates with DST, tracks opening days, requires flat realized target attainment and starts a fresh Verification account after phase 1. It correctly includes losing closed days in the current one-step consistency denominator, as tested.
- Equity events contain the worst observed M5 bid low between position/cash changes for each Prague date. That can screen adverse marks but cannot certify tick-level compliance or an exact intra-bar sequence. Financing time is the research booking time, not broker rollover time.
- The replay uses current rule definitions historically. It does not model actual historical rule changes, funded Standard news/market-break restrictions, fees, review delays or payouts. The 365-day cutoff is a research observation horizon, not an FTMO deadline. Overlapping quarterly cohorts are dependent.
- Existing FTMO outputs are per-market standalone sleeves; they do not evaluate simultaneous exposure in a common five-market account. A common-capital portfolio requires its own event stream and replay.

## Portfolio interpretation and recommendation limits

The existing `portfolio_diagnostics.py` combines independent funded sleeves with forward-filled calendar marks, without shared cash, margin, or a common risk budget. This is a useful diversification diagnostic and its label is accurate. It is not the video's shared account. Its passive benchmark is price-only, ignores execution/financing/distributions, and finishes heavily concentrated in Bitcoin; it should not be presented as a risk-matched outperformance test.

The late 2022–2025 split predates the video/rule selection and is a retrospective stability check, not clean prospective out-of-sample evidence. The 20-session moving-block bootstrap is a path-resampling uncertainty diagnostic, not a strategy edge test or proof against data snooping. Faster/slower variants and cost stress are limited robustness checks. There is no random-entry control in this single-market source.

The existing cautious conclusions—no immediate paid FTMO evaluation, observe Darwinex signal/calibration first, and no current live $1,000 CFD allocation—are compatible with the reported weak stressed return and executable-size constraints. A positive signal CAGR or low session-close drawdown alone is insufficient to reverse them. Final advice should use newly reproduced results and broker restrictions, distinguishing any common-account follow-up from the old sleeve comparison.

## Validation performed

`python -m unittest discover -v` in `recovered/`: original 11 tests passed.

`python -m unittest test_audit -v`: independent 4 tests passed.

No historical backtest was re-executed by this audit agent; the data acquisition/backtest owners must record their rerun separately. No MetaEditor compilation or broker live execution was performed.

## Additional closed-ledger diagnostics (newly reproduced outputs)

`recovered/ledger_diagnostics.py` generated `results/ledger_diagnostics.json` from the newly reproduced 2016–2025 ledgers, with file hashes for all inputs. Fifteen market/scenario rows passed finite JSON, range and P&L concentration reconciliation assertions. These are deterministic descriptive diagnostics, not additional historical simulations or a strategy-selection procedure.

At 0.5% current-balance risk in standalone $100,000 accounts:

| Market | Longest closed losing streak | Longest time under a session-close equity peak (calendar days) | Top five winners / gross winning net trade P&L | Closed commissions + assumed financing |
|---|---:|---:|---:|---:|
| US500 | 4 | 1,198 | 45.8% | $9,425.26 |
| US Tech 100 | 5 | 706 | 34.9% | $6,694.08 |
| Gold | 6 | 1,649 | 56.3% | $6,735.28 |
| Silver | 7 | 1,964 | 62.6% | $3,213.70 |
| BTC spot | 6 | 1,034 | 37.0% | $6,250.52 |

Durations include the recovery day when recovered, or the final observed day when unrecovered, measured from the latest observed equity high. Cost totals cover closed positions and omit spread/slippage already embedded in fills; they are not historical invoices. The strong concentration of positive P&L in a few winners is expected for trend following and makes abrupt rule changes or early discretionary exits consequential.

## Financing-only counterfactual

`recovered/cost_sensitivity.py` reruns the frozen single-market engine at 0.5% current-balance risk with financing set to zero while keeping all quote, spread, slippage, commission and sizing rules. Results are in `results/financing_sensitivity.json`. The original assumption is 2 bps/calendar holding day (approximately 7.3% simple annual cost on notional). The counterfactual is diagnostic; it is not a statement that swap-free execution is available at these other costs.

| Market | Full CAGR: assumed carry | Full CAGR: zero carry | 2022–2025 CAGR: assumed carry | 2022–2025 CAGR: zero carry |
|---|---:|---:|---:|---:|
| US500 | 0.754% | 1.656% | 0.714% | 1.439% |
| US Tech 100 | 0.414% | 1.060% | 0.061% | 0.588% |
| Gold | 0.751% | 1.410% | 1.356% | 1.991% |
| Silver | 0.215% | 0.541% | 0.641% | 0.961% |

The difference matters, although reduced-risk return remains modest even under zero assumed financing. Scenario metadata preserves full configurations and source hashes. Open final trades retain marked equity rather than a fabricated exit.

## Shared-book follow-up review

The follow-up `shared_five.py` was reviewed separately. During review, a material timing issue was identified in inherited synthetic paths: opening, extrema and close were originally assigned to the opening timestamp plus microseconds. With hourly BTC and M5 CFDs in a common book, that made the hourly future close available too early for sizing and equity high water. The owner corrected FiveTape keys by distributing synthetic path points across each actual bar interval and placing close near the interval end. The corrected keys and mixed-frequency test were inspected. Signals still depend on prior completed sessions. A synthetic OHLC path is an assumption about unknown intrabar price timing and cross-market alignment, not evidence of synchronized tick execution.

Admission capacity was also checked for immediate entry spread/slippage mark-to-market loss as well as commission. The owner confirmed a conservative trigger-bid buffer has been applied to gross and collateral bounds; it ignores a favorable synthetic intrasegment mark for new capacity. A wide-spread CFD cap fixture was requested. The shared-book owner is responsible for recording the final run and its complete validation. Its figures are supplementary and cannot replace target-broker tick replay.
