# matlab | report | 代做Objective | Python代做 | 代做ios | lab – APS 502 Computational Project Winter 2022

### APS 502 Computational Project Winter 2022

matlab | report | 代做Objective | Python代做 | 代做ios | lab – 这是利用Python进行训练的代写, 对Python的流程进行训练解析, 涵盖了matlab/report/Objective/Python/ios等方面, 该题目是值得借鉴的lab代写的题目

Instructions: This is an individual assignment.For each optimization model below you need to in your report (1) formulate the model by hand (typed is better) with all variables dened and the model Objective and constraints fully written out and (2) print out the mat lab le that contains the data (e.g. through the vectors/matrices) and call tolinprog or quadprogused to compute the model in MATLAB and the output from callinglinprog or quadprogthat shows the optimal values for the variables and objective function values. Do not just dump the MATLAB le, comment it and highlight the optimal values and highlight the important quantities like the optimal variance or optimal cost and make your results easy to see from my point of view. Neat and well organized reports are valued more than sloppy and di cult to read reports!You must use the MATLAB linprog and quadprog functions but you can call the function from Python in which case you must print out your python code. Due April 14 at the START (5:10pm) of class lecture. Late assignments will incur penalty.

Problem 1 Part 1 Formulate a linear programming model and solve using MATLAB to nd the lowest-cost dedicated bond portfolio that covers the stream of liabilities given in the table below (allow cash to be carried forward at the forward rates that are consistent with the spot ratess 1 = 1%; s 2 = 1:5%; s 3 = 2:0%; s 4 = 2:5%; s 5 = 3 :0%; s 6 = 3:5%):

``````Date 1 2 3 4 5 6
Required 500 200 800 400 700 900
``````
``````with the set of bonds below:
``````
``````Bond 1 2 3 4 5 6 Price Rating
1 10 10 10 10 10 110 108 B
2 7 7 7 7 7 107 94 B
3 8 8 8 8 8 108 99 B
4 6 6 6 6 106 92.7 B
5 7 7 7 7 107 96.6 B
6 6 6 6 106 95.9 B
7 5 5 5 105 92.9 A
8 10 10 110 110 A
9 8 8 108 104 A
10 6 6 106 101 A
11 10 110 107 A
12 7 107 102 A
13 100 95.2 A
``````

Part 2 Now consider a version of the problem where at most 50% of the bond portfol ios value (value is in dollars) can be in bonds rated B. Solve this model using MATLAB and compare with optimal bond portfolio from Part 1.

Part 3 Repeat Part 2 but with at most 25% of the bonds portfolio value in bonds rated B. Compare with the optimal portfolios from Part 1 and Part 2. Rank the 3 optimal portfolios according to the cost. Which is portfolio costs the least? Which portfolio costs the most?

Problem 2 PART 1 You will use the following three ETFs (exchange-traded funds) to form a portfolio of these three assets. An ETF operates just like a stock, but these assets represent market indices or broad set of securities (stocks or bonds). For example, the purchase of one share ofSPY(see below for description) represents an investment into the 500 stocks in the S&P 500.

(1)SPDR S&P 500 ETF (SPY), this is a fund that mimics the perfor- mance of the S&P 500 which is a well known market index consisting of 500 large capitalization stocks from the U.S. (2)iShares Core US Treasury Bond (GOVT), this is a fund that mimics the performance of a wide set of U.S Treasury bonds. (3)iShares MSCI Emerging Markets Mini Vol (EEMV), this is fund that mimics the performance of emerging market stocks but with lower volatility compared to other emerging market funds.

Tasks (a) Use yahoo (e.g. yahoo.com or yahoo.ca) nance to get the monthly adjusted closing prices ofSPY, GOVT, andEEMVfromJan 2014 to end of Jan 2022and compute the expected returns of the three assets, the standard deviations of the three assets as well as the co-variances between all assets over this time period. Show and highlight these parameters in your report but you dont have to show the monthly prices or the computations that you did to get the parameters.

(b) Use the mean-variance optimization model to generate an e cient fron- tier of the three assets. Create a table where for each expected return goal R show the optimal weights of the assets as well as the portfolio variance value. Also, plot the e cient frontier. Note: the range of R can be the smallest positive expected return among the three assets to the largest expected return among the assets. You are free to choose the points in the range to use for the optimizations but they should be at least 10 return points equally spaced out.

(c) Take the minimum variance portfolio from (b) (this is the portfolio in the e cient frontier with the lowest variance). Using monthly returns from only Feb 2022 compare the minimum variance portfolio with the equal weighted portfolio

and a portfolio that has 70% inSPY, 20% inGOVT, and 10% inEEMV. Rank the 3 portfolios in terms of returns. Explain the relative performance of the portfolios in terms of risk and return.

Note: A formula sheet will be posted on the blackboard that you can use to get the parameters forPART 1from the monthly adjusted closing prices. To compute a historical monthly return for a particular month use the adjusted closing price of the last trading day of the month and use the adjusted closing price of the last trading day of the previous month. For example, if the adjusted closing price of the last trading day in January 2018 for a stock was \$60 and the adjusted closing price of the last trading day of February 2018 was \$67, the monthly return for February is 11.67 percent [(67/60)-1] * 100.

PART 2 Repeat (b) ofPART 1using the stocksSPY, GOV, EEMVas well as the stocks below (so portfolios will have 8 assets now) that have heavy involvement and connection to development or use of blockchain technology (some people think that these stocks are going to do well in the future)

``````(4) CME Group (CME)