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

Clone Algorithm
2
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 57aa66dd5f37ab0ffca2fc5d
There was a runtime error.
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

Clone Algorithm
7
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 57aab051d399851005d9730a
There was a runtime error.

Thanks for the help!