Copulae
Probably the second most popular copula package in Python. 😣
Copulae is a package used to model complex dependency structures. Copulae implements common and popular copula
structures to bind multiple univariate streams of data together. All copula implemented are multivariate by default.
Versions
Continuous Integration
Documentation
Coverage
Installing
Install and update using pip and on conda.
conda install -c conda-forge copulae
pip install -U copulae
Documentation
The documentation is located at https://copulae.readthedocs.io/en/latest/. Please check it out. :)
Simple Usage
from copulae import NormalCopula
import numpy as np
np.random.seed(8)
data = np.random.normal(size=(300, 8))
cop = NormalCopula(8)
cop.fit(data)
cop.random(10)
p = cop.params
cop.summary()
cop[:] = np.eye(8)
Most of the copulae work roughly the same way. They share pretty much the same API. The difference lies in the way they are parameterized. Read the docs to learn more about them. 😊
Acknowledgements
Most of the code has been implemented by learning from others. Copulas are not the easiest beasts to understand but here are some items that helped me along the way. I would recommend all the works listed below.
I referred quite a lot to the textbook when first learning. The authors give a pretty thorough explanation of copula from ground up. They go from describing when you can use copulas for modeling to the different classes of copulas to how to fit them and more.
This blogpost gives a very gentle introduction to copulas. Before diving into all the complex math you'd find in textbooks, this is probably the best place to start.
Motivations
I started working on the copulae package because I couldn't find a good existing package that does multivariate copula modeling. Presently, I'm building up the package according to my needs at work. If you feel that you'll need some features, you can drop me a message. I'll see how I can schedule it. 😊
TODOS