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

Errors Coming after Previous Successful Use #25

Open
mcb219 opened this issue Oct 20, 2020 · 0 comments
Open

Errors Coming after Previous Successful Use #25

mcb219 opened this issue Oct 20, 2020 · 0 comments

Comments

@mcb219
Copy link

mcb219 commented Oct 20, 2020

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.

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

1 participant