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

Hi,
I'm trying to run backtests in the research environment to do some crossvalidation of my algorithm. I looked a bit and I couldn't find any documentation on how to run backtests from the research environment, where should I look? I tried the Zipline library and following this docs (http://www.zipline.io/appendix.html#zipline.run_algorithm) I tried to import the run_algorithm function but I get:
InputRejected:
Importing run_algorithm from zipline raised an ImportError. Did you mean to import TradingAlgorithm from zipline?

Then I tried to import TradingAlgorithm (where can I find docs for it?) but as I use it with a very simple algo, it complains that:
RemoteDataError: Unable to read URL: http://www.google.com/finance/historical

How do I tell it to use quantopian data? Where can I find docs? All old notebooks documenting backtest with zipline are deleted...

1 response

Hi Marco,

I asked the same question as you here. As far as I understood to backtest in Research notebook, you should first instantiate TradingAlgorithm , and then use run method, but it’s currently because of an error impossible, which has something to do with benchmarking and download data from google and use of datareader of pandas .

So I was forced to move to local zipline , where there is exactly the same problem, but there is fortunately github pulls to fix it too. Now I am enjoying to program with zipline on Pycharm .

Regards
Ahmad