Examples#

This gallery walks through every public feature of financialkit.time_series: the stylized facts of returns, tests of the random walk, ARMA models and order selection, unit roots and cointegration, long memory, and conditional-volatility models. Each script illustrates one dated breakthrough from the history page. All data are synthetic and seeded; no market data is downloaded.

See also the narrative tutorial:

Each script in this gallery is self-contained and can be run directly with python examples/time_series/<section>/<script>.py.

Sections#

  • linear_models – Yule’s autoregression, Box-Jenkins ARMA and Akaike’s information criterion.

  • long_memory – Hurst’s rescaled range.

  • efficiency – Kendall’s serial correlations, Fama’s runs test, the Ljung-Box portmanteau test and Lo-MacKinlay variance ratios.

  • stylized_facts – Mandelbrot’s fat tails and the Hill tail index.

  • unit_roots – the Dickey-Fuller test and Engle-Granger cointegration.

  • volatility – Parkinson’s range, ARCH, GARCH, EGARCH, GJR-GARCH, RiskMetrics EWMA and realized volatility.

Market efficiency#

Testing the random walk: serial correlation, runs, portmanteau statistics and variance ratios.

Kendall: the random walk of prices

Kendall: the random walk of prices

Fama’s runs test

Fama's runs test

Ljung-Box portmanteau test

Ljung-Box portmanteau test

Lo-MacKinlay variance ratio

Lo-MacKinlay variance ratio

Linear models#

From Yule’s disturbed pendulum to Box-Jenkins ARMA and Akaike’s criterion.

Yule’s autoregression

Yule's autoregression

Box-Jenkins ARMA

Box-Jenkins ARMA

Akaike information criterion

Akaike information criterion

Long memory#

Hurst’s rescaled range and fractional Gaussian noise.

Hurst exponent

Hurst exponent

Stylized facts#

Fat tails and the tail index.

Mandelbrot: fat tails

Mandelbrot: fat tails

Hill tail index

Hill tail index

Unit roots and cointegration#

The Dickey-Fuller distribution and the Engle-Granger two-step test.

Dickey-Fuller unit roots

Dickey-Fuller unit roots

Engle-Granger cointegration

Engle-Granger cointegration

Volatility#

Range-based and realized volatility, and the ARCH family of conditional-variance models.

Parkinson’s range volatility

Parkinson's range volatility

Engle’s ARCH

Engle's ARCH

Bollerslev’s GARCH

Bollerslev's GARCH

Nelson’s EGARCH

Nelson's EGARCH

Glosten-Jagannathan-Runkle

Glosten-Jagannathan-Runkle

RiskMetrics EWMA

RiskMetrics EWMA

Andersen-Bollerslev realized volatility

Andersen-Bollerslev realized volatility

Gallery generated by Sphinx-Gallery