Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3. (20 Points) Given the Covariance for two assets considered is Covariance= [[0.0625 0.0075] [0.0075 0.0225]] Write code to find the weights of the

Problem 3. (20 Points) Given the Covariance for two assets considered is Covariance= [[0.0625 0.0075]

[0.0075 0.0225]]

Write code to find the weights of the assets that minimize portfolio variance. Specifically follow the steps below using Python:

  1. Change the weights of the first asset from 0 to 100% with increments of 5%, adjusting the weights of the second asset accordingly, then calculate the variance of the portfolios given the weights. Save these portfolio weights in an array
  2. Through programming, identify which set of the portfolio weights which give the lowest portfolio variance. Make sure you print out both the corresponding weights and the associated minimum portfolio variance (hint: you could use the function np.argmin to identify the index of the minimum portfolio variance)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions