In this time series data, I calculated the return values and the goal is to estimate a GARCH(1,1)
to the return values and obtain the estimated parameters. The return data is as below:
daily_xts <- c(
NA, -0.362483397298163, 0.971212570135149, -1.42617239823122,
0.659020656052212, -1.07026409134319, -0.620050212514744, 4.1733766704759,
-1.11087572552901, 1.04457447287807, 1.31783586708174, -1.45058367712325,
1.05705454632501, -0.329132489568185, -2.17737995495608, 0.89445589392998,
0.0222637735424858, 0.643376588186362, 1.90565177684849, 0.691894652066738, 0,
0.430017858618825, 1.84934379021944, -0.337553063128126, 0.316491451897694,
-0.147568273404008, 0.442057331529488, -0.50537483851647, -0.317154299041889,
-0.275688857937073, -0.170036176356447, 0.910543111831297, -2.00134210169014,
0.707175330980503, -1.41938727023909, 0.281174629319159, 2.03107144458357,
-0.786148733993697, 2.00619329071503, -1.55924352515018, 0.635055062253542,
0.105451873221307, 0.0632220018951024, 0, -0.995035191910443,
-1.00503573450124, -0.0644931771735635, 0.600342718606539, 0.639258509358287,
-1.60585822758295, -0.954253598162724, 0.521631263209388, 0.367842024632026,
-0.237863670111027, 0.905182904646695, 0.833246987078562, 0.318644978722249,
-1.32368071322349, 0.364694172308155, 0.277987981498784, -0.664173825265157,
-0.582086369202983, 0.818266830721681, 1.04533858552691, 2.5768662413336,
0.227251421854779, -0.289314112624428, -1.73263489514008, 0.210345045786031,
-0.88646002366799, -1.6027697134926, 0.579962980356985, 0.661761414507556,
-0.319663571506235, -0.663878663395767, -0.0859866767727979, 2.27499978508798,
-0.505792426953766, -0.42346240211053, -0.212408745961445, 3.42771080583533,
0.082154453649963, 0.266532195371827, 0.347466887095305, 0.264902862955552,
0.406176435819816, -0.630277583374506, -0.880884551328176, 0.840082835927314,
0.508803397804103, -1.34888623373142, 0.697154782715792, 0,
-0.163595128510829, -0.369081817690731, -0.473590914271638,
-0.0206460935814334, -0.538190085407031, 0.66198007567122, 1.14802612701097,
-0.798127646126101, -1.24045008464169, 0.849305985518978, 0.185471459659459,
2.78162084699445, -0.100170299874947, 0.280224368325754, -0.300266465215504,
-0.76474712853063, -0.344021378571879, 1.28903895791947, -1.93985272546637,
0.142734247904919, 0.892496778383434, -0.22237955186819, 0.665664572668634,
0.940471154591771, -1.9304822512165, -0.121903714018456, 1.49316940346047,
-0.421473775737669, 0.9607759862861, -1.78881261021053, 0.928547235456589,
0.260864996716981, 0.32012631420244, -0.601089774165953, 2.42219907099721,
0.430615262874223, -0.293402655467601, -0.707689226553487, 0.491981716387135,
0.235298147776763, -0.569580243883694, -0.157699620280205, -0.375529647518658,
0.0197960602526415, -0.0594078650883123, -0.317460584077267,
-0.418200346445508, 1.09160356457991, -0.534392172622988, -0.597133547777373,
-0.500351289032741, 0.779458328275551, 0.298183301165711, 0.119020049757257,
-1.19666167919852, -2.66357316678842, -2.92723806577664, -7.5561637168708,
-1.84762524308226, 2.48631125725982, 3.7049517956655, 0.829158152395015,
-1.59898049591685, -3.87174395187007, 1.5260562292684, -0.226302424863301,
-2.45396791073826, 2.22716354950898, -1.85636358815686, -0.254779526989379,
0.670292590185539, -0.554406607258606, 1.47163614127295, 0.114064113791379,
0.862663663247565, -2.07841205128214, -0.0692669995457695, -1.91192349800726,
-0.661313219503512, -0.618024310846055, -2.60883877668987, -4.50526628131178,
1.12017208569051, 1.80637373006816, 1.3336750079052, 1.50965371968508,
0.0241585116555143, -3.69136407518402, 1.83810937636153, 1.29601763538583,
1.75802001210483, -0.766835782235109, -1.57598610569769, -0.489949540734536,
2.78501593473792, 0.832450995802825, -0.165933420818298, -0.977478233272633,
1.0960295173926, 3.03406933559902, 0.229616638878971, 0.0229400301767324,
0.617215341125954, 1.98561805645161, 1.06668566956127, -0.977357835707293,
1.39645626718012, 0.175935831085239, -0.727752704230733, 0, 0.991090581486054,
-1.27924549979292, 1.56373415084596, -1.51934666626912, -1.97183401894625,
-0.52183897256266, 2.07121767086127, -0.24540112432061, 2.27457970332035,
-0.152953161611391, 0.610418302860127, -1.24659682927115, 0.0220090219834379,
-0.0880497515828527, 0.022014753408639, -1.10694072973021, 1.19497110803928,
-0.52933074631043, -2.39465166138508, 2.57140380638514, 0.572315011412661,
-0.0219558775989004, -1.30374184086279, 0.775459740578732, -2.11895957242323,
1.00931660895012, 1.72570431108516, 1.00393467604385, -1.73041449695277,
-3.50754710314218, 0.775020957626982, 0.994131538121756, 1.38425522204071, 0,
-0.155329005667104, 1.7391764919287, -1.20761155774822, -0.79840743482209,
-4.50896048631773, -0.0233011072295231, -0.842300263454465, -2.42580260084813,
-2.11661717783134, 0.147425091748632, 1.77641612276789, -2.88740398638554,
2.01530298162425, -1.37189071495381, -0.271708203816967, -1.1693154897352,
-1.20847141900464, 1.38349334579368, -0.928602493156783, 1.25283522918238,
0.768950821396164, -9.75118133292265, 3.0581756775089, 1.57277949161574,
-1.49354272424227, 0.368904234325074, -0.0263106676859248, -1.59111820233693,
0.13356219607461, -1.23557576765765, 0.56596028398106, -2.36584525160097,
2.15062321533628, 2.28977247235775, 1.20357021144897, -0.364773714405286,
0.572614786886128, 1.62186849780461, -1.98588346980539, 2.08797893423647,
1.09096601291321, -0.277955955608533, -1.99341632745926, 1.51149276904095,
0.0254175665428846, -1.33062352200488, 0.923083477553055, 0,
-0.0255315898140207, 0.280436140976192, -0.638490245680989, 3.37563545227733,
0.321506401851357, -1.49256000913636, 0.699298536565873, 0.273396463652187,
1.23336538219689, -0.0735818558469603, 0.660232279487438, -0.611174145719984,
-0.0735900937612666, 0.318513067041648, 1.43293280148189, 0.433111825995125,
0.431241663462245, 0.856936916726747, 0.307658511609565, -0.663821775442397,
2.37406378493161, -1.02732166644461, -0.564844994362712, 0.259283589682058,
0.79719062278536, 1.23013739289113, 0.3684093675695, -0.2300921454641,
1.23628175728121, -0.227797367615734, 0.27329327273411, -0.204894773904307,
0.454755202025403, -0.158937483792698, -0.295817718232705, -0.114009813489169,
-8.09938975665445, -3.83303604567375, -0.128627670467729, -0.775195126460293,
-1.17418444297854, 1.04440116545232, -1.38618407134463, 0.0263304803847397,
0.315452425507567, -0.236499925579148, -0.0263070657038345, -1.05821625220277,
1.7139563068187, -1.42182755204443, 0.106019094293286, -1.36019695804759,
0.962049108980034, -0.613578046639862, 1.61914886461805, 1.82629652009538,
0.541445186901113, 1.0487370975818, 0.836193900582982, -0.328576052867646,
0.0759180104275003, -0.889343949495647, -0.0255315898140207,
-0.614593499589011, -0.0513874625902133, -0.102856785911243,
-1.21652074603364, -1.41623394827359, -0.529664896527127, -0.612600131266872,
0.186841106002777, -0.293767073246221, 0.958221345113053, -0.0529941718814264,
2.64171756288554, 2.2713722830678, -4.43715029075094, -2.56492550704333,
1.63740065063198, 2.65350912560067, 1.90041926524516, 0.583387816072722,
-0.253233865385072, 3.46366499356092, 1.28971000630491, 1.27328567087743,
0.547555243718678, 0.82753043471282, -1.18428666991703, 0.735903617814992,
-0.426644416779531, -0.0237510399917262, -0.691386717521381, 2.01310052237393,
0.910261825672443, 0.301582415118684, 0.554406607258606, 0.436727517192592,
0.160421721601001, 1.7703662757663, 0.672646026376356, 1.1994834927187,
-0.486944294549474, -0.266605353798655, -0.311943205007159, 0.999224490176243,
-0.531676053767471, 0.133189805856038, -0.600738242264809, 0.534161074228967,
-0.0221955822866882, 0.243931812586062, -0.510723881313835,
-0.535711114564386, -0.718778917600238, -0.270878260296259, -0.15836220932024,
-0.61314146896212, -1.67686024002953, -0.767351765936786, 0.326264563481615,
0.626234216352417, -0.975839505436893, -1.9093142906665, 0.664136699471563,
-0.497687962909099, 0.16617214506276, -0.618602957231884, -0.119412551502984,
-2.02758585103844, 0.99479170462109, -1.90110290176575, 0.417439525758478,
0.756742290633117, 1.807495931976, -0.454815870249181, -0.24020669151974,
0.814366177294801, 0.713107380276945, -0.0710863671683271, -1.21618049888368,
1.54747043355346, -0.0945426649996861, -2.03041013106957, 2.03041013106957,
0.612915638697142, -1.06321383352239, 1.50876035031757, 0.536692437338138, 0,
1.22587170356847, -5.52940271287894, -0.43827681550952, 0, -0.464716496547446,
-0.491524699447288, 1.41880563519434, -2.85804143211106, 1.80810870088211,
-0.590848577796699, -0.222469502211098, -0.545909551108448,
-0.573925482397053, 0.822439526798302, -1.8790480989995, -0.761615736775489,
-0.485383498806025, -0.900322480197113, -0.83031092407384, 1.83301631700727,
1.95066600675924, -0.0752892465497368, 0.600747724109496, 1.33864416746294,
-1.16410478672959, -2.36965461487664, 1.54413898249217, 0.351053511203014,
1.09535075731455, -1.37107721003202, -0.201010122983636, -4.26471018473458,
2.28344644401992, 0.460712358289506, -1.07831080572351, -0.025821607841392,
-1.71879231322545, -1.24225731900482, 0.794716765447001, 1.38872397179246,
-0.0260299292563992, 0.15605205133169, 0.518404478758816, 1.33541017215268, 0,
0.610373207284409, -1.58449266386005, 0.282958388150023, -2.15509319831488,
0.627950797828314, -0.392006256493937, 0.130846543189511, 0.130665112122808,
0.338931367850615, 0.46741193731239, -0.989325968087407, 0.235201983896394
) |>
structure(
dim = c(492L, 1L),
index = c(
1421712000, 1421798400, 1421884800, 1421971200, 1422230400, 1422316800,
1422403200, 1422489600, 1422576000, 1422835200, 1422921600, 1423008000,
1423094400, 1423180800, 1423440000, 1423526400, 1423612800, 1423699200,
1423785600, 1424131200, 1424217600, 1424304000, 1424390400, 1424649600,
1424736000, 1424822400, 1424908800, 1424995200, 1425254400, 1425340800,
1425427200, 1425513600, 1425600000, 1425859200, 1425945600, 1426032000,
1426118400, 1426204800, 1426464000, 1426550400, 1426636800, 1426723200,
1426809600, 1427068800, 1427155200, 1427241600, 1427328000, 1427414400,
1427673600, 1427760000, 1427846400, 1427932800, 1428278400, 1428364800,
1428451200, 1428537600, 1428624000, 1428883200, 1428969600, 1429056000,
1429142400, 1429228800, 1429488000, 1429574400, 1429660800, 1429747200,
1429833600, 1430092800, 1430179200, 1430265600, 1430352000, 1430438400,
1430697600, 1430784000, 1430870400, 1430956800, 1431043200, 1431302400,
1431388800, 1431475200, 1431561600, 1431648000, 1431907200, 1431993600,
1432080000, 1432166400, 1432252800, 1432598400, 1432684800, 1432771200,
1432857600, 1433116800, 1433203200, 1433289600, 1433376000, 1433462400,
1433721600, 1433808000, 1433894400, 1433980800, 1434067200, 1434326400,
1434412800, 1434499200, 1434585600, 1434672000, 1434931200, 1435017600,
1435104000, 1435190400, 1435276800, 1435536000, 1435622400, 1435708800,
1435795200, 1436140800, 1436227200, 1436313600, 1436400000, 1436486400,
1436745600, 1436832000, 1436918400, 1437004800, 1437091200, 1437350400,
1437436800, 1437523200, 1437609600, 1437696000, 1437955200, 1438041600,
1438128000, 1438214400, 1438300800, 1438560000, 1438646400, 1438732800,
1438819200, 1438905600, 1439164800, 1439251200, 1439337600, 1439424000,
1439510400, 1439769600, 1439856000, 1439942400, 1440028800, 1440115200,
1440374400, 1440460800, 1440547200, 1440633600, 1440720000, 1440979200,
1441065600, 1441152000, 1441238400, 1441324800, 1441670400, 1441756800,
1441843200, 1441929600, 1442188800, 1442275200, 1442361600, 1442448000,
1442534400, 1442793600, 1442880000, 1442966400, 1443052800, 1443139200,
1443398400, 1443484800, 1443571200, 1443657600, 1443744000, 1444003200,
1444089600, 1444176000, 1444262400, 1444348800, 1444608000, 1444694400,
1444780800, 1444867200, 1444953600, 1445212800, 1445299200, 1445385600,
1445472000, 1445558400, 1445817600, 1445904000, 1445990400, 1446076800,
1446163200, 1446422400, 1446508800, 1446595200, 1446681600, 1446768000,
1447027200, 1447113600, 1447200000, 1447286400, 1447372800, 1447632000,
1447718400, 1447804800, 1447891200, 1447977600, 1448236800, 1448323200,
1448409600, 1448582400, 1448841600, 1448928000, 1449014400, 1449100800,
1449187200, 1449446400, 1449532800, 1449619200, 1449705600, 1449792000,
1450051200, 1450137600, 1450224000, 1450310400, 1450396800, 1450656000,
1450742400, 1450828800, 1450915200, 1451260800, 1451347200, 1451433600,
1451520000, 1451865600, 1451952000, 1452038400, 1452124800, 1452211200,
1452470400, 1452556800, 1452643200, 1452729600, 1452816000, 1453161600,
1453248000, 1453334400, 1453420800, 1453680000, 1453766400, 1453852800,
1453939200, 1454025600, 1454284800, 1454371200, 1454457600, 1454544000,
1454630400, 1454889600, 1454976000, 1455062400, 1455148800, 1455235200,
1455580800, 1455667200, 1455753600, 1455840000, 1456099200, 1456185600,
1456272000, 1456358400, 1456444800, 1456704000, 1456790400, 1456876800,
1456963200, 1457049600, 1457308800, 1457395200, 1457481600, 1457568000,
1457654400, 1457913600, 1.458e+09, 1458086400, 1458172800, 1458259200,
1458518400, 1458604800, 1458691200, 1458777600, 1459123200, 1459209600,
1459296000, 1459382400, 1459468800, 1459728000, 1459814400, 1459900800,
1459987200, 1460073600, 1460332800, 1460419200, 1460505600, 1460592000,
1460678400, 1460937600, 1461024000, 1461110400, 1461196800, 1461283200,
1461542400, 1461628800, 1461715200, 1461801600, 1461888000, 1462147200,
1462233600, 1462320000, 1462406400, 1462492800, 1462752000, 1462838400,
1462924800, 1463011200, 1463097600, 1463356800, 1463443200, 1463529600,
1463616000, 1463702400, 1463961600, 1464048000, 1464134400, 1464220800,
1464307200, 1464652800, 1464739200, 1464825600, 1464912000, 1465171200,
1465257600, 1465344000, 1465430400, 1465516800, 1465776000, 1465862400,
1465948800, 1466035200, 1466121600, 1466380800, 1466467200, 1466553600,
1466640000, 1466726400, 1466985600, 1467072000, 1467158400, 1467244800,
1467331200, 1467676800, 1467763200, 1467849600, 1467936000, 1468195200,
1468281600, 1468368000, 1468454400, 1468540800, 1468800000, 1468886400,
1468972800, 1469059200, 1469145600, 1469404800, 1469491200, 1469577600,
1469664000, 1469750400, 1470009600, 1470096000, 1470182400, 1470268800,
1470355200, 1470614400, 1470700800, 1470787200, 1470873600, 1470960000,
1471219200, 1471305600, 1471392000, 1471478400, 1471564800, 1471824000,
1471910400, 1471996800, 1472083200, 1472169600, 1472428800, 1472515200,
1472601600, 1472688000, 1472774400, 1473120000, 1473206400, 1473292800,
1473379200, 1473638400, 1473724800, 1473811200, 1473897600, 1473984000,
1474243200, 1474329600, 1474416000, 1474502400, 1474588800, 1474848000,
1474934400, 1475020800, 1475107200, 1475193600, 1475452800, 1475539200,
1475625600, 1475712000, 1475798400, 1476057600, 1476144000, 1476230400,
1476316800, 1476403200, 1476662400, 1476748800, 1476835200, 1476921600,
1477008000, 1477267200, 1477353600, 1477440000, 1477526400, 1477612800,
1477872000, 1477958400, 1478044800, 1478131200, 1478217600, 1478476800,
1478563200, 1478649600, 1478736000, 1478822400, 1479081600, 1479168000,
1479254400, 1479340800, 1479427200, 1479686400, 1479772800, 1479859200,
1480032000, 1480291200, 1480377600, 1480464000, 1480550400, 1480636800,
1480896000, 1480982400, 1481068800, 1481155200, 1481241600, 1481500800,
1481587200, 1481673600, 1481760000, 1481846400, 1482105600, 1482192000,
1482278400, 1482364800, 1482451200, 1482796800, 1482883200, 1482969600
) |>
structure(tzone = "UTC", tclass = "Date"),
class = c("xts", "zoo")
)
First Problem
I used the following codes for the estimation:
# Fit a GARCH(1,1) model
garch_spec <- ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(0, 0), include.mean = F),
distribution.model = "norm")
garch_fit <- ugarchfit(spec = garch_spec, data = na.omit(daily_xts))
The output of the series is as follows:
> garch_fit@fit$matcoef
Estimate Std. Error t value Pr(>|t|)
omega 1.839909e+00 0.47477279 3.875347e+00 0.0001064727
alpha1 1.633124e-01 0.07551724 2.162584e+00 0.0305731569
beta1 8.861043e-10 0.22817177 3.883497e-09 0.9999999969
But the correct output is in the following image:
Second Problem
used many approaches and as far as I know, the VaR and CVaR are one value per series. I do not understand the time-varying VaR/CVaR. The output should be like the following image: https://i.stack.imgur.com/i3JKL.png Any help would be appreciated.