Good Afternoon,
I have been playing for over a week with Quantopian in order to cleanly formulate, automate and test my ETF portfolio investment logic. As long as I run backtests for the last 12 months, everything works wonderfully well (see attached).
However, trying to run a backtest from 1/1/2013 to 6/6/2014, Quantopian produces the following error:
Something went wrong on our end. Sorry for the inconvenience.
Exception: inputs are all NaN
There was a runtime error on line 84
Line 84 of my algo contains:
talib_macd = talib.MACD(price_history[sid])
I use the price_history with 300 days worth of data since my entry points are based on MACD cross-over. The results I get with Quantopian's normal 34-day rolling window simply don't match what I get on Google Finance or Tradingview.
Increasing the bar_count to 600 still causes the same error:
price_history = history(bar_count=600, frequency='1d', field='price')
In summary, my questions are:
1) What should I do to back-test my algo with time periods starting earlier than June 2013?
2) Does Quantopian ignore/skip ETFs that didn't exist at a specific date of a backtest period without affecting calculation on available ETFs? Or should I write some test in my algo to check whether the ETF price exists for a given day and skip it if it doesn't?
Thanks in advance for your help.
- Serge