Matlab - variance are changing with time. For example, in...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Matlab Homework Two 1. Importing financial data into Matlab: (a) Importing data on “12_Industry_Portfolios” from January 1980 to July 2011 data=dlmread('12_Industry_Portfolios.txt','',[654 1 1032 12]) (b) Creating matrix R containing following 6 industries: ‘Durbl’, ‘Enrgy’, ‘BusEq’, ‘Utils’, ‘Hlth’, ‘Money’ R=data(:,[2,4,6,8,10,11]) (c) Converting returns from percentages to decimals X=R/100 R=X (d) Creating dates and names dates=dlmread('12_Industry_Portfolios.txt','',[654 0 1032 0]) names={'Durbl', 'Enrgy', 'BusEq', 'Utils', 'Hlth', 'Money'} 2. Descriptive statistics (a) Plotting time series of each industry portfolio returns >> plot(R(:,1)) >> plot(R(:,2)) >> plot(R(:,3)) >> plot(R(:,4)) >> plot(R(:,5)) >> plot(R(:,6)) Durables
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Energy Business Equipment Utilities
Background image of page 2
Healthcare Finance (b) Based on the graphs, the risk is not constant over time. This is because the mean and
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: variance are changing with time. For example, in the plot of Durables, the returns fluctuated a lot in the end. (c) Mean, Standard Deviation, Skewness, Kurtosis (d) Histogram of each of the industry portfolio returns >> hist(R(:,1)) >> hist(R(:,2)) >> hist(R(:,3)) >> hist(R(:,4)) >> hist(R(:,5)) >> hist(R(:,6)) Durables Energy Business Equipment Utilities Healthcare Finance (e) Based on the histograms of returns and the fact that kurtoses are different from 3 and skewnesses are different from 0, we can reach a conclusion that returns are not normally distributed. (f) Variance, Covariance and Correlation (g) According to the correlation of matrix R, Durables and Finance are most correlated, whose correlation is 0.7360; Business Equipment and Utilities are least correlated, whose correlation is 0.2377....
View Full Document

Page1 / 7

Matlab - variance are changing with time. For example, in...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online