Presentation is loading. Please wait.

Presentation is loading. Please wait.

Calculating and Plotting MSE

Similar presentations


Presentation on theme: "Calculating and Plotting MSE"— Presentation transcript:

1 Calculating and Plotting MSE
Angela Ryu Economics 201FS Honors Junior Workshop: Finance Duke University March 24, 2010

2 Example XOM (Y) vs. WMT (X) Number of days: 1093 days
Sampling interval: 5 minutes Beta Calculation days: 30 days

3 Preparation (1) - Setup Get WMT, XOM log returns and denote Px, Py respectively. Sample P by 5 minutes: 76 data for each day Take out the overnight returns Size (Px) = Size (Py) = 76 * 1093

4 Preparation (2) – Calculate Beta
Days – (1:30), (2:31), (3:32), … , (1064:1093) Case (1:30): Take first 76 * 30 data (1 to 76*30) from Px and Py and denote X1:30 and Y1:30 . Calculate with (where Y = βX) Take the mean and denote β1:30 Case (2:31): Exclude the day 1 data (1 to 76) and add data on the day 31 (76*30+1 to 76*31). Get β2:31 Repeat to get β3:32, …, β1063:1092 Note: all betas are scalar

5 Preparation (2) – Calculate Beta
Case (1:30): Case (2:31): Day 1 (76 data) Day 2 (76 data) Day 30 (76 data) Day 31 (76 data) Day 1092 (76 data) Day 1093 (76 data) Day 1 (76 data) Day 2 (76 data) Day 30 (76 data) Day 31 (76 data) Day 1092 (76 data) Day 1093 (76 data)

6 Preparation (3) – Calculate MSE
Calculate SE for each beta. SE31 = (Y31 - β1:30 * X31 )2 SE32 = (Y32 – β2:31 * X32 )2 SE1093= (Y1093 – β1063:1092 * X1093 )2 Note: SEi is a vector of size 76 for all i = 31, … 1093 Take the average to get MSE30 MSE30 = avg [avg(SE1:30 ), …, avg(SE1064:1093)] ()2  Square each term in vector

7 Preparation (4) – change intervals & plot for each sampling interval
Sampling intervals: change from 1 min to 20 mins in prep. (1) Beta Calculation intervals: change from 1 day to 50 days in prep (2) Plot for each sampling interval X axis: Beta Cal. Interval days (from 1 to 50) Y axis: the value of MSE In total, we get 20 plots

8 WMT(Y) vs. XOM(X) (5 min)


Download ppt "Calculating and Plotting MSE"

Similar presentations


Ads by Google