Reference no: EM132238154
Problem 1: Covariance Matrix Decomposition:
Download historical data from yahoo for 5 years and at least 100 companies or ETFs. In this problem we will look at the covariance matrix for these assets and its properties.
1. Clean the data so that your input pricing matrix is as full as possible. Fill in any gaps using a reasonable method of your choice.
2. Generate a sequence of daily returns for each underlying asset for each date.
3. Calculate the covariance matrix of daily returns and perform an eigenvalue decom- position on the matrix. How many positive eigenvalues are there? How many were negative? We know from theory that there should be no negative eigenvalues. If any are negative, what happened?
4. How many eigenvalues are required to account for 50% of the variance? How about 90%? Does this make sense to you?
Problem 2: Portfolio Construction: In Lecture 6, we defined a Lagrangian for portfolio with constraints by
L(ω, λ) = (R, ω) - a (ω, Cω) - ΣKk=1 λk((g→k, ω) - ck) (1)
We can rewrite it in matrix form by defining tt to be the matrix whose rows are the vectors g→k: ?g→1 is the first row of G, →g2 is the second, and so on. Also, let λ = (λ1, . . . , λK) be the vector of Lagrange multipliers, and c = (c1, . . . , cK) the vector of constraint values.
Then we can rewrite (1) in matrix form:
L(ω, λ) = (R, ω) - a (w, Cω) - (λ, Gω = c) (2)
1. Calculate the gradients ∇wL and ∇λL. (Hint: (λ, Gω) = (GTλ, ω>).
2. Use ∇ωL = 0 to solve for w in terms of λ and substitute the result into the equation ∇λL = 0. This gives equation for λ, which for me came out to be
GC-1GTλ = GC-1R-2ac
where C is the covariance matrix and c is the vector of constraint values. Please don't confuse them.
3. Form the matrix tt by imposing the budget constraint, which is (1, w) = 1, and another constraint that allocates 10% of the portfolio to the first 17 securities (to simulate a sector allocation). Using C from Problem 1, use your favorite method and the software package of your choice to invert GC-1GT in a nice, stable way. (Hint: consider my favorite method).
4. What does the resulting portfolio look like? Would it be acceptable to most mutual funds? If not, what would you to do to fix that?