
pi ( np.ndarray, pd.Series, optional) – Nx1 prior estimate of returns, defaults to None. cov_matrix ( pd.DataFrame or np.ndarray) – NxN covariance matrix of returns.
_init_ ( cov_matrix, pi=None, absolute_views=None, Q=None, P=None, omega=None, view_confidences=None, tau=0.05, risk_aversion=1, **kwargs ) ¶ Parameters:
save_weights_to_file() saves the weights to csv, json, or txt. clean_weights() rounds the weights and clips near-zeros. set_weights() creates self.weights (np.ndarray) from a weights dict. portfolio_performance() calculates the expected return, volatilityĪnd Sharpe ratio for the allocated portfolio.
bl_weights() - weights implied by posterior returns. bl_cov() - posterior estimate of covariance. bl_returns() - posterior estimate of returns. idzorek_method() - convert views specified as percentages into BL uncertainties. default_omega() - view uncertainty proportional to asset variance.