MTH4600 Homework 4 — Portfolio Optimization Via Metropolis

$30.00

Category: Tags: , , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

Ninety-seven stocks from the S&P100 were present in the index over the five
year period 2012 – 2016. The accompanying file S&P50Covariances.txt contains
the covariance matrix V for the 60 monthly returns of 50 of these stocks over
this time period. Use this data to solve the problems below. Your starter code
for this project, Metropolis.cpp, reads in the covariance matrix.
Use the Metropolis algorithm to solve the problems below. These problems
involve finding a minimum variance portfolio subject to certain constraints. (For
problems 1 and 2, there are standard quadratic programming algorithms to solve
the problem. But use Metropolis, it works well.) To implement Metropolis, you
must: (1) specify the state space S; (2) specify the neighbors of each state; (3)
specify the energy E(x) of each state x ∈ S; and (4) tinker with the temperature
parameter T until the algorithm produces good results.
1 (No constraints). Find the minimum variance portfolio when both long
and short positions are allowed for individual stocks. If the total portfolio is
worth $100, find the allocation to each individual stock to the nearest 0.01 dollar (1 penny). Hint: with the right definition of “neighbor” each state will have
50×49 neighboring states. Compare your portfolio to the actual minimum variance portfolio, given by 1
c
· V−1e, and its variance, where e50×1 = (1, 1, . . . , 1)T
and c = e
T V−1e. (Should be close.)
2 (No short positions). Find the minimum variance portfolio when short
positions are not allowed for individual stocks. If the total portfolio is worth
$100, find the allocation to each individual stock to the nearest 0.01 dollar.
Hint: if x is a portfolio with a short position let Var (x) = 1000, then no such
portfolio will be selected as optimal.
3 (‘Simple’ portfolios only). Let us call a $100 portfolio of these 50 stocks
‘simple’ if all the stocks present in the portfolio have equal weight (e.g., 8 stocks
with weight $12.5 each). This is non-standard terminology; don’t use it in an
interview! Since a simple portfolio corresponds to a subset of the 50 stocks,
there are 250 simple portfolios of these stocks. This is a really big number
— 1,125,899,906,842,624 to be precise. Among all the simple portfolios, use
Metropolis (I know of no other way) to find the one that has the least return
variance. As a technical matter, the empty portfolio x∅ with no stocks in it is
a simple portfolio. Return variance makes no sense for this portfolio. (Even
the notion of return makes no sense.) However, we wish to exclude it anyhow
because we want our solution to have at least one stock in it! For the empty
portfolio, just take Var (x∅) = 1000. Hint: with the right definition of “neighbor”
(which is different from problems 1 and 2) each state will have 50 neighboring
states.
4 (Non-ground stable state). A state x is stable if E(y) > E(x) for all
1
2
neighbors y of x. In the context of problem 3, exhibit a stable state x whose
energy E(x) is not minimal, i.e., with E(x) > E0. To do this, run your algorithm
with zero-temperature dynamics and see where it stops improving. Verify that
the resulting state is stable by computing the energy of its 50 neighbors.