Factor Modeling, Portfolio Construction, Python, Log Returns, Finance.
rowvar=False) portfolio_return = np.dot(self.portfolio_weights, expected_returns) portfolio_volatility = np.sqrt( np.dot(self.portfolio_weights.T, np.dot(cov_matrix, self.portfolio_weights))) sharpe_ratio = portfolio_return / portfolio_volatility return sharpe_ratio def