Instructions
The homework should be typed as a Jupyter notebook interspersing explanations in Markdown text with Python Code . Your solution file must be named in the following way:
last name-first name-Final.ipynb .
For example, the professor’s homework would be named collado ricardo-Final.ipynb . Each problem and its subparts must be answered explicitly and clearly identified. No credit will be given for answers that are not explicitly stated (use numbers to make your answers easy to identify and read). Make use of Jupyter Notebook’s typesetting Markdown facilities to add text cells in which you could add math formulae, symbols, and good formatting. See the tab named “Jupyter” in the “Modules” section for tutorials on how to install and use Jupyter and Markdown for typesetting. The single solution file must be handled trough the homework link in the class Canvas page.
Answers will be evaluated for correctness and style. State complete answers showing your analysis. No partial points will be given for incorrect answers that do not show development and analysis.
Feel free to brainstorm and discuss the problems with your peers but the work in your homework has to be done individually. Copying another student work or colluding to prepare the home- work will carry a grade of F.
The tasks in this part refer to the parametric portfolio model discussed in Lectures 8.1 and 9.2 (see Lecture-8 1.pdf and Lecture-9 1.pdf included in Materials folder). Folder StockPrices contains daily closing prices of 15 different stocks for years 2012 and 2013. Each stock price history appears in a CSV file named by its corresponding ticker code and numbered in the order that you should use it in your programs. For example, the daily closing prices of Coca-Cola Company appears in the file 12-KO.csv. Refer to Lecture-8 1.pdf to get the technical details on how to perform the following tasks. File useful links.txt contains a list of useful links that explain many of the necessary techniques used in the homework. Some of the most useful Python Packages to perform this homework are: Pandas, Numpy,
Scipy, Statsmodles, and ScikitLearn.
(25 points) Do the following:
R = Pt − Pt−1 ,
Pt−1
where Rt and Pt are the return and price, respectively, at day t.
Hint: Use Scipy or Statsmodels to do the fitting and goodness of fit test. The text file useful links.txt included in the final project materials package has many links to examples on how to do this (including drawing the graphs).
$100,000, for every asset i ∈ {1, 2, . . . , 15}.
(50 points) Given weights w, total wealth W , normal models, and covariance matrix (as obtained in Task 1), do the following:
Test the function on the even position p0.
for assets 1 to 7 for assets 8 to 14
a = (¸−10,000 , .x.s. , −10,000˛ , ¸5,000, .x.s. , 5,000˛ , 35,000).
for assets 1 to 7 for assets 8 to 14
a = (¸−10,000 , .x.s. , −10,000˛ , ¸5,000, .x.s. , 5,000˛ , 35,000).
σ2
d∗ = −W βi ,
i 2
i
for a given asset i. Test the function on the even position p0.
CVaRi = VaRβiwi,
for a given asset i. Test the function on the even position p0.
Do the following:
max ,|βi − βj| i, j ∈ {1, . . . , 15} , < 0.001,
i.e. the maximum absolute difference of any pair of β’s is less than 0.001. Test the function on the even position p0.