Feasible set

463 days ago by rafal

mu_1=0.1 mu_2=0.15 #rho=0.4 sigma_1=0.2 sigma_2=0.3 @interact def feasible_set(rho=(4..8)): rho=rho/10 mu(w)=w*mu_1+(1-w)*mu_2 sigma(w)=abs(w^2*sigma_1^2+(1-w)^2*sigma_2^2+2*w*(1-w)*rho*sigma_1*sigma_2)^0.5 show(parametric_plot( (sigma(w), mu(w)), (w, -1, 2) )+point([(sigma_1,mu_1),(sigma_2,mu_2)])) 
       
rho 

Click to the left again to hide and once more to show the dynamic interactive window