Ewan Li

RSI(2) on SPY and QQQ

Index mean reversion

paperaccountDAILYbookrsi2startedSep 30, 2026

What it is

RSI(2) on SPY and QQQ, long and short, in a sub-book of the DAILY Alpaca paper account: long after a sharp drop while above the 200-day average, short after a sharp rise while below it. The short side is held as the inverse funds SH and PSQ. Its trades come from the account's trade journal.

The rule

  • Instruments: SPY and QQQ, each decided on its own dividend-adjusted daily bars, with today's bar taken from the 5-minute snapshot at about 15:40, its range the day's so far. The short side is held as SH and PSQ, ProShares' −1× daily S&P 500 and Nasdaq-100 funds, because other sub-books hold SPY and QQQ long in the same account. Their daily reset and fee make them differ slightly from a short.
  • Long: when the close is above its 200-session average and RSI(2) is below 10, hold the fund until a close above the 5-session average.
  • Short: when the close is below its 200-session average and RSI(2) is above 90, hold the inverse fund (SH for SPY, PSQ for QQQ) until a close below the 5-session average.
  • Turns: an exit and a new entry never fall on one close.
  • Size: half of the sub-book in each fund it holds, in whole shares of SPY or QQQ, or of SH or PSQ on the short side, at the snapshot price, held to the exit.
  • Top-up: a position an entry left short of its size can be topped up to it at the owner's request, at a later close while the rule still holds it. tr200's SPY was, at the 2026-10-02 close.
  • Orders: decided at about 15:40 ET on that day's 5-minute snapshot, only between 15:25 and 15:50 and never on a session that closes early, then netted per symbol with the other sub-books' orders and worked into the close: from 15:55 each rests as a limit order at the midpoint of IEX's quote, and from 15:59 what is left goes at market; nothing is sent after 15:59:45. On the first session, 2026-09-30, they went as market-on-close orders instead, and Alpaca's paper account filled about 15% of their value.
  • Fills: shares one sub-book buys and another sells at the same close meet inside the account at the official close; every leg on the larger side then gets one average of that price and Alpaca's fill. An entry left unfilled, or the unfilled part of one, is dropped and the sub-book holds less; an exit left unfilled goes again at the next close.
NameValueUnitWhere it livesPinned by
TREND200sessionssyseq/strategy/index_rules.py:19tests/test_index_rules.py:37
EXIT_SMA5sessionssyseq/strategy/index_rules.py:20tests/test_index_rules.py:37
RSI_LOW10RSI(2), long belowsyseq/strategy/index_rules.py:21tests/test_index_rules.py:37
RSI_HIGH90RSI(2), short abovesyseq/strategy/index_rules.py:21tests/test_index_rules.py:37
INVERSE.SPYSHheld for the short side of SPYsyseq/alpaca_books.py:35tests/test_alpaca_books.py:49
INVERSE.QQQPSQheld for the short side of QQQsyseq/alpaca_books.py:35tests/test_alpaca_books.py:49
INSTRUMENTSSPY, QQQ—syseq/alpaca_books.py:34tests/test_alpaca_books.py:49
HALF0.5of the sub-book per fund heldsyseq/alpaca_books.py:37tests/test_alpaca_books.py:49
WORK_FROM15:55ETsyseq/execution/close_worker.py:36tests/test_close_worker.py:210
LAST_ATTEMPT15:59ETsyseq/execution/close_worker.py:37—
LAST_SEND15:59:45ETsyseq/execution/close_worker.py:38—
OWNER_COMMISSION0.007USD a share a side, an estimatesyseq/journal/common.py:13tests/test_journal.py:651

Its read

What is read
the sub-book: its return, Sharpe, drawdown and trades against its backtest's one-year range; its fills against the official close, with partial fills, rejections and unfilled exits; and how often the 15:40 decision differed from the final close's. It cannot promote the strategy.
Read on
Sep 30, 2027
Trades needed
—
Trades logged
—
Hard stop
—
Shipped on
—
Deployed commit
c7b1582

Record so far

Closed trades
0
Won
—
P&L
—
Net P&L
—
Closed without a P&L
—
Closed without a net P&L
—
Open
2
Its NAV at each session's close as its ledger keeps it, before the interest and dividends the ledger credits it; the line is the $100,000 it was given.
$100,000$100,050$100,100$100,150$100,200Sep 30Oct 15Sep 30, 2026: $100,000.00Oct 1, 2026: $100,000.00Oct 2, 2026: $100,000.00Oct 5, 2026: $100,000.00Oct 6, 2026: $100,000.00Oct 7, 2026: $100,000.00Oct 8, 2026: $100,000.00Oct 9, 2026: $100,000.00Oct 12, 2026: $100,000.00Oct 13, 2026: $100,000.00Oct 14, 2026: $100,111.99Oct 15, 2026: $100,189.74
The book's value — data table
RSI(2) on SPY and QQQ: its book's NAV at each session's close
SessionNAV
Sep 30, 2026$100,000.00
Oct 1, 2026$100,000.00
Oct 2, 2026$100,000.00
Oct 5, 2026$100,000.00
Oct 6, 2026$100,000.00
Oct 7, 2026$100,000.00
Oct 8, 2026$100,000.00
Oct 9, 2026$100,000.00
Oct 12, 2026$100,000.00
Oct 13, 2026$100,000.00
Oct 14, 2026$100,111.99
Oct 15, 2026$100,189.74
Record Trade journal
Cost model

Alpaca paper fills, with no commission. In the DAILY account, shares one sub-book buys and another sells at the same close meet inside the account at the official close, and every leg on the larger side gets one average of that price and Alpaca's fill. Alpaca's SEC and CAT fees, charged by the day, are left out. Commission is estimated at $0.007 a share a side, the rate at the owner's own broker: the net P&L is the P&L less it, without dividends; the P&L, the total with dividends, the return and the P&L in basis points of the sub-book are before it. An open trade is marked at the latest official close, before commission, with the dividends paid so far beside it.

Trades

2 trades

OpenedClosedAccountSymbolSideSizeEntryExitP&LNet P&LReturnUnrealizedHeldExit byStatusRecord
Oct 14, 2026—DAILYQQQlong68728.23————−$15.64——openTrade journal (1)
Oct 14, 2026—DAILYSPYlong65768.63031————+$205.38——openTrade journal (1)
  1. (1)
    Record Trade journal
    Cost model

    Alpaca paper fills, with no commission. In the DAILY account, shares one sub-book buys and another sells at the same close meet inside the account at the official close, and every leg on the larger side gets one average of that price and Alpaca's fill. Alpaca's SEC and CAT fees, charged by the day, are left out. Commission is estimated at $0.007 a share a side, the rate at the owner's own broker: the net P&L is the P&L less it, without dividends; the P&L, the total with dividends, the return and the P&L in basis points of the sub-book are before it. An open trade is marked at the latest official close, before commission, with the dividends paid so far beside it.

Where the research is

  • The daily account (findings systematic-equity/DESIGN/170)
  • The trade journal (findings systematic-equity/DESIGN/190)
  • Where the rule came from (findings systematic-equity/RESEARCH/250)