Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

QF5208 - Project 1

● The project is due on 20 March 2022.  Submit your report in PDF format to the submission folder on LumiNUS.

● Choose Project 1a or Project 1b. Only one of the two projects (1a, 1b) is required.

● This is an individual project. Each student needs to work on his/her own and write a report.

● The report should include the method and details of the numerical result. Attach the computer programme after the report.

Project 1a

Download the dataset (“stockprices(2021).csv”) from LumiNUS. The dataset consists of the daily closing prices of 503 stocks of S&P for the year 2021. Each column is for one stock.

(a)  Consider a portfolio consisting of the stocks in the rst 30 columns (Dow Jones). Use the principal component analysis to construct the eigen-portfolios. Plot the eigen-portfolios corresponding to the rst 10 principle components.

(b) Let p denote the daily percentage change of the stock price p = , where Si  is the stock price in the i-th day. Define the annual return r and volatility σ

as

where mean(p) and std(p) are the mean and the standard deviation of p, re- spectively.

Use the K-means model to separate the 503 stocks into K clusters using r and σ as the variables, where K = 6, 8, 10.  Show the results on the plane with the

annual return and volatility being the two coordinate axis.

For each value of K, compute the in-cluster variance:

K

σK(2)  = σi(2) ,

i=1

where σi(2)  is the variance of the data in the i-th cluster.

Project 1b

Consider the following MDP that was discussed in the lecture:

Use the value iteration method or the policy iteration method to nd the optimal trading strategy, where the discounting factor γ = 0.9. What are the optimal value functions v* (s) and q* (s, a)?

Present the details of the algorithm and the numerical results (e.g. the initial value function, the number of iterations, etc).