Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Copula Bivariate Joe Functionality #385

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imustitanveer
Copy link

Description

This pull request adds a new copula class, Joe, to the Copulas library. The Joe copula is a popular copula function used in statistics and financial modeling. It is characterized by its ability to model positive dependence in the upper tails and negative dependence in the lower tails.

The Joe copula is defined by its generator function and probability density function, which are implemented in this pull request. The generator function calculates the inverse of the copula's cumulative distribution function (CDF), while the probability density function computes the joint probability density of two random variables.

This implementation follows the conventions and coding style of the Copulas library and includes detailed explanations of each method and its mathematical underpinnings. The Joe copula is a valuable addition to the library, providing users with a flexible tool for modeling various types of dependence structures in their data.

Changes Made

  • Added a new class Joe to the copulas.bivariate module.
  • Implemented the generator function, probability density function, and inverse conditional CDF for the Joe copula.
  • Included detailed explanations and docstrings for each method.

Example Usage

from copulas.bivariate import Joe

# Create a Joe copula instance
joe_copula = Joe(theta=1.5)

# Fit the copula to data
joe_copula.fit(data)

# Generate samples from the copula
samples = joe_copula.sample(1000)

# Compute the probability density at a given point
density = joe_copula.pdf([[0.5, 0.5]])

# Compute the cumulative distribution at a given point
cdf = joe_copula.cdf([[0.5, 0.5]])

# Compute the inverse conditional cumulative distribution
percent_point = joe_copula.percent_point(0.5, 0.3)

Testing

  • Added unit tests to ensure the correctness of the Joe copula implementation.
  • Tested the copula against known theoretical results and empirical data.

This pull request is ready for review and inclusion in the Copulas library. Thank you for considering this contribution.


@imustitanveer imustitanveer requested a review from a team as a code owner March 14, 2024 15:26
@imustitanveer imustitanveer requested review from amontanez24 and removed request for a team March 14, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant