From 3bdba2ec50a3d4e1f7df0f62b504a4924a31c255 Mon Sep 17 00:00:00 2001 From: Richard Frank Date: Sun, 11 Sep 2016 18:10:37 -0400 Subject: [PATCH] BUG: run_algorithm with no data source should default to 'quantopian-quandl' bundle --- zipline/utils/run_algo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/utils/run_algo.py b/zipline/utils/run_algo.py index d72c3c9695..9408cc99da 100644 --- a/zipline/utils/run_algo.py +++ b/zipline/utils/run_algo.py @@ -329,13 +329,13 @@ def run_algorithm(start, # if neither data nor bundle are passed use 'quantopian-quandl' bundle = 'quantopian-quandl' - if len(non_none_data) != 1: + elif len(non_none_data) != 1: raise ValueError( 'must specify one of `data`, `data_portal`, or `bundle`,' ' got: %r' % non_none_data, ) - if 'bundle' not in non_none_data and bundle_timestamp is not None: + elif 'bundle' not in non_none_data and bundle_timestamp is not None: raise ValueError( 'cannot specify `bundle_timestamp` without passing `bundle`', )