Sie sind auf Seite 1von 1

Solution to Quant Challenge Problem

Assumption:
Returns are normally distributed with mean as sample mean and standard deviation as sample sd.
Approach:
I have to tried to solve the following quadratic programming problem (considering standard
deviation as a measure of risk):
Let
w be vector of weights (w1,w2wn)
be the covariance matrix
be the expected return
o be the targeted return

I have varied targeted returns , found 20 such efficient portfolios. From those, I have reported the
one which has max (expected return/ sd ) ratio
Instructions to execute the code:
Run portfolio.r and give required command line arguments: (i) portfolio_functions. r
(ii)training_log_returns_data.csv (iii)weights_file
Make sure quadprog package is installed
Eg Rscript portfolio.R D:/portfolio_functions.r D:/training_log_return_data.csv D:/weights
Note: Since problem allows for two solutions, I have also attached weights_alternate which have
been retrieved by giving targeted return as (maximum single asset return /4). The code has been
commented in portfolio.r

Das könnte Ihnen auch gefallen