Skip to content
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

IndexError: list index out of range when running with default settings #23

Open
sradu opened this issue Sep 21, 2020 · 2 comments
Open

Comments

@sradu
Copy link

sradu commented Sep 21, 2020

Running this command from the examples:

python portfolio_manager.py --is_test 0 --future_bars 30 --data_granularity_minutes 60 --history_to_use all --apply_noise_filtering 1 --market_index QQQ --only_long 1 --eigen_portfolio_number 3 --stocks_file_path stocks/stocks.txt

returns:
Traceback (most recent call last):
File "portfolio_manager.py", line 37, in
main()
File "portfolio_manager.py", line 33, in main
eiten.run_strategies()
File "Work/eiten/eiten.py", line 107, in run_strategies
historical_price_info, future_prices, symbol_names, predicted_return_vectors, returns_matrix, returns_matrix_percentages = self.load_data()
File "Work/eiten/eiten.py", line 88, in load_data
self.data_dictionary = self.dataEngine.collect_data_for_all_tickers()
File "Work/eiten/data_loader.py", line 153, in collect_data_for_all_tickers
historical_price, future_price, symbol_names)
File "Work/eiten/data_loader.py", line 171, in remove_bad_data
most_common_length = length_dictionary[0]
IndexError: list index out of range

Any thoughts on what I'm doing wrong?

@tradytics
Copy link
Owner

Try changing your stocks list. I am assuming this happens because data for your stocks cannot be downloaded by yahoo finance.

@sradu
Copy link
Author

sradu commented Sep 21, 2020

I'm using the default stocks/stocks.txt. I'm on the discord if you want to debug live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants