Rscopulas gives you a NumPy-first Python API and a Rust library for fitting, evaluating, and sampling copula models on pseudo-observations. The Rust core powers both interfaces, delivering up to ~100× speedup over R's copula/VineCopula stack on some workloads — without sacrificing ergonomics.

Why rscopulas is better

  • Blazing fast. Up to ~100× faster than the R standard — turn overnight fits into coffee breaks.
  • Every copula you need. Gaussian, Student t, Archimedean, Khoudraji, full vine families, and hierarchical models — all in one library.
  • Python simplicity, Rust power. Prototype in a notebook, ship to production, never rewrite a line.
  • Results you can trust. Every fit comes with the diagnostics you need to defend it, out of the box.

What you can do with rscopulas

Rscopulas supports the full copula workflow: transform your raw data to pseudo-observations, choose a copula family, fit to data, evaluate log-density, and draw samples.

Key features

  • ~100× faster log_pdf on vine workloads versus R's VineCopula
  • Python and Rust — same Rust core, two idiomatic APIs
  • Validated inputs — strict (0, 1) pseudo-observation checks with clear error messages
  • Fit diagnostics — log-likelihood, AIC, BIC, convergence flag, and iteration count on every fit
  • Optional visualization — density plots, scatter plots, and vine structure graphs via rscopulas[viz]

Installation

uv add rscopulas
pip install rscopulas
uv add "rscopulas[viz]"