eiten icon indicating copy to clipboard operation
eiten copied to clipboard

Errors Coming after Previous Successful Use

Open mcb219 opened this issue 5 years ago • 0 comments

When I run this from the examples:

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

I get: 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 "/Users/matt/Desktop/eiten-master/eiten.py", line 118, in run_strategies returns_matrix) File "/Users/matt/Desktop/eiten-master/strategy_manager.py", line 59, in random_matrix_theory_based_cov filtered_covariance_matrix = self.strategyHelperFunctions.random_matrix_theory_based_cov(returns_matrix) File "/Users/matt/Desktop/eiten-master/strategies/strategy_helper_functions.py", line 18, in random_matrix_theory_based_cov variances = np.diag(np.cov(returns_matrix)) File "<array_function internals>", line 6, in diag File "/Users/matt/opt/anaconda3/lib/python3.7/site-packages/numpy/lib/twodim_base.py", line 283, in diag raise ValueError("Input must be 1- or 2-d.") ValueError: Input must be 1- or 2-d.

I used this just yesterday to do an analysis with no problem. Also, I looked at the other issue in the list that said maybe there's some issue with a stock picked in stocks.txt, so picked two stocks (AAPL and BA) to check if that could be it and it still causes an error.

mcb219 avatar Oct 20 '20 15:10 mcb219