Debian Codegraph @

addons/gig/examples/test2.inp

raw
1 set verbose off
2 # Import the gig library
3 include gig.gfn
4
5 # Read the data
6 open msft.gdt
7
8 # compute returns
9 r = 100*ldiff(Close)
10
11 # compute the variance regressors
12 lv = ln(Volume/1000000)
13 hl = ln(High/Low) * 100
14
15 # set up the regressor lists
16 list X = const
17 list vX = const lv(-1) hl(-1)
18
19 # set up the model
20 mod = gig_setup(r, 1, X, vX, 1)
21 gig_set_dist(&mod, 4)
22
23 # estimate
24 gig_estimate(&mod)
25
26 # re-estimate with QR decomposition
27 gig_set_vQR(&mod, 1)
28 gig_estimate(&mod)