Strategy Library

Overnight Anomaly


Instead of collecting profit from intraday trading, this algorithm tries to capture the overnight returns of the index.


The strategy buys SPY ETF at its closing price and sells it at the opening each day. The strategy makes a lot of trades, therefore, the whole strategy is very sensitive to slippage costs and fees. Those returns are canceled out once transaction costs are taken into account. With the InteractiveBrokers transaction model, fees for 20 years backtest is almost 25% of the initial cash.


You can also see our Documentation and Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the tutorials: