eiten icon indicating copy to clipboard operation
eiten copied to clipboard

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

Open sradu opened this issue 5 years ago • 2 comments

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?

sradu avatar Sep 21 '20 04:09 sradu

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

tradytics avatar Sep 21 '20 04:09 tradytics

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

sradu avatar Sep 21 '20 04:09 sradu