Implement the index tracking portfolio

Assignment Help Python Programming
Reference no: EM132833986

Problem 1: Practice with CVX

(a) Suppose we have the following optimization problem:

maximize Σmi=1 -wilog wi
subject to w ≥ 0, Σmi=1 wi = 1, XTw = b

where w ∈ Rm, X ∈ Rmxn and b ∈ Rn. Given that m = 20 and n = 10, we can generate the data for X and b as follows:

m <-20
n <- 10
set . seed (22)
X matrix (rnorm(m*n) ,m, n)
b <- t (X) %*% as. vector ( rep (1 /m, m)) + rnorm(n, 0, 0.005)

Solve this problem, show the code and optimal value of w*.

(b) Solve the following optimization problem

minimizex∈Rm,y∈Rm Σmi=1 yi

subject to x1 = 0, xm, = 1, y1 = 1, ym = 1,
(xi+i - xi)2 + 2(yi+1 - yi)2 ≤ 0.022, i = 1,.....,m - 1

Set m = 101, plot the curve of (x, y), which consists of a series of points (x1, y1), ,(x101, y101).

Problem 2: Portfolio optimization

In this problem, we aim at designing portfolios among following assets:

StocksArray = c('MSFT',' AAPL',' AMZN',' GOOGL',' JNJ',' JPM', 'UNH',' MA',' HD',' INTC','VZ',' K0',' BAC',' X0M',' MRK',' DIS', 'PEP',' CMCSA',' CV X',' ADBE',' CSCO',' NVDA','WMT',' NFLX', 'WFC',' MCD',' ABT',' BMY',' COST' BA',' C',' PM',' NEE',' MDT', 'AMGN','TM0',' LLY',' HON',' ACN',' IBM')

The period we consider is from 01-01-2010 to 31-12-2020. We will use the R package 'portfolioBacktest'. Please check the vignette before answering the questions.

(a) Prepare your data set for backtest. In R, you should create a specified list, resample it into 50 different sub-lists, each of which contains 20 stocks and 252 x 2 days' prices. Hint: use the function 'stockDataDownload' to get the data, then use 'financialDataResample' to resample the data set. (N_sample = 20,T-sample = 252 . 2, num_datasets = 25.)

data <- stockDataDownload ( stock _symbols = StocksArray )

(b) Implement Markowitz portfolio with max position constraint:

minimizew -wTμ + λwTΣw
subject to ||w|| ≤ μ, 1Tw = 1, w ≥ 0,

where μ and Σ can be estimated by sample mean and sample covariance matrix. Set λ = 2 and u = 0.04. Do the backtest, show the performance table and compare it with standard Markowitz portfolio (without max position constraint).

(c) Consider a portfolio formualted as

minimizewTw - ∈||W||
subject to w ≥ 0, 1Tw = 1,

where μ can be estimated by sample means. Try to determine the value of ∈, do the backtest, then show the performance table.

(d) Instead of using sample meanµ and sample covariance matrix Σ to construct the portfolio, here we would use

Σ = ρ1Σ + (1 - ρ1) trace(Σ)IN/N

μ = ρ2μ + (1 - ρ2)1.TNμ/N.1N

where N is the number of asset and IN is the identity matrix of order N. Use all possible pairs for ρ1 and ρ2 in {0, 0.25, 0.5, 0.75, 1), do the backtest for the mean-variance portfolio

minimize -wTμ, + λwTΣw

subject to w ≥ 0, 1Tw = 1,

under all possible combination of ρ1 and ρ2, ( λ= 0.01), show the performance table and tell which pair of (ρ1, ρ2) gives the best Sharpe Ratio performance.

(e) Implement the index tracking portfolio by simply regressing the dense index

minimize 1/T||rb - Xb||22

subject to 1Tb = 1, b ≥ 0.

Do the backtest and show the performance table. (Check the slide for the notations in this sub-problem.)

Problem 3: Gradient descent

Consider an unconstrained optimization problem:

minimize f(x) = ex1+3x2-0.1 + ex1 -3x2 -0.1 + e-x1 -0.1

Design a gradient descent method for solving it. You should clearly define the starting point, step size, and stopping criteria. Check whether your results converge to the optimal using CVX.

Reference no: EM132833986

Questions Cloud

Explain the direct stakeholders of a company : Paula, the CEO of a small consulting firm, told her subordinates that the company is only interested in making money for the shareholders since
Which terms is defined as the volatility of an investment : Costs 9.95 dollars per stock trade. How much money do you need to buy 100 shares of Ralph Lauren (RL), which trades at 85.13 dollars?
What is the expectation for company to hire mba : What is the expectation for company to hire bachelor degree computer science graduate in real life?
Difference between living by faith and living by sight : What is the difference between living by faith and living by sight? How an employee can live by faith instead of sight on a daily basis.
Implement the index tracking portfolio : Implement the index tracking portfolio by simply regressing the dense index and Design a gradient descent method for solving it.
When will the changes take place : Who will be impacted in the organization? For those impacted, how will their positions change? What will the specific changes be? When will the changes take.
What is the composition of the dow jones industrial average : As residual claimants, which investors claim any cash flows to the firm that remain after the firm pays all other claims? Bondholders.
How has the company used horizontal mergers : Merger and acquisition strategies typically set sights on achieving any of five objectives:
What is the price paid to the bondholder : Call premium of one year of coupon payments. Assuming a par value of 1,000 dollars, what is the price paid to the bondholder, if the issuer calls the bond?

Reviews

len2833986

3/20/2021 12:54:26 AM

I need help on the questions. Need speedy delivery with accurate and clear solution. Please read the questions clearly.

Write a Review

Python Programming Questions & Answers

  The command line argument implement in python

The StackMachine class should have eight member functions: push, pop, add, sub, mul, div, mod and the constructor.

  Write pseudo code - biorythm 1

Two programs biorythm 1 and BIORYTHM 2 with cos and sin, you only need to write throry section which is written in the word file table

  In this assignment you will write a program that does

in this assignment you will write a program that does simple packet routing. your program will take three command-line

  Write a function that returns the sum of two largest values

Write a function, median(a), that returns a value, x, such that at least half the elements in a are less than or equal to x and at least half the elements.

  Write a program to check if a number is a prime number

Write a program that will take users input and evaluate whether the number entered is a zero,negative or positive. A program to check if a number is a prime no.

  Assignment - Network Traffic Analysis Tools Analysis

Assignment - Network Traffic Analysis Tools Analysis using Python Analysis using ML Approaches. Explore the dataset, and then analyze the dataset

  Write a program that asks the user for a letter

Write a program that asks the user for a letter - This function will take as input the original letter input by the user so that it can be included in the output sentence.

  Practical laboratory exercises to automate business process

ITECH1100 Understanding the Digital Revolution - Story Resurrection - you will use skills acquired through practical laboratory exercises

  User to do basic trigonometry functions

Create a program that allows the user to do basic trigonometry functions. First, ask the user if he or she would like to do sine, cosine, or tangent (sin, cos, tan).

  Write a python program that asks user to enter an integer

Write a Python program that asks the user to enter an integer (X), then: Determines if X is odd or even, Computes and prints the factors of that integer X.

  Write the program that reads from a text file

Write the program that reads from a text file. Read each line and send it to the output file, preceded by line numbers. Whose fleece was white as snow.

  Design and develop a prototype product

Design and develop a prototype product that uses Internet of Things technologies for environmental monitoring. Generally, IoT products collect data observed

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd