[R] Initial values of the parameters of a garch-Model

Thomas Schwander thomas_schwander at web.de
Sun Feb 8 22:14:57 CET 2009


Dear all,

I'm using R 2.8.1 under Windows Vista on a dual core 2,4 GhZ with 4 GB 
of RAM.
I'm trying to reproduce a result out of "Analysis of Financial Time 
Series" by Ruey Tsay.

In R I'm using the fGarch library.

After fitting a ar(3)-garch(1,1)-model 
    > model<-garchFit(~arma(3,0)+garch(1,1), analyse)

I'm saving the results via
    > result<-model at fit$se.coef

I'm wondering how the first variance
    > result at h.t[1]

is computed, i.e. how the initial parameters for \varepsilon_{t-1} and 
\sigma_{t-1}^2 have been chosen so that the first variance is 
    [1] 0.003381579

and why they have been chosen this way.

Even after snooping the function-code I cannot find it.

Any help would be appreciated.

Thanks,
Thomas

Here is the data used:

dput(analyse)
structure(list(V1 = c(0.0225, -0.044, -0.0591, 0.0227, 0.0077,
0.0432, 0.0455, 0.0171, 0.0229, -0.0313, 0.0223, 0.0166, -0.0208,
0.0477, 0.0065, 0.0172, 0.0522, -0.0094, 0.065, 0.0445, 0.0432,
-0.0531, 0.0678, 0.019, -0.0051, -0.0176, 0.1083, 0.0324, 0.0127,
-0.0405, 0.0125, 0.0741, 0.024, 0.0145, 0.1199, 0.0029, 0.0571,
-0.0058, -0.0023, 0.0161, -0.0428, 0.1124, 0.0456, 0.098, -0.0489,
-0.1993, -0.1337, 0.0253, 0.0625, 0.0215, 0.0799, -0.0095, -0.0165,
-0.1646, 0.0367, 0.0075, -0.1301, -0.0888, -0.0218, -0.0742,
0.0489, 0.1144, -0.0692, -0.0959, -0.1372, 0.139, -0.0742, 0.0095,
-0.2994, 0.0844, -0.0978, -0.1453, -0.0283, 0.0507, -0.1182,
-0.2025, -0.2333, -0.0089, 0.377, 0.3754, -0.0369, -0.1386, -0.0589,
0.0519, 0.0073, -0.1844, 0.0336, 0.4222, 0.1587, 0.1317, -0.088,
0.1146, -0.1136, -0.0885, 0.1027, 0.0223, 0.1059, -0.0367, -9e-04,
-0.027, -0.0813, 0.0208, -0.1152, 0.0541, -0.0055, -0.0319, 0.0829,
-0.0042, -0.0421, -0.0396, -0.0309, 0.0956, 0.0323, 0.0678, 0.0831,
0.0217, 0.0239, 0.0751, 0.0393, 0.0371, 0.0655, 0.0168, 0.0254,
-0.0771, 0.0458, 0.0306, 0.0681, 0.0088, 0.0013, 0.075, 0.0041,
-0.0058, 0.0378, 0.0146, -0.0094, -0.0831, -0.0103, -0.0529,
0.1026, -0.0554, -0.1421, -0.1017, -0.1011, -0.0504, 0.0133,
0.0608, -0.2504, 0.1412, -0.0443, 0.247, 0.0727, -0.0274, 0.0149,
0.076, -0.0334, 0.0377, -0.0689, 0.0325, -0.1354, -0.0055, 0.0623,
-0.0638, 0.1087, -0.0714, 0.1646, -0.0146, -0.0491, 0.0238, -0.0352,
0.0066, 0.0099, -0.0049, -0.2395, 0.0766, 0.0311, 0.0262, 0.0095,
0.0394, -0.0424, -0.0028, -0.0482, -0.0149, 0.004, -0.0653, 0.0043,
0.0535, 0.0548, -0.0087, -0.0097, -0.0686, -0.0421, -0.0451,
0.0138, -0.025, -0.0675, -0.0437, 0.064, 0.0184, 0.0313, 0.007,
0.0267, 0.0644, -0.0138, 0.0517, 0.0716, 0.0506, 0.0527, 9e-04,
0.0449, 0.0198, -0.0543, 0.0103, 0.0237, -0.0132, -0.0755, 0.059,
0.0154, -0.0025, 0.0169, -0.0125, 0.0404, 0.051, -0.0208, 0.0087,
-0.0031, 0, 0.0039, 0.0351, 0.0143, 0.0616, -0.0462, 0.088, 0.0115,
-0.0033, -0.0201, 0.058, 0.0419, 0.0303, 0.0324, 0.0099, 0.0697,
-0.0695, 0.0463, 0.0376, 0.0224, -0.0391, -0.0255, -0.0729, -0.1015,
-0.008, -0.0115, 0.0429, 0.0235, -0.0147, -0.0169, -0.0389, -0.0089,
0.0526, 0.0362, -0.0279, -0.0137, 0.0212, -0.0285, 0.0207, -0.0399,
-0.047, 0.0771, 0.0265, 0.0782, 0.003, -0.0532, 0.0076, -0.0301,
0.0678, -0.1082, 0.0305, 0.0013, -0.0394, 0.0301, -0.0212, -0.0373,
-0.0021, 0.0621, 0.012, 0.0237, 0.0295, 0.0012, 0.0436, 0.0173,
0.01, 0.0041, 0.0451, 0.0393, -0.058, 0.0085, 0.0325, 0.0559,
0.0041, -0.001, 0.0461, 0.0612, 0.0065, -0.0183, 0.0481, -0.0406,
-0.026, 0.0687, 0.0393, -9e-04, -0.0138, -0.0026, 0.0389, 0.0156,
-0.0365, 0.0477, -0.0431, 0.0232, 0.0461, 0.0176, -0.0146, -0.0196,
-8e-04, 0.0465, 0.0355, -0.0072, -0.0182, -0.0236, -0.0265, -0.0032,
-0.0163, 0.0253, -0.0578, 0.0013, 0.051, 0.009, 0.002, 0.0512,
0.0027, 0.0302, 0.049, 0.0329, 7e-04, 0.0572, -0.034, 0.0831,
-0.0195, 0.0808, 0.0508, 0.0181, 0.0035, -0.0049, 0.0377, -0.0013,
0.0823, 0.0607, -0.0078, 0.0113, -0.0305, 0.0749, -7e-04, -0.0365,
0.0347, 0.0693, -0.0021, -0.0657, 0.0392, 0.0515, -0.0381, -0.0455,
0.0051, -0.011, 0.0353, -0.0418, -0.0326, 0.0196, 0.037, 0.0369,
-0.0013, 0.0114, -0.0561, -0.0619, -0.0321, 0.0161, -0.0415,
0.0428, -0.0206, 0.0309, 0.0318, 0.015, 0.0261, 0.0431, 0.0119,
0.0484, 0.0254, 0.0224, 0.052, 0.0038, -2e-04, 5e-04, 0.0388,
0.0189, -0.0036, 0.0349, -0.015, -0.0456, 0.0113, 0.0132, 0.0276,
-0.0715, 0.0092, -0.0139, -0.0175, 0.0269, 0.0195, -0.0248, 0.0261,
-0.0604, -0.0024, 0.0403, 0.0463, 0.0632, 0.0269, 0.0255, 0.0038,
0.0191, -0.0288, 0.0328, 0.0196, -0.0197, 0.0283, 0.0393, 0.0032,
-0.0379, 0.0163, -0.0059, -0.062, -0.086, -0.0818, 0.0636, 0.0153,
-0.0482, 0.0044, 0.1016, 0.0135, 0.0491, -0.0289, 0.0355, 0.0485,
0.0143, -0.0202, -0.0035, 0.0487, -0.011, 0.0322, -0.0105, 0.0244,
0.0269, 0.0099, 0.0152, 0.0061, 0.0115, 0.0164, 0.0182, -0.0162,
0.0287, 0.0081, -0.0052, 0.0039, 0.0332, -0.0015, -0.0145, 0.0342,
-0.0077, -0.0486, 0.0134, 0.0225, 0.032, 0.0273, -0.0088, 0.009,
0.0049, -0.0179, -0.0218, 0.0205, -0.0541, -0.0161, -0.0135,
-0.0778, -0.007, 0.0475, 0.0031, -0.0015, 0.0782, 0.002, 0.0394,
0.0422, -0.0524, 0.0175, 0.0453, -0.0117, 0.0328, -0.0291, 0.0011,
0.0263, -0.0438, -0.0312, 0.0094, 0.0819, 0.0112, 0.0091, -0.0185,
0.0115, 0.0385, 0.0072, 0.048, -0.0416, -0.0082, -0.0474, 0.0344,
0.0215, -0.0022, -0.0556, -0.0602, 0.0401, -0.025, 0.0442, -0.0353,
-0.0187, -0.0765, 0.0527, 0.0015, -0.0905, -0.061, -0.05, 0.0733,
0.0445, 0.033, -0.0114, 0.0474, 0.0568, 0.0405, 0.0091, 0.0368,
0.0363, -0.0416, 7e-04, -0.0413, 0.0361, -0.007, -0.0418, -0.0025,
0.0862, 0.0181, 0.0253, 0.0059, 0.0044, 0.0173, -0.0218, 0.0023,
0.0345, -0.0049, 0.0093, 0.0456, 0.0118, -0.0171, -0.0375, -0.0014,
-0.0408, -0.0189, -0.0066, 0.038, -0.0367, 0.0401, -0.0013, -0.1139,
0.0166, -0.01, -0.0036, -0.0233, -0.0391, -0.0336, -0.0147, -0.0778,
-0.0903, -0.1193, 0.163, -0.0532, -0.0202, 0.1228, 0.0599, 0.0217,
0.0473, 0.0441, 0.0443, -0.0677, -0.0211, -0.0346, 0.0616, 0.0247,
-0.0115, 0.1183, -0.0114, 0.0307, -0.011, -0.0144, 0.0409, -0.0081,
-0.0051, 0.0226, -0.0222, -0.0078, 0.0525, -0.0505, -0.0217,
-0.014, 2e-04, -0.0236, 0.0454, -0.0162, -0.021, -0.0025, -0.0434,
0.027, 0.0028, -0.0615, -0.0248, 0.0249, 0.0854, 0.0042, -0.0176,
0.0539, 0.0259, -0.0073, -0.0916, 0.0166, 0.0149, 0.0397, -0.0365,
0.0552, 0.0017, -0.0263, 0.0387, 0.0087, 0.0531, 0, -0.0686,
0.0426, 0.0168, 0.0576, -0.0044, -0.1018, 0.0411, 0.0466, 0.027,
0.065, 0.0058, 0.0252, 0.016, 0.1024, -0.0339, -0.0457, 0.0133,
0.036, -0.0235, -0.0017, -0.0104, -0.0022, -0.0621, -0.0538,
0.0491, 0.0366, -0.0301, -0.0175, -0.0605, -0.0102, 0.04, -0.0392,
-0.0203, -0.023, 0.116, 0.0076, 0.1104, 0.0361, 0.0152, 0.0331,
0.019, 0.0331, 0.0749, -0.0123, 0.0352, -0.033, 0.0113, 0.0102,
-0.0152, 0.0174, -0.0088, -0.0092, -0.0389, 0.0135, 0.0055, -0.0594,
0.0175, -0.0165, 0.1063, -0.0035, -1e-04, -0.0151, 0.0224, 0.0741,
0.0087, -0.0029, -0.0046, 0.0541, 0.0121, -0.0048, -0.012, -0.0347,
0.0425, 0.0651, 0.0451, 0.0024, 0.0715, 0.0528, -0.0141, 0.0502,
0.0141, -0.0587, 0.0712, -0.0854, 0.0547, 0.0215, -0.0283, 0.1318,
0.0369, 0.0264, -0.0115, 0.006, 0.0479, 0.0482, 0.035, -0.0242,
-0.2176, -0.0853, 0.0729, 0.0404, 0.0418, -0.0333, 0.0094, 0.0032,
0.0433, -0.0054, -0.0386, 0.0397, 0.026, -0.0189, 0.0147, 0.0711,
-0.0289, 0.0208, 0.0501, 0.0351, -0.0079, 0.0884, 0.0155, -0.0065,
-0.0252, 0.0165, 0.0214, -0.0688, 0.0085, 0.0243, -0.0269, 0.092,
-0.0089, -0.0052, -0.0943, -0.0512, -0.0067, 0.0599, 0.0248,
0.0415, 0.0673, 0.0222, 3e-04, 0.0386, -0.0479, 0.0449, 0.0196,
-0.0191, 0.0119, -0.0439, 0.1116)), .Names = "V1", class = "data.frame", 
row.names = c(NA,
-792L))




More information about the R-help mailing list