Factor Modeling, Portfolio Construction, Python, Log Returns, Finance.
__init__(self, factor_model, portfolio_weights): self.factor_model = factor_model self.portfolio_weights = portfolio_weights def calculate_sharpe_ratio(self): # Calculate Sharpe Ratio for the portfolio expected_returns = np.mean(self.factor_model, axis=0) cov_matrix = np.cov(self.factor_model,