%% Task 8.0 clear all close all load hf %% Task 8.1 plot(IBMprice) title('IBM Price on March 26, 2007'); xlabel('Trade'); ylabel('Price'); %% Task 8.2 figure; subplot(2,1,1) plot(IBMprice); title('IBM Price on March 26, 2007'); xlabel('Trade') ylabel('Price'); subplot(2,1,2) plot(MSFTprice) title('IBM Price on March 26, 2007') xlabel('Trade'); ylabel('Price'); %% Task 8.3 figure; plot(IBMdate,IBMprice) axis tight datetick('x','keeplimits') title('IBM Price on March 26, 2007'); xlabel('Time'); ylabel('Price'); %% Task 8.4 logMSFTprice=log(MSFTprice); T=size(MSFTprice,1); MSFTreturn=logMSFTprice(2:T)-logMSFTprice(1:T-1); figure; hist(MSFTreturn) title('MSFT returns on March 26, 2007') ylabel('Count') xlabel('Return') figure; hist(MSFTreturn,200) title('MSFT returns on March 26, 2007') ylabel('Count') xlabel('Return')