Code For Only FTSE and Rolling Window Case Study Help

Code For Only FTSE and Rolling Window Case Solution

%%%%%%%%%%%%% making all variables equal to IVI360:

%%FTSE 100

f = xlsread('data64.xlsx','C3:C94')./ 100;

%values of All Parameters are no equal to the daily data so we are

[~,datenums] = xlsread('data64.xlsx',2,'A7:A1918');

[~,datemonth] = datevec(datenums);

element = size(datenums,1);

f100 = NaN(element,1);

gin= 1;

for t = 1:element

if t > 1 && datemonth(t) ~= datemonth(t-1)

gin=gin+1;

if gin> length(f)

break

end

end

f100(t)=f(gin);

end

fprintf('Table For Ftse Only\n')

[estParams,EstParamCov,Variance,LongRunVar] = GarchMidas(subsample1,'Period',period,'NumLags',16,'X',f100,'ThetaM',1);

subplot(2,1,1);

plot(year(seq),sqrt(252*Variance(seq)),'g','LineWidth',1);

hold on

plot(year(seq),sqrt(252*LongRunVar(seq)),'b--','LineWidth',2);

legend('TV','SV','Location','SouthEast')

xlim([2000,2007])

ylim([0,b])

title('Ftse W.P')

hold off

fprintf('Table For Ftse with rolling window\n')

[estParams,EstParamCov,Variance,LongRunVar] = GarchMidas(subsample1,'Period',period,'NumLags',16,'X',f100,'ThetaM',1,'RollWindow',1);

subplot(2,1,2);

plot(year(seq),sqrt(252*Variance(seq)),'g','LineWidth',1);

hold on

plot(year(seq),sqrt(252*LongRunVar(seq)),'b--','LineWidth',2);

legend('TV','SV','Location','SouthEast')

xlim([2000,2007])

ylim([0,b])

title('Ftse W.P with rolling window')

hold off

fprintf ('\nTable for Garch Midas With Ftse in sample\n');

% In-sample forecast validation

GarchMidas(subsample1,'Period',period,'NumLags',numLags,'estSample',1900);

fprintf ('\nTable for Garch Midas with Ftse out of sample\n');

% Out-of-sample forecast

estParams = GarchMidas(subsample1,'Period',period,'NumLags',numLags);

nForecast = 10;

yBig = [subsample1;0];

for t = 1:nForecast

[~,~,Variance,LongRunVar] = GarchMidas(yBig,'Period',period,'NumLags',numLags,'Params',estParams);

yPseudo = estParams(1) + sqrt(Variance(end));

yBig = [yBig(1:end-1);yPseudo;0];

end

VarianceForecast = Variance(element+1:element+nForecast);

LongRunVarForecast = LongRunVar(element+1:element+nForecast);

rolling window

rolling window

 

Tables:

Table For Ftse Only

Method: Maximum likelihood

Sample size: 1912

Adjusted sample size: 1496

Logarithmic  likelihood:      2866.62

Akaike   info criterion:     -5721.24

Bayesian info criterion:     -5687.91

Coeff        StdErr        tStat       Prob

mu         0.13528    0.00042046       321.75          0

alpha      0.84698       0.13207       6.4129          0

beta        0.1476      0.091204       1.6184    0.10559

theta      -4.3961        71.359    -0.061605    0.95088

w            48.18         515.4     0.093481    0.92552

m        0.0068454       0.10985     0.062315    0.95031

RMSE of one-step variance forecast (period 1 to 1912): 6.086e-03.

 

 

 

Table For Ftse with rolling window

Method: Maximum likelihood

Sample size: 1912

Adjusted sample size: 1496

Logarithmic  likelihood:      2867.51

Akaike   info criterion:     -5723.01

Bayesian info criterion:     -5689.68

Coeff       StdErr        tStat        Prob

mu         0.13448    0.0004475       300.52           0

alpha      0.85106      0.14013       6.0731           0

beta       0.14154      0.09676       1.4628     0.14352

theta      -20.641        248.8    -0.082964     0.93388

w           1.0013      0.52979         1.89    0.058763

m        0.0063926     0.076475     0.083591     0.93338

RMSE of one-step variance forecast (period 1 to 1912): 6.155e-03.

 

 

Table for Garch Midas With Ftse in sample

Method: Maximum likelihood

Sample size: 1900

Adjusted sample size: 1484

Logarithmic  likelihood:      2856.26

Akaike   info criterion:     -5700.51

Bayesian info criterion:     -5667.21

Coeff        StdErr       tStat        Prob

mu        0.13444    0.00045203     297.41             0

alpha     0.84968       0.14054     6.0456             0

beta      0.14244      0.097251     1.4647       0.14301

theta    0.042136       0.24164    0.17437       0.86157

w           1.001       0.22686     4.4125    1.0222e-05

m        0.053367       0.30785    0.17335       0.86238

RMSE of one-step variance forecast (period 1 to 1900): 6.278e-03.

RMSE of one-step variance forecast (period 1901 to 1912): 3.824e-03.

 

 

Table for Garch Midas with Ftse out of sample

Method: Maximum likelihood

Sample size: 1912

Adjusted sample size: 1496

Logarithmic  likelihood:      2867.83

Akaike   info criterion:     -5723.67

Bayesian info criterion:     -5690.33

Coeff       StdErr       tStat        Prob

mu        0.13474    0.0004485     300.43             0

alpha     0.85086      0.13935      6.106             0

beta      0.14346     0.096542      1.486       0.13729

theta    0.048784       0.3847    0.12681       0.89909

w           1.001      0.23446     4.2694    1.9603e-05

m        0.063143      0.49982    0.12633       0.89947

RMSE of one-step variance forecast (period 1 to 1912): 6.120e-03.

RMSE of one-step variance forecast (period 1 to 1913): 6.126e-03.

RMSE of one-step variance forecast (period 1 to 1914): 6.125e-03.

RMSE of one-step variance forecast (period 1 to 1915): 6.123e-03.

RMSE of one-step variance forecast (period 1 to 1916): 6.121e-03.

RMSE of one-step variance forecast (period 1 to 1917): 6.120e-03.

RMSE of one-step variance forecast (period 1 to 1918): 6.118e-03.

RMSE of one-step variance forecast (period 1 to 1919): 6.116e-03.

RMSE of one-step variance forecast (period 1 to 1920): 6.115e-03.

RMSE of one-step variance forecast (period 1 to 1921): 6.113e-03.

RMSE of one-step variance forecast (period 1 to 1922): 6.112e-03.............................

This is just a sample partial case solution. Please place the order on the website to order your own originally done case solution.

Posted on June 8, 2017 in Case Solutions

Share the Story

Back to Top
Share This