INNER CODE UNIT · Python

pacf_coeffs

firmai/deltapy · deltapy/extract.py:181

        pacf_coeffs = pacf_coeffs + [np.nan] * max(0, (max_demanded_lag - max_lag))

    return [("lag_{}".format(lag["lag"]), pacf_coeffs[lag["lag"]]) for lag in param]

# partial_autocorrelation(df["Close"])

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#-> In Package
def augmented_dickey_fuller(x, param=[{"attr": "teststat"}]):

    res = None
    try:
        res = adfuller(x)
    except LinAlgError:
        res = np.NaN, np.NaN, np.NaN
    except ValueError: # occurs if sample size is too small
        res = np.NaN, np.NaN, np.NaN

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…