Changelog & Bug Tracker
Every fix and new feature — explained without jargon. Click any link to see the result live.
Sell Orders Were Sometimes Never Confirmed
Nick reported that a sell signal fired and appeared in the activity log as "exit submitted" — but the position was never actually marked as sold. The fill confirmation was missing, meaning the system thought it was closed but had no record of the exit price.
The system now re-checks every submitted sell order on each bar cycle (every few seconds) until Alpaca confirms the fill. Previously it did one check and gave up after 3 seconds. Re-entry into the same stock is also blocked while a sell is still being confirmed.
Every sell order is now tracked until fully confirmed. You will see the exact fill price in the orders table for every exit. The "submitted but never confirmed" state can no longer get stuck.
EOD Flatten Did Not Record Fill Price
When the session forced all positions closed at 3:55pm, the system submitted the sell but the actual fill price (what price the stock sold at) was not saved. The order showed as completed but with no price — making P&L tracking incomplete.
The end-of-day flatten now uses the same confirmed-fill tracking as all other exits. The fill price is recorded as soon as Alpaca confirms the market order.
Realized P&L for end-of-day forced closes will now show correctly in the orders table and P&L summary.
Realized P&L Card Showed Blank
The "Realized P&L" stat card on the paper trading page showed nothing — no dollar amount, just an empty box — even after trades had been completed.
The card now immediately shows a dollar figure (green for profit, red for loss) as soon as any buy/sell round trip completes. A small chart below shows the running P&L curve over the session.
Realized P&L is always visible during an active session, formatted as a large dollar amount with color coding.
Session Restart Showed "Position Reconciled" 13 Times for One Stock
After a crash and restart, the activity log showed "Reconciled position: SPY" 13 times for a single stock. This created the appearance of 13 open positions in the internal state when there was actually one.
The restart recovery logic now replays all of today's orders in time order and correctly nets them out — each buy opens a position, each sell closes it. Only positions with no matching sell end up marked as open.
After any restart, the system recovers to exactly the correct open position state. One position, one log line. The 13x bug is gone.
Comparison Backtest Showed 0 Matched Trades
When running the backtest comparison (paper vs backtest), the comparison showed 0 trades matched out of 5, making the slippage analysis useless. The comparison backtest itself ran but produced no trades.
The intraday price cache was missing historical data (it had been accidentally overwritten with only today's bars during testing). The volume filter on the backtest requires 14 days of history — without it, every stock failed the filter. Fixed the cache logic to always fetch missing historical data automatically.
Comparison now matched 9/9 RTH trades. Avg entry slippage: -$0.04 (paper actually got slightly better fills). Avg exit slippage: +$0.06. P&L delta: -$11.52 vs backtest.
Paper vs Backtest Comparison Tool
No way to verify whether the paper trading system was actually following the strategy rules. If paper bought at $100 but backtest expected $99.50, that $0.50 difference (slippage) was invisible.
Added a Compare tab to every paper run. You can run a backtest for any given day and the system will match each paper trade to the corresponding backtest trade, showing entry slippage, exit slippage, and the P&L difference trade by trade.
You can now see exactly how much real-world execution differed from the theoretical backtest on any given day. This is the primary tool for validating that live trading matches the strategy.
RSI(2) Strategy — Nick Spec
No paper trading implementation of the RSI(2) mean-reversion strategy.
Implemented the RSI(2) strategy in the paper trading engine: buy when RSI drops below the entry threshold (oversold), sell when RSI recovers above exit threshold (overbought). Supports re-entry — can trade the same stock multiple times in one day.
Paper run #5 is live running RSI(2) on SPY. Today it completed 13 round trips. The strategy trades intraday and flattens all positions by 3:55pm.
No-Survivor S&P 500 — Index Membership Filtering Fixed
When backtesting on the historical S&P 500 universe (includes companies that were removed from the index), the strategy was sometimes buying stocks that weren't actually in the S&P 500 at the time of the trade. This is a form of look-ahead bias — using future information.
The backtest engine now uses point-in-time membership data: on any given rebalance date, only stocks that were actually in the S&P 500 on that date are eligible to be bought. Companies that were added later are not included in earlier dates.
Backtests on the no-survivor universe are now free of this bias. Results are more conservative and more realistic. This is the correct way to test strategies historically.
Market Timing Filter (S&P 500 Moving Average)
Strategies had no way to avoid being invested during broad market downturns. A strategy might rank and buy stocks even when the overall market was in a downtrend.
Added an optional market timing filter: the strategy checks whether the S&P 500 is above its moving average (configurable: 50, 100, 200-day) before making any buys. Two modes: Hard (exit all positions when filter trips) and Soft (keep existing positions, just don't add new ones).
Strategies with the filter enabled will sit in cash during market downtrends. Historically this reduces drawdowns significantly during bear markets like 2008 and 2022.
Backtest Returns Were Wildly Inflated (Penny Stock Bug)
Some backtests were showing astronomical returns — thousands of percent — that were clearly wrong. A strategy might show +4,800% return when the realistic expectation was +30%.
Two bugs found and fixed: (1) The $1 minimum price filter was silently being skipped due to a comparison error, letting bankrupt and penny stocks into the universe. (2) The realistic engine was not checking the actual opening price before buying — a stock could pass the ranking filter at yesterday's $2 close but then open at $0.18, creating a massive (fake) position size.
Backtest returns are now realistic. The same strategies that showed +4,800% now show +28% — which aligns with what you'd expect from the historical record.