Answered step by step
Verified Expert Solution
Question
1 Approved Answer
beta =1.00 We have the following inputs into the optimization problem: RET: a 1801 vector of expected returns BETA: a 1801 vector of market betas
beta =1.00 We have the following inputs into the optimization problem: RET: a 1801 vector of expected returns BETA: a 1801 vector of market betas RF: risk-free rate =2.78% COV_MAT: a 180180 Ledoit-Wolf covariance matrix of returns. Which set of contraints do we need to provide in the Python code below? from scipy.optimize import minimize def objective(weights, Eret, RF, cov): Risk_premium = weights.T @ Eret - RF portfolio_volatility = np.sqrt(weights.T@cov @. weights) sharpe_ratio = Risk_premium / portfolio_volatility return -sharpe_ratio \# Define the constraint(s constraints = [ THS INFORMATION IS MIS SING ] \# YOU NEED TO PROVIDE THIS INFORMATION \# Initial guess initial_weights = np.repeat (1/N,N) \# Solve the optimization problem result = minimize(objective, initial_weights, args =( RET, RF, COV_MAT), method='SLSQP', constraints=constraints ) a. constraints =[ \{'type'. 'eq', 'fun': lambda x: np.sum(minimum (x,0)=0.3}, \{type': 'ineq', 'fun': lambda :x.T @ betas.MKT = 1.0\}, \{'type': 'ineq', 'fun': lambda x : np.sum(np.abs(x))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started