First-to-Last Day of Month on Alpaca
Buy the first session of each month, sell the last — a pure calendar-seasonality test. Deployed to your own Alpaca account — no code, your assets never leave the broker.
Setup on Alpaca
- Connect Alpaca with your API keys — paper and live accounts are both supported.
- Validate any strategy against Alpaca paper first: same rules, simulated money, live data.
- Promote to the live account when paper behavior matches the backtest.
- Each deployed strategy runs in its own sleeve with independent cash.
- Guardrails check every order: price bands, notional caps, and a global pause.
The strategy
- WHEN the first session of the month opens · IF not invested · THEN buy with 98% of the sleeve (once per month)
- WHEN the last session of the month opens · IF invested · THEN sell the whole position
Good for: understanding how much of an asset's return accrues inside the month versus across month boundaries.
Watch out: this is a research template more than an edge: it holds ~95% of all sessions, so results usually shadow buy-and-hold minus the boundary days.
Strongest backtests for this strategy
| ETF | CAGR | max DD | trades |
|---|---|---|---|
| TECL | 27.3% | −78.0% | 67 |
| SOXX | 25.3% | −44.4% | 67 |
| SOXL | 22.5% | −90.2% | 67 |
| ROM | 21.3% | −69.4% | 67 |
| FAS | 20.1% | −66.7% | 67 |
| SPUU | 18.9% | −44.2% | 67 |
| XLK | 18.1% | −32.1% | 67 |
| SSO | 18.0% | −44.0% | 67 |
Top-8 by CAGR shown of 59 tested — hindsight selection; see the full table including the losers.
Build it from blocks (or type it in English), backtest it on 5.5 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.
Frequently asked questions
How do I automate monthly cycle on Alpaca?
Connect Alpaca to DeployQuant (trade & read permissions only), pick the First-to-Last Day of Month template or describe it in English, backtest it on your chosen ETF, allocate cash, and confirm live trading. The strategy then runs every session in its own sleeve inside your Alpaca account.
Is the turn-of-the-month effect real?
It has appeared in long historical studies, but it's regime-dependent and small. These pages let you check the recent five and a half years per ETF instead of trusting a decades-old average.
Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-07-17, $10,000 starting capital, no margin, fees and slippage not modeled) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.