cur_stake = class % of equity (drawdown-braked), then min(their stake):
a copy is never bigger than what the wallet actually bet. No reserve
sweep, no $250 pin — the their-bet ceiling is the liquidity bound now
(fills stay within size the market demonstrably absorbed).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
portfolio.py now replays ANY wallet set over a rolling N-day window
(default 30) instead of the hardcoded four-from-June-1:
* live/backtest.json: {days, stake_cap_usd, class_pct, wallets:[{wallet,
name, class}]} — edit to add/remove/swap wallets; seeded with the paper
bot's current 7-wallet follow set
* class parity with the bot: 'whale' replays EVERY trusted bet at
class_pct.whale of equity; 'volume' replays conviction bets at
class_pct.volume, p80 threshold from PRE-window bets only (no peeking)
* outcomes read through trust.py (trusted rows) so any pasted-in wallet
is scored honestly, not on cache marks
* ad-hoc CLI that leaves the dashboard feed alone:
python3 portfolio.py --wallets 0xabc,0xdef:whale --days 14 --out /tmp/t.json
* fix: open positions with unknown entry time used to sort at t=0 and
drain the bankroll before any historical bet ran; they now queue at the
end (and pre-window entries are excluded)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>