Factor Modeling, Portfolio Construction, Python, Log Returns, Finance.
calculate_jensens_alpha(self): # Calculate Jensen's Alpha for the portfolio risk_free_rate = 0.02 # Assume a risk-free rate of 2% expected_returns = np.mean(self.factor_model, axis=0) cov_matrix = np.cov(self.factor_model, rowvar=False) portfolio_return = np.dot(self.portfolio_weights,