# Five original video markets in one shared USD account

`shared_five.py` is a supplementary reconstruction for S&P 500, Nasdaq 100,
gold, silver and BTC. It uses one USD100,000 ledger, not five independently
funded accounts or one-fifth-size sleeves. Primary outputs are in
`shared_results/`; alternate path outputs are in `shared_high_first/`.

The entry is long-only, after price exceeds the previous 20 completed-session
high. The exit is a ratcheted prior 10-session low or a fixed 2×Wilder ATR20
stop from entry. ATR and channels use previous completed sessions, grouped
at 17:00 New York; BTC uses the same label convention. No pyramiding or
same-session re-entry after an exit is permitted. No previous-winner filter,
historical-Turtle System 1/2 filters or weekly-frozen ATR is used.

The main reconstructed baseline risks 2% of highest previously realized
account balance per new position. The modification risks 0.5% of current
realized balance. A separately labeled sensitivity uses 2% of a high-water
mark sampled at completed synthetic bar closes. The video uses “equity”; the
realized-balance baseline therefore is not a claim of exact sizing parity.
No variants were selected or tuned using test-period performance.

Signals, trades, equity and resources are processed in a shared chronological
queue. Fixed simultaneous-event priority is exits before entries, then
US500, US Tech 100, gold, silver and BTC. This priority was not optimized.
The gross admission cap is five times liquidation equity. The aggregate
collateral admission constraint reserves full BTC spot notional and one-fifth
of CFD notional; entry spread/slippage loss and commission are also reserved.
Positions can subsequently drift above their admission constraints; the
simulation does not impose a broker maintenance-margin closeout. Continuous
fractional sizing is used, so this is not a minimum-lot USD1,000 account test.

Inputs are five-minute bid/ask CFD bars and hourly Coinbase BTC/USD spot
trade bars with modeled spread. Every bar follows a declared O-L-H-C path
in the primary run or O-H-L-C in the alternate run. Its four points are spread
across its actual interval: open, one-third, two-thirds, and interval-end
minus one second. The low bits of the event key preserve phase identity.
An hourly BTC close cannot affect earlier five-minute CFD events. Extrema
timing and cross-asset alignment remain assumptions because OHLC bars do
not reveal synchronized tick paths. A favorable endpoint mark after a
threshold fill can still affect later synthetic events. This is a sensitivity
replay, not evidence of executable tick-level fills.

These fills differ from the older standalone engine, which uses a
conservative entry-bar stop-first convention. Differences between standalone
and shared results reflect both pooled sizing and this declared synthetic
path convention. They are not solely a diversification comparison.

Cost assumptions per side: CFD commission 0.5 basis points, spot BTC
commission 60 basis points, slippage 1 basis point, plus input or explicitly
modeled bid/ask spread. CFD carry is a debit of 2 basis points of notional per
elapsed holding calendar day, charged from the last observable session close;
spot BTC carry is zero. Twice-cost stress doubles all those modeled costs
and spread. The study does not reconstruct historical broker financing,
index dividend adjustments or asset-specific maintenance margin.

Equity marks open positions and deducts financing and fees paid through the
cutoff. Final positions are not liquidated for a fabricated closing trade.
Trade metrics cover closed positions; overall return includes open marked
positions. New summaries expose the open-position details and reconcile
initial capital plus closed and open marked net P/L to final equity.
Daily equity observations include weekends because BTC trades every day.

The report records session-close and synthetic-intrabar drawdowns separately.
It does not simulate FTMO evaluation stages or estimate challenge pass rates.
Peak-to-trough drawdown is not identical to FTMO 2-Step's static initial
capital floor. BTC spot is not the BTC CFD traded on a prop platform, and
Darwinex's risk engine is not replicated.

Run from this folder with `numpy` and `pandas` installed:

```sh
python -m unittest test_shared_five -v
python shared_five.py --data data --out shared_results
python shared_five.py --data data --out shared_high_first --path high-first --quick
```

The public Python bundle needs `turtle_backtest.py`, `original_turtle/engine.py`
and `original_turtle/__init__.py` from the recovered source package alongside
this script. In this workspace, the script also finds them in `recovered/`
and `shared_five_source/`. The raw input CSV files require a separate download.

Eight synthetic regression checks cover future-price invariance of completed
indicators, actual-interval close timestamps, mixed-frequency quote
availability, full spot collateral, common-book resource competition,
wide-spread CFD capacity after immediate costs, closed-ledger cash identity,
and equity high water only after completed closes. They do not certify broker
execution or profitability.
