Is there a package able to estimate an ARFIMA model in Julia (or just ARIMA for a start)?
I believe that the ARFIMA.jl package is just for simulating stochastic time-series that follow an ARFIMA process. Thank you in advance.
Is there a package able to estimate an ARFIMA model in Julia (or just ARIMA for a start)?
I believe that the ARFIMA.jl package is just for simulating stochastic time-series that follow an ARFIMA process. Thank you in advance.
@s-brodaβs ARCHModels.jl can fit ARMA{p,q} models (but not yet ARIMA or ARFIMA).
julia> using ARCHModels;
julia> fit_arma(df, p, q) = fit(ARCH{0}, df, meanspec=ARMA{p,q});
julia> fit_arma(BG96, 2, 3)
TGARCH{0,0,0} model with Gaussian errors, T=1974.
Mean equation parameters:
ββββββββββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
ββββββββββββββββββββββββββββββββββββββββββββββββ
c -0.00983746 0.0354041 -0.277862 0.7811
Οβ 0.551574 0.589292 0.935995 0.3493
Οβ -0.144346 1.92247 -0.0750838 0.9401
ΞΈβ -0.542057 0.591114 -0.91701 0.3591
ΞΈβ 0.113263 1.92454 0.0588521 0.9531
ΞΈβ 0.0501891 0.0282235 1.77828 0.0754
ββββββββββββββββββββββββββββββββββββββββββββββββ
Volatility parameters:
βββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββ
Ο 0.220462 0.0117617 18.7441 <1e-77
βββββββββββββββββββββββββββββββββββββββββ
julia>
Also self-tuning:
julia> auto_arma(df, bic) = selectmodel(ARCH{0}, df, meanspec=ARMA, criterion=bic, minlags=1, maxlags=3);
julia> auto_arma(BG96, bic) # ARMA(1,1)
TGARCH{0,0,0} model with Gaussian errors, T=1974.
Mean equation parameters:
βββββββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββββββ
c -0.0266446 0.0174716 -1.52502 0.1273
Οβ -0.621838 0.160741 -3.86857 0.0001
ΞΈβ 0.643588 0.154303 4.17095 <1e-4
βββββββββββββββββββββββββββββββββββββββββββββ
Volatility parameters:
βββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββ
Ο 0.220848 0.0118061 18.7063 <1e-77
βββββββββββββββββββββββββββββββββββββββββ
julia> auto_arma(DOW29[:,1], bic) # ARMA(2,2)
TGARCH{0,0,0} model with Gaussian errors, T=2785.
Mean equation parameters:
βββββββββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββββββββ
c -0.166748 0.0681206 -2.44783 0.0144
Οβ 0.0178542 0.0401341 0.444864 0.6564
Οβ -0.932372 0.0803993 -11.5968 <1e-30
ΞΈβ -0.0191798 0.0463979 -0.413375 0.6793
ΞΈβ 0.903732 0.0963863 9.37614 <1e-20
βββββββββββββββββββββββββββββββββββββββββββββββ
Volatility parameters:
βββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββ
Ο 3.65185 0.220716 16.5455 <1e-60
βββββββββββββββββββββββββββββββββββββββββ
julia> auto_arma(DOW29[:,3], bic) # ARMA(2,1)
TGARCH{0,0,0} model with Gaussian errors, T=2785.
Mean equation parameters:
ββββββββββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
ββββββββββββββββββββββββββββββββββββββββββββββββ
c 0.00192406 0.0345892 0.0556262 0.9556
Οβ -0.371152 0.2418 -1.53496 0.1248
Οβ -0.145134 0.0625429 -2.32055 0.0203
ΞΈβ 0.231451 0.235409 0.983186 0.3255
ββββββββββββββββββββββββββββββββββββββββββββββββ
Volatility parameters:
βββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββ
Ο 2.20732 0.164313 13.4336 <1e-40
βββββββββββββββββββββββββββββββββββββββββ
julia> auto_arma(DOW29[:,9], bic) # ARMA(1,2)
TGARCH{0,0,0} model with Gaussian errors, T=2785.
Mean equation parameters:
ββββββββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
ββββββββββββββββββββββββββββββββββββββββββββββ
c -0.0184696 0.0215819 -0.855789 0.3921
Οβ 0.109868 0.306715 0.358211 0.7202
ΞΈβ -0.110765 0.308797 -0.358699 0.7198
ΞΈβ -0.107618 0.0347561 -3.09639 0.0020
ββββββββββββββββββββββββββββββββββββββββββββββ
Volatility parameters:
βββββββββββββββββββββββββββββββββββββββββ
Estimate Std.Error z value Pr(>|z|)
βββββββββββββββββββββββββββββββββββββββββ
Ο 1.79002 0.109611 16.3307 <1e-59
βββββββββββββββββββββββββββββββββββββββββ
You can look at my post for an attempt to summarize the TS ecosystem in Julia:
there are othersβ¦
PS: while the Julia ecosystem has (multiple) options to estimate ARIMA/sARIMA/VARIMA, I donβt know any options to estimate an ARFIMA yet (only to simulate).
Sometimes when Iβm feeling greedy I code it up on my own & submit a PR β¦
If youβre okay with writing a little code on your own and are treating the white noise forcing as Gaussian, then the spectral densities of (AR)(F)(I)(MA) processes are all pretty direct to work out and would only take a few lines of code to write. You could then write a Whittle-type likelihood approximation (or the βdebiasedβ alteration) in just a few more lines of code, which you could then plop into any optimizer you wanted.
Alternatively, presumably it would be possible to use your spectral density and with a few more intermediate calculations plug in to @willtebbutt TemporalGPs package. I have never used it, though, and so maybe Iβm wrong about that.