Metadata-Version: 2.4
Name: connectedness
Version: 0.1.0a0
Summary: Diebold-Yilmaz connectedness and volatility spillover indices in Python.
Project-URL: Homepage, https://github.com/franrolotti/connectedness
Project-URL: Repository, https://github.com/franrolotti/connectedness
Project-URL: Issues, https://github.com/franrolotti/connectedness/issues
Author: Francisco Rolotti
License: MIT License
        
        Copyright (c) 2026 Francisco Rolotti
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: connectedness,diebold-yilmaz,econometrics,mhar,realized-covariance,spillovers,volatility
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: numpy>=1.26
Requires-Dist: pandas>=2.1
Requires-Dist: scikit-learn>=1.4
Requires-Dist: scipy>=1.11
Requires-Dist: statsmodels>=0.14
Provides-Extra: dev
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pyarrow>=15; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocs>=1.6; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'docs'
Provides-Extra: io
Requires-Dist: pyarrow>=15; extra == 'io'
Provides-Extra: parallel
Requires-Dist: joblib>=1.3; extra == 'parallel'
Requires-Dist: tqdm>=4.66; extra == 'parallel'
Provides-Extra: plots
Requires-Dist: matplotlib>=3.8; extra == 'plots'
Description-Content-Type: text/markdown

# 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

```bash
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

```python
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:

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

## Methodology

See [`docs/methodology.md`](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

```bibtex
@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`](LICENSE).
