LongMemoryEstimate#
- class cultivars.diagnostics.long_memory.LongMemoryEstimate(*, statistic, pvalue, d, se, null_d, method, bandwidth, nobs)[source]
Bases:
_HypothesisTestA semiparametric estimate of the fractional differencing parameter, with a test.
The record is an estimate first,
dandse, and a test second. Each of the three estimators is asymptotically normal in the bandwidth \(m\),\[\sqrt{m}\,(\hat d - d) \;\xrightarrow{d}\; \mathcal{N}\!\left(0,\; \tfrac{1}{4}\right) \quad\text{(local and exact local Whittle)}, \qquad \mathcal{N}\!\left(0,\; \tfrac{\pi^2}{24}\right) \quad\text{(GPH)},\]so
statisticis \((\hat d - d_0) / \widehat{se}\) andpvalueits two-sided standard normal p-value, with \(d_0 = 0\), no long memory, as built;test()re-aims it at any other null, \(1/2\) for the stationarity boundary or \(1\) for a unit root, without re-estimating. Standard errors are asymptotic in the bandwidth and do not see the short-run dynamics the estimator ignores, so the reader should expect them to be mildly optimistic: on 500 observations the nominal 95% interval covers about 90 to 94% of the time, dipping to the low 80s for exact local Whittle near \(d = 1/2\), where its mean correction switches regime.- Variables:
d – The estimate.
se – Its asymptotic standard error.
statistic –
(d - null_d) / se.pvalue – Two-sided standard normal p-value.
null_d – The value of
dunder test.method –
"gph","local_whittle"or"exact_local_whittle".bandwidth – Fourier frequencies used,
m.nobs – Observations.
Note
The three canonical nulls sit in the summary table together, so
print(est)answers “no long memory”, “stationary”, and “unit root” at once. Becausestatisticandpvalueare always againstnull_d,reject()on a freshly built record is the test of \(d = 0\); callest.test(1.0).reject()for the unit-root question. The local Whittle estimator’s limit theory holds only for \(d < 3/4\) and its optimizer is bounded above at one, so an estimate at the bound is a signal to switch to exact local Whittle, which the table says.See also
gph(),local_whittle(),exact_local_whittle()– the three producers.adf()– the integer alternative, which cannot tell \(d = 1\) from \(d = 0.7\).ARFIMA– the parametric estimate of \(d\) jointly with a short-run model.
References
Geweke, J., & Porter-Hudak, S. (1983). The estimation and application of long memory time series models. Journal of Time Series Analysis, 4(4), 221-238.
Robinson, P. M. (1995). Gaussian semiparametric estimation of long range dependence. Annals of Statistics, 23(5), 1630-1661.
Shimotsu, K., & Phillips, P. C. B. (2005). Exact local Whittle estimation of fractional integration. Annals of Statistics, 33(4), 1890-1933.
Example
A random walk is \(d = 1\): the estimate rejects no long memory and keeps a unit root, and the interval covers one:
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> est = exact_local_whittle(np.cumsum(rng.standard_normal(500))) >>> est.method, round(est.d, 4), round(est.se, 4), est.bandwidth ('exact_local_whittle', 1.059, 0.0668, 56) >>> est.reject(), est.test(1.0).reject(), est.is_stationary (True, False, False) >>> low, high = est.confidence_interval() >>> bool(low < 1.0 < high) True
Private methods#
|
Assemble the record with the |
Render as a table with the three canonical nulls. |