Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need to use Matlab coding for problem 1 with the given data in excel sheet below data 1 is in the excel sheet picture, please

need to use Matlab coding for problem 1
with the given data in excel sheet below
image text in transcribed
data 1 is in the excel sheet picture, please provide the complete codes with explanations (in command/comment)
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
sorry the data is a lot, can you create an excel file, and then you can just merge the excel file with matlab later on,
Pal a) The daily return for a stock is defined by In W. For each of the counters, calculate the daily a k,1-1 returns for k=1,2,3 and 1=2,...,246. i. Estimate the mean daily return R, and the standard deviation of daily return , for each stock. A counter with higher , is said to be riskier. ii. Estimate the variance-covariance matrix E=(@r..) of the counters. = Let R=IR,R,,R,'. The proportions of investment in each of the stocks can be described by the vector w=[w,,W,,w,]'. Here, Osw, s1 and w,+w,+w,=1. Suppose that you are authorized to manage a portfolio comprises these stocks. You want to find w to minimize the risk associated to the portfolio*: w'Ew subject to (OP) w'R=r, where min{R,,R,,R,}srsmax{R,,R,,R,} is a pre-set value; w20. e'w=1; * The risk associated to the portfolio is actually w'w E E F A B C D 1 Adjusted losing prile (RM) for: 2 Date Maybank TopGlove PBBank Es. Save 3 26/11/202 7.43 6.45 3.57 4 27/11/202 7.52 6.39 3.55 5 30/11/202 7.17 6.51 3.32 20... 6 ### 7.43 6.21 3.42 The... 7 7.51 6.11 3.42 8 7.53 6.2 3.55 20... 9 7.44 6.08 3.55 the... 10 7.51 6.03 3.55 11 7.48 6.48 3.52 nal] 12 7.61 6.25 3.79 the... 13 7.61 6.39 3.85 14 8.09 6.31 4.17 15 14/12/202 8.08 5.76 4.06 16 15/12/202 8.03 5.86 4.13 17 16/12/202 8 6.19 4.17 18 17/12/202 8.02 6.13 4.1 19 18/12/202 7.8 6.07 3.93 20 21/12/202 7.82 6.05 3.94 21 22/12/202 7.74 6.12 3.9 22 23/12/202 7.83 6.15 3.93 23 24/12/202 7.78 6.08 3.92 24 28/12/202 7.87 5.87 3.96 25 29/12/202 7.91 5.63 3.95 26 30/12/202 7.9 5.74 3.95 Close 27 31/12/202 5.74 3.93 7.8 atutes might be lost if you save this workbook in the comma-delimited.csv) format. To pre- B E F 5.74 5.15 5.36 5.4 D 3.93 3.91 3.93 les. Save 20... the... 3.88 3.89 3.88 3.87 3.83 7.8 7.7 7.66 7.59 7.63 7.74 7.55 7.37 7.65 7.7 7.6 7.45 7.47 7.46 7.42 7.37 5.44 6.09 6.03 6.26 6.21 5.97 6.02 5.94 4.08 la 20... the... A 27 31/12/202 28 4/1/2021 29 5/1/2021 30 6/1/2021 31 7/1/2021 32 8/1/2021 33 ######## 34 ######## 35 13/1/2021 36 14/1/2021 37 15/1/2021 38 18/1/2021 39 19/1/2021 40 20/1/2021 41 21/1/2021 42 22/1/2021 43 25/1/2021 44 26/1/2021 45 27/1/2021 46 29/1/2021 47 2/2/2021 48 3/2/2021 49 4/2/2021 50 5/2/2021 51 8/2/2021 52 9/2/2021 53 inal] e the... 4.14 4.04 4 3.98 4.06 5.75 5.75 5.64 4.11 5.86 4.13 7.26 7.21 6.11 5.81 5.82 4.06 4.19 4.16 3.99 7.25 7.2. 6.32 6.61 7.24 7.32 7.27 3.91 3.91 7.24 6.39 6.29 6.2 5.88 5.8 5.76 7.22 7.33 7.4 3.89 3.93 3.89 3.95 4.02 ve? Close Data 1 (3) B C C D E F 7.36 5.79 5.78 7.48 5.68 7.5 7.46 7.31 7.4 7.33 7.27 7.27 5.8 5.69 5.67 5.42 4.04 4.01 4.02 3.99 3.92 3.94 3.91 3.89 3.89 the... 7.46 3.97 7.4 7.43 7.45 54 55 15/2/2021 Es. Save 56 16/2/2021 57 17/2/2021 58 18/2/2021 20... 59 19/2/2021 he... 60 22/2/2021 61 23/2/2021 20... 62 24/2/2021 63 25/2/2021 64 26/2/2021 nal] 65 1/3/2021 the... 66 2/3/2021 67 3/3/2021 68 4/3/2021 69 5/3/2021 70 8/3/2021 71 9/3/2021 72 73 74 #1 75 15/3/2021 76 16/3/2021 77 17/3/2021 78 18/3/2021 79 19/3/2021 80 22/3/2021 Close 5.31 4.9 4.97 4.91 4.59 4.45 4.77 4.65 4.92 4.72 4.86 4.99 4.99 4.87 4.85 4.87 5.04 4.93 5.07 5.06 3.96 4 4.02 4.02 4.03 4.15 4.19 7.5 7.56 7.71 7.83 7.83 7.87 7.88 7.74 7.82 7.82 7.7 7.71 7.72 7.68 4.21 4.24 4.26 4.24 4.24 4.22 4.16 4.2 4.15 4.14 Data 1 (3) B C D E F 7.62 4.96 4.1 5.03 ve 5.01 5.06 4.1 4.09 4.11 4.15 4.2 4.12 4.96 4.7 4.44 81 23/3/2021 82 24/3/2021 83 25/3/2021 84 26/3/2021 85 29/3/2021 86 30/3/2021 87 31/3/2021 88 1/4/2021 89 2/4/2021 90 5/4/2021 91 6/4/2021 92 7/4/2021 93 8/4/2021 94 9/4/2021 95 ## 96 13/4/2021 97 14/4/2021 98 15/4/2021 99 16/4/2021 100 19/4/2021 101 20/4/2021 102 21/4/2021 103 22/4/2021 104 23/4/2021 105 26/4/2021 106 27/4/2021 107 28/4/2021 Close 7.59 7.59 7.6 7.72 7.74 7.6 7.6 7.6 7.69 7.66 7.82 7.63 7.64 4.56 4.14 4.16 4.14 4.12 4.14 4.13 4.67 4.6 4.69 4.83 5.31 5.14 5.16 4.99 5.04 5.35 5.48 5.37 4.12 4.13 4.15 4.12 4.15 4.12 4.11 5.31 7.67 7.67 7.66 7.65 7.63 7.63 7.66 7.65 7.63 7.61 7.71 7.61 7.6 Data 1 (3) 4.12 4.1 5.36 5.53 5.63 5.8 5.68 5.57 4.12 4.09 4.11 4.09 4.09 B C D 7.6 5.57 5.55 7.59 5.39 4.09 4.07 4.05 4.04 4.03 5.36 5.23 4.97 5.17 4.02 4.03 4.03 4.03 5.07 5.09 5.26 4.06 5.2 4.18 4.11 A 107 28/4/2021 108 30/4/2021 ave 109 3/5/2021 110 4/5/2021 111 5/5/2021 112 6/5/2021 113 7/5/2021 114 #### 115 ##### 116 ##### 117 17/5/2021 118 18/5/2021 119 19/5/2021 120 20/5/2021 121 21/5/2021 122 24/5/2021 123 25/5/2021 124 27/5/2021 125 28/5/2021 126 31/5/2021 127 1/6/2021 128 2/6/2021 129 3/6/2021 130 4/6/2021 131 8/6/2021 1782 9/6/2021 133 Close 5.25 5.36 +2.11 7.62 7.59 7.57 7.59 7.59 7.59 7.55 7.57 7.65 7.73 7.63 7.62 7.59 7.69 7.68 7.68 7.92 7.91 7.92 7.96 7.92 7.9 7.92 7.92 7.91 Data 1 (3) 4.12 4.07 5.28 5.22 5.17 5.11 5.03 5 5.09 5 5.01 4.92 4.82 4.7 4.76 4.72 4.08 4.09 4.19 4.19 4.13 4.13 4.16 4.16 4.12 4.19 4.12 4,12 A C D E 7.91 4.12 4.72 4.64 4.69 7.91 7.91 7.92 Save 4.13 4.15 4.13 4.66 7.9 4.58 4.13 7.9 4.11 7.92 4.55 4.62 4.59 7.91 7.92 4.57 7.92 133 #### 134 ### 135 14/6/2021 136 15/6/2021 137 16/6/2021 138 17/6/2021 139 18/6/2021 140 21/6/2021 141 22/6/2021 142 23/6/2021 143 24/6/2021 144 25/6/2021 145 28/6/2021 146 29/6/2021 147 30/6/2021 148 1/7/2021 149 2/7/2021 150 5/7/2021 151 6/7/2021 152 7/7/2021 153 8/7/2021 154 9/7/2021 155 156 13/7/2021 157 14/7/2021 158 15/7/2021 159 16/7/2021 7.92 7.91 7.87 7.86 4.43 4.33 4.33 4.21 4.28 4.15 4.05 3.99 3.93 3.92 3.84 3.7 3.8 3.69 3.75 3.74 4.02 3.95 7.84 7.84 7.84 7.86 7.83 7.79 7.76 7.86 7.79 7.79 7.78 7.78 7.78 4.12 4.1 4.12 4.11 4.1 4.11 4.07 4.07 4.03 4.04 4.03 4.04 4.03 4.01 3.98 3.99 4.01 4.01 4 3.98 3.99 + Close Data 1 (3) A B E F 3.95 3.91 sve 4.14 D 3.99 3.97 3.94 3.95 3.95 3.93 3.94 4.08 4.12 4.08 3.98 3.94 159 16/7/2021 160 19/7/2021 161 21/7/2021 162 22/7/2021 163 23/7/2021 164 26/7/2021 165 27/7/2021 166 28/7/2021 167 29/7/2021 168 30/7/2021 169 2/8/2021 170 3/8/2021 171 4/8/2021 172 5/8/2021 173 6/8/2021 174 9/8/2021 175 176 ## 177 13/8/2021 178 16/8/2021 179 17/8/2021 180 18/8/2021 181 19/8/2021 182 20/8/2021 183 23/8/2021 184 24/8/2021 185 25/8/2021 Close 7.78 7.76 7.74 7.77 7.76 7.73 7.73 7.77 7.77 7.74 7.72 7.78 7.74 7.77 7.71 7.73 7.76 3.98 3.95 3.96 3.9 3.8 3.78 3.75 3.66 3.71 3.75 3.77 3.73 3.67 3.75 3.91 3.75 3.78 3.74 3.83 3.9 3.92 3.91 3.9 3.93 3.89 3.89 3.87 3.89 3.89 3.88 3.87 3.86 3.88 3.87 3.84 3.85 3.87 4.03 4.03 7.74 7.78 7.79 7.87 7.87 7.82 7.85 7.9 8.04 8.05 Data 1 (3) B C E D 4.03 8.05 3.9 8.17 3.84 4.08 8.09 8.12 3.89 3.98 4.1 4.1 4.01 8.02 3.9 7.99 4 4.05 8.08 8.05 4.02 4.03 7.99 8.03 4.07 4.03 185 25/8/2021 186 26/8/2021 187 27/8/2021 188 30/8/2021 189 1/9/2021 190 2/9/2021 191 3/9/2021 192 6/9/2021 193 7/9/2021 194 8/9/2021 195 9/9/2021 196 197 13/9/2021 198 14/9/2021 199 15/9/2021 200 17/9/2021 201 20/9/2021 202 21/9/2021 203 22/9/2021 204 23/9/2021 205 24/9/2021 206 27/9/2021 207 28/9/2021 208 29/9/2021 209 30/9/2021 2101 HE 21***** 4.03 4.06 4 7.98 8.01 8.02 8.01 8.01 7.97 8.02 8.05 8.1 8.15 3.84 3.72 3.7 3.65 3.56 3.38 3.41 3.26 3.21 3.18 3.04 2.79 2.66 2.79 2.66 2.73 2.66 2.79 2.74 2.86 2.7 2.65 8.1 4.01 4.06 4.02 4.03 4.04 4.06 4.04 4.08 4.11 4.1 4.07 4.04 4.03 8.1 8.1 8.1 8.05 8.05 8.03 Data 1 (3) ose 211 2.65 4.03 8.03 8.01 212 2.74 4.06 213 2.74 4.06 8.08 8.05 4.08 2.75 2.78 2.81 2.83 2.79 2.79 2.76 4.08 4.11 4.16 4.19 4.19 4.2 4.23 2.76 4.27 214 ## 215 #### 216 ## 217 218 13/10/202 219 14/10/202 220 15/10/202 221 18/10/202 222 20/10/202 223 21/10/202 224 22/10/202 225 25/10/202 226 26/10/202 227 27/10/202 228 28/10/202 229 29/10/202 230 ## 231 232 233 # 234 235 # 236 ## 237 8.05 8.16 8.23 8.29 8.28 8.28 8.31 8.31 8.2 8.15 8.15 8.12 8.13 8.11 8.05 7.99 7.99 4.23 2.86 2.73 2.76 2.76 2.72 2.66 2.59 2.72 2.65 2.58 2.49 2.48 2.4 2.33 4.23 4.24 4.23 4.23 4.2 4.17 4.04 4.04 4.04 4.03 4.04 4.03 4.02 4.02 8 8.01 8.01 7.99 7.99 8 2.3 CO Close 2.3 Data 1 (3) 237 8 2.3 4.02 8.11 2.45 4.02 8.1 2.49 4.01 8.09 2.42 4.02 8.07 2.51 4.05 2.4 238 ### 239 15/11/202 240 16/11/202 241 17/11/202 242 18/11/202 243 19/11/202 244 22/11/202 245 23/11/202 246 24/11/202 247 25/11/202 248 26/11/202 249 8.04 8.08 2.31 8.15 4.05 4.07 4.07 4.07 2.24 2.26 2.27 8.16 8.12 8.11 8.1 4.07 2.25 2.4 4.02 4.02 You may use Matlab, Python or R for this homework. However, built-in functions for optimization should not be used. Attached your code as an appendix to each question. Problem 1 [15 marks) Data 1 contains the closing prices of three stocks listed on Bursa Malaysia. In this problem, you will construct the portfolio of investment that gives the minimum risk for a given targeted return. Let the stock prices of the three counters be represented by P. (Maybank), P, (TopGlove) and P. (Public Bank) for i=1,..., 246. I a) The daily return for a stock is defined by In For each of the counters, calculate the daily Paul P. returns for k=1,2,3 and 1=2,...,246. i. Estimate the mean daily return R and the standard deviation of daily return o, for each stock. A counter with higher , is said to be riskier. ii. Estimate the variance-covariance matrix 2=(8) of the counters. Pal a) The daily return for a stock is defined by In W. For each of the counters, calculate the daily a k,1-1 returns for k=1,2,3 and 1=2,...,246. i. Estimate the mean daily return R, and the standard deviation of daily return , for each stock. A counter with higher , is said to be riskier. ii. Estimate the variance-covariance matrix E=(@r..) of the counters. = Let R=IR,R,,R,'. The proportions of investment in each of the stocks can be described by the vector w=[w,,W,,w,]'. Here, Osw, s1 and w,+w,+w,=1. Suppose that you are authorized to manage a portfolio comprises these stocks. You want to find w to minimize the risk associated to the portfolio*: w'Ew subject to (OP) w'R=r, where min{R,,R,,R,}srsmax{R,,R,,R,} is a pre-set value; w20. e'w=1; * The risk associated to the portfolio is actually w'w E E F A B C D 1 Adjusted losing prile (RM) for: 2 Date Maybank TopGlove PBBank Es. Save 3 26/11/202 7.43 6.45 3.57 4 27/11/202 7.52 6.39 3.55 5 30/11/202 7.17 6.51 3.32 20... 6 ### 7.43 6.21 3.42 The... 7 7.51 6.11 3.42 8 7.53 6.2 3.55 20... 9 7.44 6.08 3.55 the... 10 7.51 6.03 3.55 11 7.48 6.48 3.52 nal] 12 7.61 6.25 3.79 the... 13 7.61 6.39 3.85 14 8.09 6.31 4.17 15 14/12/202 8.08 5.76 4.06 16 15/12/202 8.03 5.86 4.13 17 16/12/202 8 6.19 4.17 18 17/12/202 8.02 6.13 4.1 19 18/12/202 7.8 6.07 3.93 20 21/12/202 7.82 6.05 3.94 21 22/12/202 7.74 6.12 3.9 22 23/12/202 7.83 6.15 3.93 23 24/12/202 7.78 6.08 3.92 24 28/12/202 7.87 5.87 3.96 25 29/12/202 7.91 5.63 3.95 26 30/12/202 7.9 5.74 3.95 Close 27 31/12/202 5.74 3.93 7.8 atutes might be lost if you save this workbook in the comma-delimited.csv) format. To pre- B E F 5.74 5.15 5.36 5.4 D 3.93 3.91 3.93 les. Save 20... the... 3.88 3.89 3.88 3.87 3.83 7.8 7.7 7.66 7.59 7.63 7.74 7.55 7.37 7.65 7.7 7.6 7.45 7.47 7.46 7.42 7.37 5.44 6.09 6.03 6.26 6.21 5.97 6.02 5.94 4.08 la 20... the... A 27 31/12/202 28 4/1/2021 29 5/1/2021 30 6/1/2021 31 7/1/2021 32 8/1/2021 33 ######## 34 ######## 35 13/1/2021 36 14/1/2021 37 15/1/2021 38 18/1/2021 39 19/1/2021 40 20/1/2021 41 21/1/2021 42 22/1/2021 43 25/1/2021 44 26/1/2021 45 27/1/2021 46 29/1/2021 47 2/2/2021 48 3/2/2021 49 4/2/2021 50 5/2/2021 51 8/2/2021 52 9/2/2021 53 inal] e the... 4.14 4.04 4 3.98 4.06 5.75 5.75 5.64 4.11 5.86 4.13 7.26 7.21 6.11 5.81 5.82 4.06 4.19 4.16 3.99 7.25 7.2. 6.32 6.61 7.24 7.32 7.27 3.91 3.91 7.24 6.39 6.29 6.2 5.88 5.8 5.76 7.22 7.33 7.4 3.89 3.93 3.89 3.95 4.02 ve? Close Data 1 (3) B C C D E F 7.36 5.79 5.78 7.48 5.68 7.5 7.46 7.31 7.4 7.33 7.27 7.27 5.8 5.69 5.67 5.42 4.04 4.01 4.02 3.99 3.92 3.94 3.91 3.89 3.89 the... 7.46 3.97 7.4 7.43 7.45 54 55 15/2/2021 Es. Save 56 16/2/2021 57 17/2/2021 58 18/2/2021 20... 59 19/2/2021 he... 60 22/2/2021 61 23/2/2021 20... 62 24/2/2021 63 25/2/2021 64 26/2/2021 nal] 65 1/3/2021 the... 66 2/3/2021 67 3/3/2021 68 4/3/2021 69 5/3/2021 70 8/3/2021 71 9/3/2021 72 73 74 #1 75 15/3/2021 76 16/3/2021 77 17/3/2021 78 18/3/2021 79 19/3/2021 80 22/3/2021 Close 5.31 4.9 4.97 4.91 4.59 4.45 4.77 4.65 4.92 4.72 4.86 4.99 4.99 4.87 4.85 4.87 5.04 4.93 5.07 5.06 3.96 4 4.02 4.02 4.03 4.15 4.19 7.5 7.56 7.71 7.83 7.83 7.87 7.88 7.74 7.82 7.82 7.7 7.71 7.72 7.68 4.21 4.24 4.26 4.24 4.24 4.22 4.16 4.2 4.15 4.14 Data 1 (3) B C D E F 7.62 4.96 4.1 5.03 ve 5.01 5.06 4.1 4.09 4.11 4.15 4.2 4.12 4.96 4.7 4.44 81 23/3/2021 82 24/3/2021 83 25/3/2021 84 26/3/2021 85 29/3/2021 86 30/3/2021 87 31/3/2021 88 1/4/2021 89 2/4/2021 90 5/4/2021 91 6/4/2021 92 7/4/2021 93 8/4/2021 94 9/4/2021 95 ## 96 13/4/2021 97 14/4/2021 98 15/4/2021 99 16/4/2021 100 19/4/2021 101 20/4/2021 102 21/4/2021 103 22/4/2021 104 23/4/2021 105 26/4/2021 106 27/4/2021 107 28/4/2021 Close 7.59 7.59 7.6 7.72 7.74 7.6 7.6 7.6 7.69 7.66 7.82 7.63 7.64 4.56 4.14 4.16 4.14 4.12 4.14 4.13 4.67 4.6 4.69 4.83 5.31 5.14 5.16 4.99 5.04 5.35 5.48 5.37 4.12 4.13 4.15 4.12 4.15 4.12 4.11 5.31 7.67 7.67 7.66 7.65 7.63 7.63 7.66 7.65 7.63 7.61 7.71 7.61 7.6 Data 1 (3) 4.12 4.1 5.36 5.53 5.63 5.8 5.68 5.57 4.12 4.09 4.11 4.09 4.09 B C D 7.6 5.57 5.55 7.59 5.39 4.09 4.07 4.05 4.04 4.03 5.36 5.23 4.97 5.17 4.02 4.03 4.03 4.03 5.07 5.09 5.26 4.06 5.2 4.18 4.11 A 107 28/4/2021 108 30/4/2021 ave 109 3/5/2021 110 4/5/2021 111 5/5/2021 112 6/5/2021 113 7/5/2021 114 #### 115 ##### 116 ##### 117 17/5/2021 118 18/5/2021 119 19/5/2021 120 20/5/2021 121 21/5/2021 122 24/5/2021 123 25/5/2021 124 27/5/2021 125 28/5/2021 126 31/5/2021 127 1/6/2021 128 2/6/2021 129 3/6/2021 130 4/6/2021 131 8/6/2021 1782 9/6/2021 133 Close 5.25 5.36 +2.11 7.62 7.59 7.57 7.59 7.59 7.59 7.55 7.57 7.65 7.73 7.63 7.62 7.59 7.69 7.68 7.68 7.92 7.91 7.92 7.96 7.92 7.9 7.92 7.92 7.91 Data 1 (3) 4.12 4.07 5.28 5.22 5.17 5.11 5.03 5 5.09 5 5.01 4.92 4.82 4.7 4.76 4.72 4.08 4.09 4.19 4.19 4.13 4.13 4.16 4.16 4.12 4.19 4.12 4,12 A C D E 7.91 4.12 4.72 4.64 4.69 7.91 7.91 7.92 Save 4.13 4.15 4.13 4.66 7.9 4.58 4.13 7.9 4.11 7.92 4.55 4.62 4.59 7.91 7.92 4.57 7.92 133 #### 134 ### 135 14/6/2021 136 15/6/2021 137 16/6/2021 138 17/6/2021 139 18/6/2021 140 21/6/2021 141 22/6/2021 142 23/6/2021 143 24/6/2021 144 25/6/2021 145 28/6/2021 146 29/6/2021 147 30/6/2021 148 1/7/2021 149 2/7/2021 150 5/7/2021 151 6/7/2021 152 7/7/2021 153 8/7/2021 154 9/7/2021 155 156 13/7/2021 157 14/7/2021 158 15/7/2021 159 16/7/2021 7.92 7.91 7.87 7.86 4.43 4.33 4.33 4.21 4.28 4.15 4.05 3.99 3.93 3.92 3.84 3.7 3.8 3.69 3.75 3.74 4.02 3.95 7.84 7.84 7.84 7.86 7.83 7.79 7.76 7.86 7.79 7.79 7.78 7.78 7.78 4.12 4.1 4.12 4.11 4.1 4.11 4.07 4.07 4.03 4.04 4.03 4.04 4.03 4.01 3.98 3.99 4.01 4.01 4 3.98 3.99 + Close Data 1 (3) A B E F 3.95 3.91 sve 4.14 D 3.99 3.97 3.94 3.95 3.95 3.93 3.94 4.08 4.12 4.08 3.98 3.94 159 16/7/2021 160 19/7/2021 161 21/7/2021 162 22/7/2021 163 23/7/2021 164 26/7/2021 165 27/7/2021 166 28/7/2021 167 29/7/2021 168 30/7/2021 169 2/8/2021 170 3/8/2021 171 4/8/2021 172 5/8/2021 173 6/8/2021 174 9/8/2021 175 176 ## 177 13/8/2021 178 16/8/2021 179 17/8/2021 180 18/8/2021 181 19/8/2021 182 20/8/2021 183 23/8/2021 184 24/8/2021 185 25/8/2021 Close 7.78 7.76 7.74 7.77 7.76 7.73 7.73 7.77 7.77 7.74 7.72 7.78 7.74 7.77 7.71 7.73 7.76 3.98 3.95 3.96 3.9 3.8 3.78 3.75 3.66 3.71 3.75 3.77 3.73 3.67 3.75 3.91 3.75 3.78 3.74 3.83 3.9 3.92 3.91 3.9 3.93 3.89 3.89 3.87 3.89 3.89 3.88 3.87 3.86 3.88 3.87 3.84 3.85 3.87 4.03 4.03 7.74 7.78 7.79 7.87 7.87 7.82 7.85 7.9 8.04 8.05 Data 1 (3) B C E D 4.03 8.05 3.9 8.17 3.84 4.08 8.09 8.12 3.89 3.98 4.1 4.1 4.01 8.02 3.9 7.99 4 4.05 8.08 8.05 4.02 4.03 7.99 8.03 4.07 4.03 185 25/8/2021 186 26/8/2021 187 27/8/2021 188 30/8/2021 189 1/9/2021 190 2/9/2021 191 3/9/2021 192 6/9/2021 193 7/9/2021 194 8/9/2021 195 9/9/2021 196 197 13/9/2021 198 14/9/2021 199 15/9/2021 200 17/9/2021 201 20/9/2021 202 21/9/2021 203 22/9/2021 204 23/9/2021 205 24/9/2021 206 27/9/2021 207 28/9/2021 208 29/9/2021 209 30/9/2021 2101 HE 21***** 4.03 4.06 4 7.98 8.01 8.02 8.01 8.01 7.97 8.02 8.05 8.1 8.15 3.84 3.72 3.7 3.65 3.56 3.38 3.41 3.26 3.21 3.18 3.04 2.79 2.66 2.79 2.66 2.73 2.66 2.79 2.74 2.86 2.7 2.65 8.1 4.01 4.06 4.02 4.03 4.04 4.06 4.04 4.08 4.11 4.1 4.07 4.04 4.03 8.1 8.1 8.1 8.05 8.05 8.03 Data 1 (3) ose 211 2.65 4.03 8.03 8.01 212 2.74 4.06 213 2.74 4.06 8.08 8.05 4.08 2.75 2.78 2.81 2.83 2.79 2.79 2.76 4.08 4.11 4.16 4.19 4.19 4.2 4.23 2.76 4.27 214 ## 215 #### 216 ## 217 218 13/10/202 219 14/10/202 220 15/10/202 221 18/10/202 222 20/10/202 223 21/10/202 224 22/10/202 225 25/10/202 226 26/10/202 227 27/10/202 228 28/10/202 229 29/10/202 230 ## 231 232 233 # 234 235 # 236 ## 237 8.05 8.16 8.23 8.29 8.28 8.28 8.31 8.31 8.2 8.15 8.15 8.12 8.13 8.11 8.05 7.99 7.99 4.23 2.86 2.73 2.76 2.76 2.72 2.66 2.59 2.72 2.65 2.58 2.49 2.48 2.4 2.33 4.23 4.24 4.23 4.23 4.2 4.17 4.04 4.04 4.04 4.03 4.04 4.03 4.02 4.02 8 8.01 8.01 7.99 7.99 8 2.3 CO Close 2.3 Data 1 (3) 237 8 2.3 4.02 8.11 2.45 4.02 8.1 2.49 4.01 8.09 2.42 4.02 8.07 2.51 4.05 2.4 238 ### 239 15/11/202 240 16/11/202 241 17/11/202 242 18/11/202 243 19/11/202 244 22/11/202 245 23/11/202 246 24/11/202 247 25/11/202 248 26/11/202 249 8.04 8.08 2.31 8.15 4.05 4.07 4.07 4.07 2.24 2.26 2.27 8.16 8.12 8.11 8.1 4.07 2.25 2.4 4.02 4.02 You may use Matlab, Python or R for this homework. However, built-in functions for optimization should not be used. Attached your code as an appendix to each question. Problem 1 [15 marks) Data 1 contains the closing prices of three stocks listed on Bursa Malaysia. In this problem, you will construct the portfolio of investment that gives the minimum risk for a given targeted return. Let the stock prices of the three counters be represented by P. (Maybank), P, (TopGlove) and P. (Public Bank) for i=1,..., 246. I a) The daily return for a stock is defined by In For each of the counters, calculate the daily Paul P. returns for k=1,2,3 and 1=2,...,246. i. Estimate the mean daily return R and the standard deviation of daily return o, for each stock. A counter with higher , is said to be riskier. ii. Estimate the variance-covariance matrix 2=(8) of the counters

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Analysis With Microsoft Excel

Authors: Timothy R. Mayes

9th Edition

0357442059, 9780357442050

More Books

Students also viewed these Finance questions

Question

=+c) What are the RRRs? Based on the RRRs, what action is best?

Answered: 1 week ago

Question

Does it avoid typos and grammatical errors?

Answered: 1 week ago