Skip to content

Errors Coming after Previous Successful Use #25

@mcb219

Description

@mcb219

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions