-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constantly recieving "IndexError: single positional indexer is out-of-bounds" #21
Comments
Yeah, having the same problem... |
having the same problem trying to run a zipline backtest. looked at every iloc function and still can't find error. below is the code with errors %matplotlib notebook import zipline We'll use this to find a future date, X months out.from dateutil.relativedelta import relativedelta settingsspread_months = 12 DataFame for storing and updating the data that we want to graphdynamic_results = pd.DataFrame() fig = plt.figure(figsize=(10, 6)) def initialize(context):
def update_chart(context,data):
def weekly_trade(context, data):
start = datetime(2001, 1, 1, 8, 15, 12, 0, pytz.UTC) perf = zipline.run_algorithm( IndexError Traceback (most recent call last) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\utils\run_algo.py in run_algorithm(start, end, initialize, capital_base, handle_data, before_trading_start, analyze, data_frequency, data, bundle, bundle_timestamp, trading_calendar, metrics_set, default_extension, extensions, strict_extensions, environ, blotter) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\utils\run_algo.py in _run(handle_data, initialize, before_trading_start, analyze, algofile, algotext, defines, data_frequency, capital_base, data, bundle, bundle_timestamp, start, end, output, trading_calendar, print_algo, metrics_set, local_namespace, environ, blotter) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\algorithm.py in run(self, data, overwrite_sim_params) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\gens\tradesimulation.py in transform(self) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\gens\tradesimulation.py in every_bar(dt_to_use, current_data, handle_data) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\utils\events.py in handle_data(self, context, data, dt) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\zipline\utils\events.py in handle_data(self, context, data, dt) in weekly_trade(context, data) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\pandas\core\indexing.py in getitem(self, key) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\pandas\core\indexing.py in _getitem_tuple(self, tup) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\pandas\core\indexing.py in _has_valid_tuple(self, key) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\pandas\core\indexing.py in _has_valid_type(self, key, axis) C:\Users\Scott\Anaconda3\envs\zipline35\lib\site-packages\pandas\core\indexing.py in _is_valid_integer(self, key, axis) IndexError: single positional indexer is out-of-bounds |
Can you please provide an example of how the list of countries should be entered?
I am constantly receiving "IndexError: single positional indexer is out-of-bounds"
The text was updated successfully, but these errors were encountered: