Skip to content

Commit b5ffab4

Browse files
committed
feat: add multivar copulas
1 parent 9de0367 commit b5ffab4

File tree

10 files changed

+948
-153
lines changed

10 files changed

+948
-153
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ kendalls = "0.2.2"
3434
levenberg-marquardt = "0.14.0"
3535
libloading = { version = "0.8.6", optional = true }
3636
linreg = "0.2.0"
37+
openblas-src = { version = "0.10", features = ["cblas", "static"], optional = true }
3738
mimalloc = { version = "0.1.43", optional = true }
3839
nalgebra = "0.33.2"
3940
ndarray = { version = "0.16.1", features = [
4041
"rayon",
4142
"matrixmultiply-threading",
42-
"blas",
4343
] }
44-
ndarray-linalg = { version = "0.17.0" }
4544
ndarray-npy = "0.9.1"
4645
ndarray-rand = "0.15.0"
4746
ndarray-stats = "0.6.0"
@@ -78,6 +77,7 @@ yahoo_finance_api = { version = "2.3.0", optional = true }
7877
ai = ["dep:candle-core", "dep:candle-datasets", "dep:candle-nn", "dep:polars"]
7978
cuda = ["dep:cudarc", "dep:libloading"]
8079
default = []
80+
8181
jemalloc = ["dep:tikv-jemallocator"]
8282
malliavin = []
8383
mimalloc = ["dep:mimalloc"]

src/main.rs

Lines changed: 0 additions & 126 deletions
This file was deleted.

src/quant/pricing/bsm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ pub struct BSMPricer {
5858

5959
impl PricerExt for BSMPricer {
6060
/// Calculate the option price
61-
#[must_use]
6261
fn calculate_call_put(&self) -> (f64, f64) {
6362
let (d1, d2) = self.d1_d2();
6463
let n = Normal::default();

src/quant/pricing/finitie_difference.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ pub struct FiniteDifferencePricer {
4444

4545
impl PricerExt for FiniteDifferencePricer {
4646
/// Calculate the option price
47-
#[must_use]
4847
fn calculate_price(&self) -> f64 {
4948
match self.method {
5049
FiniteDifferenceMethod::Explicit => self.explicit(),

src/quant/pricing/merton_jump.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ pub struct Merton1976Pricer {
4444

4545
impl PricerExt for Merton1976Pricer {
4646
/// Calculate the option price
47-
#[must_use]
4847
fn calculate_call_put(&self) -> (f64, f64) {
4948
let mut bsm = BSMPricer::new(
5049
self.s,

src/stats/copulas/bivariate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub mod gumbel;
1313
pub mod independence;
1414

1515
#[derive(Debug, Clone, Copy)]
16-
pub(super) enum CopulaType {
16+
pub enum CopulaType {
1717
Clayton,
1818
Frank,
1919
Gumbel,

src/stats/copulas/multivariate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub mod gaussian;
66
pub mod tree;
77
pub mod vine;
88

9-
pub(super) enum CopulaType {
9+
pub enum CopulaType {
1010
Gaussian,
1111
Tree,
1212
Vine,

0 commit comments

Comments
 (0)