Ewan Li

Double 7s on SPY and QQQ

Index mean reversion

paperaccountDAILYbookd7startedSep 30, 2026

What it is

Double 7s on SPY and QQQ, in a sub-book of the DAILY Alpaca paper account: above the 200-day average, it buys at the lowest close of 7 sessions and sells at the highest. 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.
  • Entry: buy at a close above its 200-session average that is the lowest of the last 7 closes, today's included, ties counting.
  • Exit: sell at a close that is the highest of the last 7, ties counting.
  • Size: half of the sub-book in each fund it holds, in whole shares 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
D7_WINDOW7closes, today's includedsyseq/strategy/index_rules.py:23tests/test_index_rules.py:37
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.
$98,500$99,000$99,500$100,000$100,500Sep 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,010.63Oct 13, 2026: $99,845.14Oct 14, 2026: $98,927.66Oct 15, 2026: $99,004.17
The book's value — data table
Double 7s 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,010.63
Oct 13, 2026$99,845.14
Oct 14, 2026$98,927.66
Oct 15, 2026$99,004.17
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—DAILYSPYlong64768.63031————+$202.22——openTrade journal (1)
Oct 12, 2026—DAILYQQQlong67745.881343————−$1,198.05——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)