FIN285a: Problem Set 5 - Brandeis University
FIN285a: Problem Set 5
Fall 2004
Due Wednesday, October 27th
1. For this problem I would like you to load the dow.dat data set using the loaddow.m matlab program. Then use arithmetic returns along with a portfolio with a starting value of 100 in the following problems.
1. Plot the VaR for all confidence levels from 99 through 90 incrementing by 1. Do this for both the historical data, and for a normal distribution with mean and std set equal to the data. Use "hold on" to put your plot lines on the same graph. If you want to get fancy try a different color or different styled line with a legend. The second case will require a monte-carlo analysis since you probably can't find tables with values from 99 to 90. Do this with a single draw of 1,000,000 normal returns with mean and std equal to the Dow sample.
Program:
%h5_1
load dow.dat
% dow: 28095 by 3 matrix, with Matlab date in first column, DJ index level in
% second and volume in third column
% p: Second column from the dow
p = dow(:,2);
% ret1: arithmetic returns based on DJ level
% pdate: Corresponding datea of the DJ index level
ret1 = (p(2:end)-p(1:end-1))./p(1:end-1);
pdate = dow(:,1)/365.25;
ret1(5257) = 0;
x = 100; % starting value of the portfolio
one_day = x*(1+ret1); %portfolio value after one day, given returns in ret1
cl = 0.1:-0.01:0.01; % significance levels
m = mean(ret1)
varret = var(ret1)
ret1_sim = normal(1000000,m,varret); % simulated returns
one_day_sim = x*(1+ret1_sim);
for i = 1:length(cl)
hist_var(i) = x-percentile(one_day,cl(i)); % historical var
norm_var(i) = x - percentile(one_day_sim,cl(i));
end
plot(90:99,hist_var,'*-')
hold on
plot(90:99,norm_var,'-')
title('Series of one-day Historical and normal VaR, 90:99% confidence level')
xlabel('confidence level, in %')
ylabel('VaR')
legend('historical VaR', 'normal VaR')
grid on
Results:
m = 2.6099e-004
varret = 1.1460e-004
[pic]
2. Repeat this figure for the ETL.
Program:
%h5_1
load dow.dat
% dow: 28095 by 3 matrix, with Matlab date in first column, DJ index level in
% second and volume in third column
% p: Second column from the dow
p = dow(:,2);
% ret1: arithmetic returns based on DJ level
% pdate: Corresponding datea of the DJ index level
ret1 = (p(2:end)-p(1:end-1))./p(1:end-1);
pdate = dow(:,1)/365.25;
ret1(5257) = 0;
x = 100; % starting value of the portfolio
one_day = x*(1+ret1); %portfolio value after one day, given returns in ret1
cl = 0.1:-0.01:0.01; % significance levels
m = mean(ret1)
varret = var(ret1)
ret1_sim = normal(1000000,m,varret); % simulated returns
one_day_sim = x*(1+ret1_sim);
for i = 1:length(cl)
val(i) = percentile(one_day,cl(i)); % value of cl percentile
hist_etl(i) = x-mean(one_day(one_day ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- example 1 how does upcoming 2006 saturn neptune
- fin285a problem set 5 brandeis university
- time value of money
- the value line dow jones stock evaluation model is it useful
- some physics background for the science of music
- description on how to download futures market data from ino
- mathematical methods unit 3
Related searches
- problem set 7
- 5 why problem solving form
- x 5 in set notation
- 5 5 inch 5 56 barrel
- lesson 5 problem solving practice
- set up or set up
- 5 step problem solving model
- 5 step problem solving template
- 5 step problem solving forms
- 5 step problem solving method
- 5 stages of problem solving
- 5 why problem solving worksheet