lppl_estimate_rob_3s: 3rd step LPPL estimation procedure by Geraskin and Fantazzini...

Description Usage Arguments Details Value Examples

View source: R/LPPL_3step.R

Description

This function performs the 3rd step of the LPPL estimation procedure by Geraskin and Fantazzini (2013) and Fantazzini (2016)

Usage

1
lppl_estimate_rob_3s(x, par1, par2)

Arguments

x

is a T x 1 data vector

par1

is a 6 x 1 vector containing the parameters estimated in the 1st step [beta, omega, A, B, C1, C2]

par2

is a 1 x 1 scalar containing the parameter estimated in the 2nd step [tc]

Details

This function performs the 3rd step of the LPPL estimation procedure by Geraskin and Fantazzini (2013) and Fantazzini (2016) using the LPPL formula by Filimonov and Sornette (2013): Using the estimated parameters in the first and second stages as starting values, it estimates all the 7 LPPL parameters [beta, omega, A, B, C1, C2, tc] by using a quasi-Newton method algorithm. Moreover, it computes the KPSS test statistic with the LPPL residuals to check their stationarity (a new condition introduced by Lin et al. (2014)).

Value

par_est is a 8 x 1 vector containing the estimated 7 LPPL parameters [beta, omega, A, B, C1, C2, tc], togother with the KPSS test statistic computed with the LPPL residuals to check their stationarity (a new condition introduced by Lin et al. (2014))

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 ## Not run: 
 tparm=c(0.35, 4.15, 2.07, 7.16,-0.43, 0.035, 0.00007, 530)
 aa=lppl_simulate(500,tparm)
 # 1st estimation step
 bb1=lppl_estimate_rob_1s(aa)
 bb1
 # 2nd estimation step
 bb2=lppl_estimate_rob_2s(aa,bb1)
 bb2
 # 3rd estimation step
 bb3=lppl_estimate_rob_3s(aa,bb1,bb2)
 bb3
 # The original C parameter can be retrieved using standard trigonometric
 # functions
 C.param=bb3[5]/cos(atan(bb3[6]/bb3[5]))

 # The first major condition for a bubble to occur within the LPPL framework
 # is that 0 < beta < 1, which guarantees that the crash hazard rate accelerates.
 # The second major condition is that the crash rate should be non-negative,
 # as  highlighted by  Bothmer and Meister (2003), which imposes that
 # b = [- B x beta - |C| x sqrt(beta^2  + omega^2)] >=0.
 # For the original parameters we have:
 -tparm[5]*tparm[1]-abs(tparm[6])*sqrt(tparm[1]^2+tparm[2]^2)
 # while for the estimated paramaters we have:
 -bb3[4]*bb3[1]-abs(C.param)*sqrt(bb3[1]^2+bb3[2]^2)
   
## End(Not run)

deanfantazzini/bubble documentation built on Oct. 22, 2020, 2:43 p.m.