-
Notifications
You must be signed in to change notification settings - Fork 0
Assumption Execution at Next Day Market Open
Many algorithmic trading backtests assume that:
Orders are executed at the market open on the next trading day after the signal is generated.
This simplifies implementation and avoids lookahead bias. However, this assumption also requires careful validation.
It depends on several factors:
-
Order size relative to daily trading volume
If your trade size is small compared to the average daily volume, it's likely that you can execute at or near the opening price with minimal market impact. -
Market liquidity
In highly liquid markets (e.g., major ETFs or large-cap stocks), opening price execution is a reasonable approximation. -
Order type
Market orders might fill immediately, but with slippage. Limit orders may not fill at all. -
Volatility at market open
Some assets experience high volatility right after the market opens, making this approximation less accurate.
To test this assumption:
- Compare your backtest results against paper trading using a broker like Alpaca.
- Log actual fill prices from paper trades and compare them with assumed open prices in your simulation.
- Monitor fill success rate for limit orders and the slippage for market orders.
Alpaca’s paper trading environment is useful but has limitations:
Feature | Alpaca Paper Trading |
---|---|
Market order execution | Always fills, at simulated prices |
Limit order realism | May fill unrealistically |
Slippage / liquidity model | Not modeled accurately |
Market impact simulation | ❌ Not supported |
Therefore:
Alpaca paper trading is helpful for functional testing but not reliable for execution realism.
To improve simulation fidelity, consider:
- Using historical bid/ask spreads and order book data if available.
- Incorporating slippage models into your backtest.