Example 2

From ECLR
Revision as of 14:05, 28 September 2012 by 130.88.57.243 (talk) (Created page with "= Task = In this exercise you will have to download some share prices and then use these data to calculate summary statistics for every year in the sample. We will then compa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Task

In this exercise you will have to download some share prices and then use these data to calculate summary statistics for every year in the sample. We will then compare these statistics and see how they change through time.

The data you should download is the share prices of two companies, Glaxo Smith Kline (GSK) and Apple (AAPL). You can get these data from Yahoo Finance. Enter the Ticker symbols into the search box and after clicking enter go to the historical prices link. You should download daily data and then use the "Adjusted Close Prices". The sample period we use is from 2 January 1987 to 30 December 2011.

These are your tasks:

This is how MATLAB looks on my machine although it may be arranged slightly differently on yours. However the 4 main elements A to D will always be there and I will briefly explain them

C = [5 4; 3 2]; % Create 2x2 matrix
dc = det(C);    % Calculate determinant
disp(dc);       % Display value of dc