Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Newbie question

Hi Guys,
I'm new at quantopian and this is my very first algo. I have couple of questions and o hope someone can clarify it for me.
first question is: is it normal for a single security SMA cross algo take more than 10 min to back test?
Second question: Around 08/28/2015 the algo goes crazy and buy and sell a bunch of times and i don't know why, any ideas?

I appreciate any help.

Many thanks

Felipe

3 responses

Hi,

I'm new to quantopian, and to python as well. So this is probably one of those blind leading the blind moments.
... from what I can tell, running all that code each and every minute would certainly take time. Seeing that you went back to 2008 and ran your code about 250 times per year, so total of 2,500 processes of your code. Additionally, I will point out that included in your code is to pull data for 50 days and 200 days. -Though I'm sure this would process timely if ran live.

You could try limiting the full code to only run every 5 minutes, or 15, etc.
nest all the code in handle_data in an if statement:

now = get_datetime().minute
if now % 15 == 0: (% provides remainder)
print now

As for the event in August 2015, I can't be much help on, other than the fact that it must have met the criteria.

I would do this way

Thanks for the help!