jmbejara / comp-econ-sp19

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2019)
48 stars 26 forks source link

Question 7 #11

Closed cschmer closed 5 years ago

cschmer commented 5 years ago

Screen Shot 2019-04-15 at 7 07 21 PM Screen Shot 2019-04-15 at 7 07 19 PM

For question 7 (analytical), I get this graph... This may be because I put the initial weight to w0. How should I resolve this or do something about this, or is this correct?

cschmer commented 5 years ago

It is not correct since I get False for the following question... may somebody help me?

I do not have any lambdas for functions. Do I need those? The only local variables I have are those that define parts of the equation (like A, or [mu, identity])

cschmer commented 5 years ago

Fixed!

If anyone has a similar problem (Hopefully not), I did w0 @ mu instead of mu_target in my verticle stack of mu_p and 1.

jmbejara commented 5 years ago

Glad it worked! Just to add to the discussion, image gives the relationship between a given mu_p and wstar. We can then use that weight vector wstar to calculate portfolio variance, wstar.T @ Sigma @wstar. The composition of these two functions gives us the relationship between mu_p and the minimal variance.