Table of Contents
Fetching ...

LongMemory.jl: Generating, Estimating, and Forecasting Long Memory Models in Julia

J. Eduardo Vera-Valdés

TL;DR

LongMemory.jl addresses the need for a cohesive, high-performance toolkit for long-memory time series in Julia by delivering generation, estimation, and forecasting capabilities across fractional differencing, cross-sectional aggregation, and stochastic duration shocks. It integrates classic, semiparametric, and parametric estimators—such as the log-variance, rescaled range, GPH, bias-reduced LPR, Local and Exact Local Whittle, MLEs, and HAR—and provides forecasting functions and plotting utilities, all implemented in a single language for accessibility and speed. A key contribution is the first publicly available implementations of cross-sectional aggregation generation and stochastic-duration shocks in any language, reinforced by extensive benchmarks showing substantial speed advantages over existing software. The package includes data sets and notebooks to facilitate practical use, making LongMemory.jl a versatile tool for researchers and practitioners working with long-memory dynamics in finance, economics, climate, and beyond.

Abstract

LongMemory.jl is a package for time series long memory modelling in Julia. The package provides functions to generate long memory, estimate model parameters, and forecast. Generating methods include fractional differencing, stochastic error duration, and cross-sectional aggregation. Estimators include the classic ones used to estimate the Hurst effect, those inspired by log-periodogram regression, and parametric ones. Forecasting is provided for all parametric estimators. Moreover, the package adds plotting capabilities to illustrate long memory dynamics and forecasting. This article presents the theoretical developments for long memory modelling, show examples using the data included with the package, and compares the properties of LongMemory.jl with current alternatives, including benchmarks. For some of the theoretical developments, LongMemory.jl provides the first publicly available implementation in any programming language. A notable feature of this package is that all functions are implemented in the same programming language, taking advantage of the ease of use and speed provided by Julia. Therefore, all code is accessible to the user. Multiple dispatch, a novel feature of the language, is used to speed computations and provide consistent calls to related methods. The package is related to the R packages LongMemoryTS and fracdiff.

LongMemory.jl: Generating, Estimating, and Forecasting Long Memory Models in Julia

TL;DR

LongMemory.jl addresses the need for a cohesive, high-performance toolkit for long-memory time series in Julia by delivering generation, estimation, and forecasting capabilities across fractional differencing, cross-sectional aggregation, and stochastic duration shocks. It integrates classic, semiparametric, and parametric estimators—such as the log-variance, rescaled range, GPH, bias-reduced LPR, Local and Exact Local Whittle, MLEs, and HAR—and provides forecasting functions and plotting utilities, all implemented in a single language for accessibility and speed. A key contribution is the first publicly available implementations of cross-sectional aggregation generation and stochastic-duration shocks in any language, reinforced by extensive benchmarks showing substantial speed advantages over existing software. The package includes data sets and notebooks to facilitate practical use, making LongMemory.jl a versatile tool for researchers and practitioners working with long-memory dynamics in finance, economics, climate, and beyond.

Abstract

LongMemory.jl is a package for time series long memory modelling in Julia. The package provides functions to generate long memory, estimate model parameters, and forecast. Generating methods include fractional differencing, stochastic error duration, and cross-sectional aggregation. Estimators include the classic ones used to estimate the Hurst effect, those inspired by log-periodogram regression, and parametric ones. Forecasting is provided for all parametric estimators. Moreover, the package adds plotting capabilities to illustrate long memory dynamics and forecasting. This article presents the theoretical developments for long memory modelling, show examples using the data included with the package, and compares the properties of LongMemory.jl with current alternatives, including benchmarks. For some of the theoretical developments, LongMemory.jl provides the first publicly available implementation in any programming language. A notable feature of this package is that all functions are implemented in the same programming language, taking advantage of the ease of use and speed provided by Julia. Therefore, all code is accessible to the user. Multiple dispatch, a novel feature of the language, is used to speed computations and provide consistent calls to related methods. The package is related to the R packages LongMemoryTS and fracdiff.
Paper Structure (30 sections, 28 equations, 6 figures, 1 table)

This paper contains 30 sections, 28 equations, 6 figures, 1 table.

Figures (6)

  • Figure 1: Nile River minima (top), its autocorrelation function (bottom left), and log-periodogram (bottom right).
  • Figure 2: Fractionally differenced data (left), and its sample autocorrelation function together with the theoretical one (right).
  • Figure 3: Theoretical and sample autocorrelation functions of cross-sectional aggregated data.
  • Figure 4: Data generated using the stochastic duration shocks model (top left), its sample autocorrelation function (top right), log-periodogram (bottom left), and log-variance plot (bottom right).
  • Figure 5: Variance plot for the Nile River data.
  • ...and 1 more figures