Skip to main content

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

Anaconda Version PyPI version

Continuous Integration

Build Status Anaconda-Server Badge Downloads Anaconda-Server Badge

Documentation

Documentation Status

Coverage

Coverage Status

Installing

Install and update using pip and on conda.

# conda
conda install -c conda-forge copulae 
# PyPI
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)  # simulate random number

# getting parameters
p = cop.params
# cop.params = ...  # you can override parameters too, even after it's fitted!  

# get a summary of the copula. If it's fitted, fit details will be present too
cop.summary()

# overriding parameters, for Elliptical Copulae, you can override the correlation matrix
cop[:] = np.eye(8)  # in this case, this will be equivalent to an Independent Copula

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.

Elements of Copula Modeling with R

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.

Blogpost from Thomas Wiecki

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

  • Set up package for pip and conda installation
  • More documentation on usage and post docs on rtd (Permanently in the works 😊)
  • Elliptical Copulas
    • Gaussian (Normal)
    • Student (T)
  • Implement in Archimedean copulas
    • Clayton
    • Gumbel
    • Frank
    • Empirical
    • Joe
    • AMH
    • Rho finding via Cubatures
  • Mixture copulas
    • Gaussian Mixture Copula
    • Generic Mixture Copula
    • Marginal Copula
  • Vine Copulas
  • Copula Tests
    • Radial Symmetry
    • Exchangeability
    • Goodness of Fit
      • Pairwise Rosenblatt
      • Multi-Independence
      • General GOF
    • Model Selection
      • Cross-Validated AIC/BIC

Metadata

Release files for copulae 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for copulae 0.8.0
File Size Uploaded
copulae-0.8.0.tar.gz 803.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for copulae 0.8.0
File
copulae-0.8.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
copulae-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
copulae-0.8.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
copulae-0.8.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
copulae-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
copulae-0.8.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
copulae-0.8.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
copulae-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
copulae-0.8.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
copulae-0.8.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
copulae-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
copulae-0.8.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 21.6 MB

Release files / copulae-0.8.0.tar.gz

Download URL copulae-0.8.0.tar.gz
Size 803.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4683573d59cb07d63e2b7d4643c19890dd806b03ce48db75ec6a5389039514f8
BLAKE2b-256 checksum
How to use checksums
e7997566f480021ac5d705567db113f84fd8bca9abcad6369ed0fbea4089b320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp313-cp313-win_amd64.whl

Download URL copulae-0.8.0-cp313-cp313-win_amd64.whl
Size 1.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
7252354fa59948b0770b9c6da0c7994516bb828843f8763bc84c3dc8519d762f
BLAKE2b-256 checksum
How to use checksums
908e92d55d73c79e2c9e7ca8031dad40f1b47ba56b2f9464817dd8a7c386bba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL copulae-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cf33ea2bb9b1fb98f9db4a116aa3b781c8410f150e58ac4f8ca6ab87d800755a
BLAKE2b-256 checksum
How to use checksums
dccef78fde618807d79f3f54fa7f12ccbafdbc06105966e6636aa5df4dd6c9cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL copulae-0.8.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9d025f721640564b5844e1bec8933b7bfa07117daed5af1d2c2eef48f5af2cae
BLAKE2b-256 checksum
How to use checksums
6167425341d91101ba1fa2a1ff30a25ec685fcece2f29c229db3099665d1441f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp312-cp312-win_amd64.whl

Download URL copulae-0.8.0-cp312-cp312-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b73fdb37be30f892387624fa1b6bc0ca7da1b6dd1f0ffe3aea7ef42eec134ebd
BLAKE2b-256 checksum
How to use checksums
347fdee7853339e5898760024f3f07307043d674fe769574a81a70d39ac4645b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL copulae-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
001ec42e4473ade21d1a675c774c14b0e123f94d5eda6d36f0f524a124224257
BLAKE2b-256 checksum
How to use checksums
2e6f3ee29b531ad55ba3d5bbe131d1dde3012ab182bf4e51bba9512030c30e55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL copulae-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5d4690ed1abc7f968c2618807f4eae6e4844728e23744464f0ba6cd2a96deeb5
BLAKE2b-256 checksum
How to use checksums
35d65527103c53cc9986a6ed7623a847558b959baa54307c5ab1f4de2fbcc4af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp311-cp311-win_amd64.whl

Download URL copulae-0.8.0-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
579dc5c8ac1cecb45976ba8139789019d8da663bbd3fd280569fa99cacf27321
BLAKE2b-256 checksum
How to use checksums
48e8c437728de774e0fafb6dcb3951a42e2681df067ae10ec5a92c51b6f2c293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL copulae-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
2a39592d2518b6b3885e4010507cf31cb32983d421d1e893e7e65b19d1b8175c
BLAKE2b-256 checksum
How to use checksums
c4a08ef941099f85e1926e060d7c72961d52dc242e7dd58b53bb5c06d2ca52a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL copulae-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b45553453b2722026555dc0d1c782cdb76ba0344e5b087cda3d7e425d924506b
BLAKE2b-256 checksum
How to use checksums
94f56b66594adb3bc2ae0bf77731eb2a1032da47497e60548379ce55ac68c379
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp310-cp310-win_amd64.whl

Download URL copulae-0.8.0-cp310-cp310-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
bd2b4c5f1a681f162029e1f25bb50c67e42232c6a40daeedaeb9095fc758513b
BLAKE2b-256 checksum
How to use checksums
11696be58e9eadf70c59cafe70591eb256622634a4e90b61be5a0854d77d7c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL copulae-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
74a861ca2c1072897a71f9a733dc13e84e78f5674c00f22e95c9d611d3a6ea52
BLAKE2b-256 checksum
How to use checksums
1ef1b6adb82efeea2969369e7cb30a428208921dd7b0bfaf44136248dc51e40e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / copulae-0.8.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL copulae-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0c1d114e40e81d96e687d56e8eda8a74077193a2b429b61386adc69337fadc04
BLAKE2b-256 checksum
How to use checksums
eec59ed09fd7b974908ac289dd88d5fcab61c438253a563aced0727f83176d96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.8.0 This release

13 release files

0.7.9

13 release files

0.7.8

13 release files

0.7.3

13 release files

0.7.2

13 release files

0.7.1

13 release files

0.6.0

10 release files

0.5.2

9 release files

0.5.1

7 release files

0.5.0

5 release files

0.4.3

10 release files

0.4.2

7 release files

0.4.1

7 release files

0.4.0

7 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page