Skip to main content

Diebold-Yilmaz connectedness and volatility spillover indices in Python.

Project description

connectedness

Diebold-Yilmaz connectedness and volatility spillover indices in Python.

connectedness turns a panel of asset prices into a fully reproducible spillover analysis: realized covariance and semicovariance matrices, optional PIT normality transform, MHAR-LASSO dynamics, generalized FEVD (Koop-Pesaran-Shin), and the static and rolling-window spillover indices of Diebold and Yilmaz.

Status

Alpha. The API may change before 1.0.0.

Installation

pip install connectedness            # core
pip install connectedness[plots]     # + matplotlib helpers
pip install connectedness[parallel]  # + joblib/tqdm for rolling windows
pip install connectedness[io]        # + pyarrow for parquet I/O

Quickstart

import pandas as pd
from connectedness import SpilloverPipeline

# wide DataFrame: DatetimeIndex (intraday) × markets
prices = pd.read_parquet("prices.parquet")

result = (
    SpilloverPipeline(prices)
    .compute_returns()
    .compute_realized_measures()
    .auto_pit()
    .fit_static()
    .fit_rolling(window=365)
    .run()
)

print(result.tsi)              # total spillover index (%)
print(result.directional_to)   # contributions TO others
print(result.directional_from) # contributions FROM others
print(result.rolling_tsi)      # rolling TSI time series

For the underlying primitives:

from connectedness import (
    simple_returns,
    realized_covariance,
    realized_semicov,
    pit_transform,
    static_spillover,
    rolling_spillover,
)

Methodology

See docs/methodology.md for the formal definitions of realized (semi)covariance, the MHAR-LASSO specification, the generalized variance decomposition, and the Diebold-Yilmaz total / directional / net spillover indices.

Citation

@software{connectedness,
  author  = {Rolotti, Francisco},
  title   = {connectedness: Diebold-Yilmaz spillover indices in Python},
  year    = {2026},
  url     = {https://github.com/franrolotti/connectedness}
}

See also CITATION.cff.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

connectedness-0.1.0a0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

connectedness-0.1.0a0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file connectedness-0.1.0a0.tar.gz.

File metadata

  • Download URL: connectedness-0.1.0a0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for connectedness-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 81a9146582ae49993fe85e7e427d391a62bd48644c21f5d283b62681e903a4b6
MD5 54672458971abc43d02ac32e2d2cd269
BLAKE2b-256 84d3720941232a1805627175a79de9b3127c418af555d8c57bbecb45ce56f124

See more details on using hashes here.

Provenance

The following attestation bundles were made for connectedness-0.1.0a0.tar.gz:

Publisher: publish.yml on franrolotti/connectedness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file connectedness-0.1.0a0-py3-none-any.whl.

File metadata

  • Download URL: connectedness-0.1.0a0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for connectedness-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 88841fc7c66c2af957837582ceba6b8faf9a5320039cf5b6e7d35660f9469b6b
MD5 5306e07453d19ffe22d43dab37a6806b
BLAKE2b-256 763cbfe21c106b8967106ad125fcda4d49f98e870cee4f2c493edc846c73654a

See more details on using hashes here.

Provenance

The following attestation bundles were made for connectedness-0.1.0a0-py3-none-any.whl:

Publisher: publish.yml on franrolotti/connectedness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page