Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
backtest of tutorial lesson 1 algorithm

Hi,

I copied the algorithm from the tutorial, lesson 1: https://www.quantopian.com/tutorials/getting-started but I don't understand the results of the backtest.

The algorithm allocates 100% of its portfolio in AAPL but the backtest shows buy and sell transactions of AAPL on the first day. Why?
I expected only buy transactions on the first day equivalent to the initial capital.

Thanks

2 responses

Looks at this post. https://www.quantopian.com/posts/order-target-percent-ordering-too-much The problem is the order method keeps placing orders before previous orders have filled. It first over buys then it over sells.

Got it. Thanks