# \[ANN\] VineCopulas.jl: C-vines, D-vines, and experimental R-vines in Julia

**URL:** <https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930>\
**Category:** Package Announcements\
**Tags:** announcement, statistics, packages, probability, copula\
**Created:** [July 3, 2026, 9:11pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930 "2026-07-03T21:11:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [July 3, 2026, 9:11pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/1 "2026-07-03T21:11:25Z")

</div>

Hi everyone,

I’m happy to announce that **VineCopulas.jl** is now registered in the Julia General registry.

VineCopulas.jl is a pure-Julia package for explicit vine copula models, built on top of **Copulas.jl**. The current release focuses on constructing vine copulas from bivariate pair-copulas, evaluating densities, simulating observations, and working with Rosenblatt and inverse Rosenblatt transforms.

Package installation:

```julia-auto
using Pkg
Pkg.add("VineCopulas")

```

Documentation:

> **[VineCopulas.jl](https://santymax98.github.io/VineCopulas.jl/stable/)**
>
> Documentation for VineCopulas.jl

Repository:

> **[GitHub - Santymax98/VineCopulas.jl: Extensible C-vine, D-vine, and R-vine copula...](https://github.com/Santymax98/VineCopulas.jl)**
>
> Extensible C-vine, D-vine, and R-vine copula models for Julia, built on Copulas.jl.

The current version includes:

- stable `CVineCopula` and `DVineCopula` model types;
- experimental `RVineCopula` support for explicit structures;
- `pdf`, `logpdf`, `rand`, numerical `cdf`, and `simulate_qmc`;
- Rosenblatt and inverse Rosenblatt transforms;
- truncated C-vines and D-vines;
- pair-copula conditional primitives: `hfunc1`, `hfunc2`, `hinv1`, and `hinv2`;
- model summaries such as `loglikelihood`, `npars`, `aic`, and `bic`;
- reproducible benchmark and validation scripts against `rvinecopulib`.

This is an early release, so feedback, bug reports, suggestions, and contributions are very welcome.

One important note: `VineCopulas.jl` is currently focused on explicit vine construction and simulation/transform workflows. It does not yet provide automatic structure selection, family selection, or parameter estimation. These are planned for future versions.

Thanks to the Julia copula ecosystem, especially Copulas.jl, which made it much easier to build this package in a modular way.

---

<div class="post-metadata">

**Author:** ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Post date:** [July 5, 2026, 5:53am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/2 "2026-07-05T05:53:13Z")

</div>

What a large effort, GG @Santymax98 !

I will be taking a look as soon as I can 🙂

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [July 5, 2026, 11:42am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/3 "2026-07-05T11:42:51Z")

</div>

Thank you @lrnv! I really appreciate it.

Any comments, suggestions, or feedback would be very welcome once you have the chance to take a look 😁😁

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [July 5, 2026, 5:21pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/4 "2026-07-05T17:21:43Z")

</div>

This is awesome, i’ve been waiting for something like this to implement synthetic data priors for PortfolioOptimisers.jl

Looks like there are plans to fit parameters and select copula families/dependence structure so I’ll hold off on it until then.

Also, sick logo, what did you use to design it?

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [July 5, 2026, 7:36pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/5 "2026-07-05T19:36:14Z")

</div>

Thanks a lot! I really appreciate the kind words.

That sounds like a very nice use case. I’m actually already working on the first tests for parameter fitting, family selection, and dependence-structure selection, with quite promising results so far. I’m also trying to optimize things as much as possible, because I’d like VineCopulas.jl to be competitive and genuinely useful in practice.

And thanks about the logo! I made it in Canva 🤣🤣

I’m not a great designer but Canva with AI is very util and intuitive…

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [August 14, 2026, 5:47pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/6 "2026-08-14T17:47:39Z")

</div>

Hi Santy, has there been much progress on this front? I’m chomping at the bit at finally having this functionality, and already thinking of all the other features it would unlock. Especially with the help of a clanker or two.

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [August 14, 2026, 6:27pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/8 "2026-08-14T18:27:01Z")

</div>

Hi! Yes — there has actually been quite a bit of progress on that front. We now have a much cleaner fitting/selection interface taking shape, and I’m finishing up the first usable version before pushing it to the repository.

The idea is that you’ll be able to go essentially from data to a fitted vine without having to manually specify every pair-copula: parameter estimation, family selection, and eventually the dependence structure itself will be handled by the fitting layer. Once fitted, it will integrate directly with the existing simulation interface, so generating synthetic samples should be straightforward 😄

---

<div class="post-metadata">

**Author:** ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Post date:** [August 14, 2026, 6:51pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/9 "2026-08-14T18:51:36Z")

</div>

I’m having a hard time understanding what vine copulas are and how I can use them. This seems to be a tool only used by statisticians, but since I am already using Copulas.jl in engineering I would like to also explore this. Any reference you can recommend?

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [August 14, 2026, 7:04pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/11 "2026-08-14T19:04:54Z")

</div>

Thanks for asking! I think this is actually a sign that I should add a more intuitive introduction to the docs 😅

The basic idea is that vine copulas let you build a flexible multivariate dependence model from bivariate copulas. Instead of assuming one copula family describes the dependence among all variables, different pairs (including conditional relationships) can use different families. This is particularly useful when dependencies have different asymmetries or tail behavior.

A great starting point is Aas et al. (2009), “Pair-copula constructions of multiple dependence.” For a more complete treatment, I’d recommend Claudia Czado’s Analyzing Dependent Data with Vine Copulas.

Since you’re already using Copulas.jl in engineering, I’d also be very interested to hear about your use case it might actually make a nice practical example for the VineCopulas.jl docs.

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [August 14, 2026, 7:38pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/12 "2026-08-14T19:38:45Z")

</div>

That all but nullifies most of the work i was planning on doing. It’s essentially gonna be plug and play. That’s sick.

I shall sit here with my mouth shut and wait.

---

<div class="post-metadata">

**Author:** ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Post date:** [August 14, 2026, 10:43pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/13 "2026-08-14T22:43:40Z")

</div>

Cool! That does seem very useful 🙂

> [@Santymax98](#):
>
> Since you’re already using [Copulas.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/Copulas) in engineering, I’d also be very interested to hear about your use case it might actually make a nice practical example for the [VineCopulas.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/VineCopulas) docs.

I’m modelling power systems with significant penetration of renewables. In such systems, the output of adjacent wind or solar farms are strongly correlated. One way to describe that correlation is using Copulas.jl 🙂 Here’s a transactions paper on the topic: [https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8004519](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8004519)

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [August 17, 2026, 2:08am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/14 "2026-08-17T02:08:48Z")

</div>

Haha, you can stop waiting now 😄

`VineCopulas.jl v0.1.2` is now registered and available.

The fitting/selection layer is in: pair-copula parameter estimation, automatic family and rotation selection, and automatic C-vine, D-vine, and R-vine structure selection are now part of the public API.

Fitted vines integrate directly with the existing simulation interface, so the workflow you had in mind for synthetic priors should now be much closer to plug-and-play.

I also spent some time improving the internals before releasing it — in particular reducing allocations, fusing pair-copula evaluation kernels, and speeding up Student-t conditionals.

I’d really like to see how it behaves inside `PortfolioOptimisers.jl`. If you run into anything awkward in the API or anything missing for that use case, please open an issue — that kind of downstream integration is exactly what I want to support.

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [August 17, 2026, 2:17am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/15 "2026-08-17T02:17:55Z")

</div>

Thanks, this is actually a really nice use case — and thanks for sharing the paper 🙂

The multi-site wind/solar setting seems like a very natural application for vine copulas, especially when different pairs may have different dependence or tail behaviour.

With `VineCopulas.jl v0.1.2`, the workflow could now be roughly:

`historical renewable outputs → fitted vine → correlated scenarios → power-system model`

If you have a public dataset or a representative example, I’d be very interested in trying to build a small documentation example around it.

---

<div class="post-metadata">

**Author:** ![Santymax98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santymax98/32/211772_2.png) [@Santymax98](https://discourse.julialang.org/u/Santymax98)\
**Post date:** [August 17, 2026, 2:31am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/16 "2026-08-17T02:31:25Z")

</div>

Quick update: **VineCopulas.jl v0.1.2 is now available** 🎉

Since the original announcement, the package has grown quite a bit. The public API now includes:

- pair-copula parameter fitting,
- automatic family and rotation selection,
- automatic structure selection for **C-vines** , **D-vines** , and **general R-vines**.

So you can now go from pseudo-observations to a fitted vine model directly, and then reuse that model for simulation and downstream workflows.

For example:

```julia
model = fit(
    RVineCopula,
    U;
    family_set = :default,
    selection_criterion = :bic,
    tree_criterion = :tau,
    tree_algorithm = :kruskal,
)

Unew = rand(model, 10_000)

```

Internally, `v0.1.2` also includes a fair amount of performance work:

- fused pair-copula kernels,
- reusable work buffers in vine traversals,
- generic fallback through `Copulas.condition`,
- and substantially faster Student-t conditional evaluation.

So this release is not only broader in functionality, but also noticeably better on the performance side.

A few people in this thread mentioned interesting downstream applications — such as portfolio optimisation and renewable-power dependence modelling — and I’d be very happy to hear how the package behaves in those settings.

As always, feedback, issues, and suggestions are very welcome.

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [August 18, 2026, 8:06am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/17 "2026-08-18T08:06:32Z")

</div>

This is awesome. I was looking at the docs and haven’t seen anything regarding conditional simulation. That’s pretty important for stress testing extreme scenarios. For example once you have a fitted model, produce a simulation where variable (or variables) i \in (a, b), or i \gtreqless a, where a could be a scalar or a vector (thus letting users define disjoint sets with regions without samples for variable i), for an arbitrary number of constraints. This would generate pseudo observations matching the dependence structure under those constraints.

[This](https://skfolio.org/auto_examples/synthetic_data/plot_2_vine_copula.html) is probably the best example i’ve seen. It has a high level API, but as long as there is a low level (index based) api that can constrain and define/find variables as central, then a high level wrapper can me made. They also have other interesting additions like extra dependence structures and inference methods.

This extra capability wouldn’t only have portfolio optimisation as potential applications, but any sort of extreme scenario simulation where complex interactions are in place. Disaster modelling comes to mind, “what if rainfall is x times greater than the mean”, or “what if the part’s failure rate is 5 times greater than anticipated” kind of model.

I think having something like this could make VineCopulas.jl the go-to for this type of work.

---

<div class="post-metadata">

**Author:** ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Post date:** [September 12, 2026, 11:26am UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/18 "2026-09-12T11:26:44Z")

</div>

@dcelisgarza In Copulas.jl, on which VineCopulas.jl is based, there is currently an interface for this:

```julia
using Copulas

C = ClaytonCopula{3}(0.7) # trivariate copula
X1, X2, X3 = Normal(0,1), LogNormal(0,1), Gamma(1,2)
X = SklarDist(C, (X1,X2,X3)) # multivariate random vector

Y = condition(X, 2, 0.7) # distribution of (X1, X3) | X2 = 0.7
Z = condition(X, (1,2), (-0.3, 0.7)) # distributon of X3 | X1=-0.3, X2 = 0.7

```

and then `X` and `Y` behave as normal distributions from `Distributions.jl`. All our rosenblatt mechanisme is based on this.

@Santymax98 will confirm this, but i think Vines do comply with this interface

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [September 12, 2026, 12:03pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/19 "2026-09-12T12:03:17Z")

</div>

Is there a way to constrain them to be inequalities as well? That would essentially allow me to implement the feature. Especially for defining disjoint sets which are super useful for stress testing optimisation procedures.

---

<div class="post-metadata">

**Author:** ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Post date:** [September 12, 2026, 12:12pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/20 "2026-09-12T12:12:13Z")

</div>

There is, even without conditioning:

\mathbb P(X \le x | Y \le y) = \frac{\mathbb P(X \le x, Y \le y)}{\mathbb P(Y \le y)}

which can simply be implemented as `cdf(XY, [x,y]) / cdf(Y, y)`.

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [September 12, 2026, 12:24pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/21 "2026-09-12T12:24:45Z")

</div>

And the other side of the inequality can be obtained by

\mathbb{P}(-X \leq -x)

Disjoint sets by composition or multiplication?

---

<div class="post-metadata">

**Author:** ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Post date:** [September 12, 2026, 12:26pm UTC](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930/22 "2026-09-12T12:26:00Z")

</div>

Dificult to understadn what you need ? If you need

\mathbb P(X \> x)

then its simply `ccdf` ?

[Next page](https://discourse.julialang.org/t/ann-vinecopulas-jl-c-vines-d-vines-and-experimental-r-vines-in-julia/137930.md?page=2)
