# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "stochastic-rs"
version = "2.4.0"
build = "build.rs"
exclude = [
    "**/*.tar.gz",
    "data/**",
    "trainsets/**",
    "src/ai/volatility/*TrainSet.txt.gz",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust library for quant finance and simulating stochastic processes."
homepage = "https://github.com/dancixx/stochastic-rs"
documentation = "https://docs.rs/stochastic-rs/latest/stochastic_rs/"
readme = "README.md"
keywords = [
    "stochastic",
    "quant",
    "finance",
    "simulation",
    "statistics",
]
license = "MIT"
repository = "https://github.com/dancixx/stochastic-rs"

[package.metadata.docs.rs]
features = [
    "openblas",
    "ai",
    "yahoo",
]
rustdoc-args = [
    "--html-in-header",
    "docs/katex-header.html",
]

[features]
accelerate = ["stochastic-rs-stochastic/accelerate"]
ai = [
    "dep:stochastic-rs-ai",
    "stochastic-rs-ai/quant",
]
cuda-native = [
    "dep:cudarc",
    "cudarc/cufft",
    "stochastic-rs-stochastic/cuda-native",
]
default = []
dual-stream-rng = [
    "stochastic-rs-core/dual-stream-rng",
    "stochastic-rs-distributions/dual-stream-rng",
]
gpu = [
    "dep:cubecl",
    "dep:gpu-fft",
    "stochastic-rs-stochastic/gpu",
]
gpu-cuda = [
    "gpu",
    "dep:cubecl-cuda",
    "stochastic-rs-stochastic/gpu-cuda",
]
gpu-wgpu = [
    "gpu",
    "dep:cubecl-wgpu",
    "stochastic-rs-stochastic/gpu-wgpu",
]
hotpath = [
    "dep:hotpath",
    "hotpath/hotpath",
]
hotpath-alloc = [
    "hotpath",
    "hotpath/hotpath-alloc",
]
jemalloc = ["dep:tikv-jemallocator"]
metal = [
    "dep:metal",
    "stochastic-rs-stochastic/metal",
]
mimalloc = ["dep:mimalloc"]
openblas = [
    "dep:ndarray-linalg",
    "dep:openblas-src",
    "ndarray-linalg/openblas-system",
    "stochastic-rs-copulas/openblas",
    "stochastic-rs-quant/openblas",
    "stochastic-rs-stats/openblas",
    "stochastic-rs-stochastic/openblas",
]
openblas-static = [
    "dep:ndarray-linalg",
    "dep:openblas-src",
    "ndarray-linalg/openblas-static",
    "openblas-src/static",
    "stochastic-rs-copulas/openblas-static",
    "stochastic-rs-quant/openblas-static",
    "stochastic-rs-stats/openblas-static",
    "stochastic-rs-stochastic/openblas-static",
]
python = [
    "dep:pyo3",
    "dep:numpy",
    "stochastic-rs-distributions/python",
    "stochastic-rs-stochastic/python",
    "stochastic-rs-copulas/python",
    "stochastic-rs-stats/python",
    "stochastic-rs-quant/python",
]
yahoo = [
    "dep:time",
    "dep:yahoo_finance_api",
    "dep:polars",
    "dep:tokio-test",
    "stochastic-rs-quant/yahoo",
]

[lib]
name = "stochastic_rs"
crate-type = ["lib"]
path = "src/lib.rs"
doctest = false

[[example]]
name = "beerup_fbm_chart"
path = "examples/beerup_fbm_chart.rs"

[[example]]
name = "calibration_demo"
path = "examples/calibration_demo.rs"

[[example]]
name = "copula_var_demo"
path = "examples/copula_var_demo.rs"

[[example]]
name = "cuda_d2h_bw"
path = "examples/cuda_d2h_bw.rs"
required-features = ["cuda-native"]

[[example]]
name = "cuda_fgn_analysis"
path = "examples/cuda_fgn_analysis.rs"
required-features = ["cuda-native"]

[[example]]
name = "fgn_bitexact"
path = "examples/fgn_bitexact.rs"

[[example]]
name = "fgn_compare"
path = "examples/fgn_compare.rs"

[[example]]
name = "fgn_dump_ref"
path = "examples/fgn_dump_ref.rs"

[[example]]
name = "fgn_validate"
path = "examples/fgn_validate.rs"

[[example]]
name = "full_pipeline"
path = "examples/full_pipeline.rs"

[[example]]
name = "mc_greeks_demo"
path = "examples/mc_greeks_demo.rs"

[[example]]
name = "rl_vs_classical_fbm"
path = "examples/rl_vs_classical_fbm.rs"

[[example]]
name = "seed_smoke_test"
path = "examples/seed_smoke_test.rs"

[[test]]
name = "calendar_test"
path = "tests/calendar_test.rs"

[[test]]
name = "cashflows_test"
path = "tests/cashflows_test.rs"

[[test]]
name = "credit_test"
path = "tests/credit_test.rs"

[[test]]
name = "curves_test"
path = "tests/curves_test.rs"

[[test]]
name = "debug_fukasawa"
path = "tests/debug_fukasawa.rs"

[[test]]
name = "device_propagation"
path = "tests/device_propagation.rs"

[[test]]
name = "econometrics_test"
path = "tests/econometrics_test.rs"

[[test]]
name = "factors_test"
path = "tests/factors_test.rs"

[[test]]
name = "fgn_accelerate_validation"
path = "tests/fgn_accelerate_validation.rs"

[[test]]
name = "fgn_all_backends_visual"
path = "tests/fgn_all_backends_visual.rs"

[[test]]
name = "fgn_gpu_validation"
path = "tests/fgn_gpu_validation.rs"

[[test]]
name = "fgn_gpu_visual"
path = "tests/fgn_gpu_visual.rs"

[[test]]
name = "fgn_metal_validation"
path = "tests/fgn_metal_validation.rs"

[[test]]
name = "filtering_test"
path = "tests/filtering_test.rs"

[[test]]
name = "fx_test"
path = "tests/fx_test.rs"

[[test]]
name = "instruments_test"
path = "tests/instruments_test.rs"

[[test]]
name = "kirk_bs2002_test"
path = "tests/kirk_bs2002_test.rs"

[[test]]
name = "lattice_test"
path = "tests/lattice_test.rs"

[[test]]
name = "malliavin_thalmaier_test"
path = "tests/malliavin_thalmaier_test.rs"

[[test]]
name = "market_test"
path = "tests/market_test.rs"

[[test]]
name = "mc_comparison"
path = "tests/mc_comparison.rs"

[[test]]
name = "microstructure_test"
path = "tests/microstructure_test.rs"

[[test]]
name = "mt_vs_fd_benchmark"
path = "tests/mt_vs_fd_benchmark.rs"

[[test]]
name = "option_bermudan_swaption_test"
path = "tests/option_bermudan_swaption_test.rs"

[[test]]
name = "option_calibration_test"
path = "tests/option_calibration_test.rs"

[[test]]
name = "option_cap_floor_test"
path = "tests/option_cap_floor_test.rs"

[[test]]
name = "option_european_swaption_test"
path = "tests/option_european_swaption_test.rs"

[[test]]
name = "realized_test"
path = "tests/realized_test.rs"

[[test]]
name = "risk_test"
path = "tests/risk_test.rs"

[[test]]
name = "slv_test"
path = "tests/slv_test.rs"

[[bench]]
name = "calendar"
path = "benches/calendar.rs"
harness = false

[[bench]]
name = "cashflows"
path = "benches/cashflows.rs"
harness = false

[[bench]]
name = "credit"
path = "benches/credit.rs"
harness = false

[[bench]]
name = "dist_multicore"
path = "benches/dist_multicore.rs"
harness = false

[[bench]]
name = "distributions"
path = "benches/distributions.rs"
harness = false

[[bench]]
name = "dual_stream_compare"
path = "benches/dual_stream_compare.rs"
harness = false
required-features = ["dual-stream-rng"]

[[bench]]
name = "econometrics"
path = "benches/econometrics.rs"
harness = false

[[bench]]
name = "factors"
path = "benches/factors.rs"
harness = false
required-features = ["openblas"]

[[bench]]
name = "fgn_accelerate"
path = "benches/fgn_accelerate.rs"
harness = false
required-features = ["accelerate"]

[[bench]]
name = "fgn_all_backends"
path = "benches/fgn_all_backends.rs"
harness = false
required-features = [
    "gpu-wgpu",
    "metal",
    "accelerate",
]

[[bench]]
name = "fgn_cuda_compare"
path = "benches/fgn_cuda_compare.rs"
harness = false
required-features = [
    "cuda-native",
    "gpu-cuda",
]

[[bench]]
name = "fgn_cuda_native"
path = "benches/fgn_cuda_native.rs"
harness = false
required-features = ["cuda-native"]

[[bench]]
name = "fgn_fbm"
path = "benches/fgn_fbm.rs"
harness = false

[[bench]]
name = "fgn_gpu"
path = "benches/fgn_gpu.rs"
harness = false
required-features = ["gpu"]

[[bench]]
name = "fgn_metal"
path = "benches/fgn_metal.rs"
harness = false
required-features = ["metal"]

[[bench]]
name = "filtering"
path = "benches/filtering.rs"
harness = false

[[bench]]
name = "gn_batching"
path = "benches/gn_batching.rs"
harness = false

[[bench]]
name = "hotpath_profile"
path = "benches/hotpath_profile.rs"
harness = false
required-features = ["hotpath"]

[[bench]]
name = "hurst"
path = "benches/hurst.rs"
harness = false

[[bench]]
name = "instruments"
path = "benches/instruments.rs"
harness = false

[[bench]]
name = "lattice"
path = "benches/lattice.rs"
harness = false

[[bench]]
name = "market"
path = "benches/market.rs"
harness = false

[[bench]]
name = "microstructure"
path = "benches/microstructure.rs"
harness = false

[[bench]]
name = "mle"
path = "benches/mle.rs"
harness = false

[[bench]]
name = "option"
path = "benches/option.rs"
harness = false

[[bench]]
name = "poisson_process"
path = "benches/poisson_process.rs"
harness = false

[[bench]]
name = "process_generation"
path = "benches/process_generation.rs"
harness = false

[[bench]]
name = "realized"
path = "benches/realized.rs"
harness = false

[[bench]]
name = "risk"
path = "benches/risk.rs"
harness = false

[[bench]]
name = "rl_rough"
path = "benches/rl_rough.rs"
harness = false

[[bench]]
name = "slv"
path = "benches/slv.rs"
harness = false

[dependencies.anyhow]
version = "1.0.89"

[dependencies.argmin]
version = "0.11.0"

[dependencies.argmin-math]
version = "0.5"
features = [
    "ndarray_latest-nolinalg",
    "vec",
    "ndarray_latest-nolinalg",
    "vec",
]

[dependencies.candle-core]
version = "0.9.2"
optional = true

[dependencies.candle-datasets]
version = "0.9.2"
optional = true

[dependencies.candle-nn]
version = "0.9.2"
optional = true

[dependencies.chrono]
version = "0.4.38"

[dependencies.cubecl]
version = "0.9.0"
optional = true
default-features = false

[dependencies.cubecl-cuda]
version = "0.9.0"
optional = true

[dependencies.cubecl-wgpu]
version = "0.9.0"
optional = true

[dependencies.cudarc]
version = "0.19.2"
features = [
    "cuda-12080",
    "cuda-version-from-build-system",
    "cuda-12080",
    "cuda-version-from-build-system",
]
optional = true

[dependencies.flate2]
version = "1.1.2"

[dependencies.gauss-quad]
version = "0.3.1"

[dependencies.gpu-fft]
version = "1.1.1"
optional = true

[dependencies.hotpath]
version = "0.14"
optional = true

[dependencies.implied-vol]
version = "2.0.0"

[dependencies.kendalls]
version = "1.0.0"

[dependencies.levenberg-marquardt]
version = "0.14.0"

[dependencies.linreg]
version = "0.2.0"

[dependencies.metal]
version = "0.33.0"
optional = true

[dependencies.mimalloc]
version = "0.1.48"
optional = true

[dependencies.nalgebra]
version = "0.33.2"

[dependencies.ndarray]
version = "0.17.2"
features = [
    "rayon",
    "matrixmultiply-threading",
    "rayon",
    "matrixmultiply-threading",
]

[dependencies.ndarray-linalg]
version = "0.18.1"
optional = true
default-features = false

[dependencies.ndarray-npy]
version = "0.10.0"

[dependencies.ndarray-rand]
version = "0.16.0"

[dependencies.ndarray-stats]
version = "0.7.0"

[dependencies.ndrustfft]
version = "0.6.2"

[dependencies.num-complex]
version = "0.4.6"
features = [
    "rand",
    "rand",
]

[dependencies.num-traits]
version = "0.2.19"

[dependencies.numpy]
version = "0.28"
optional = true

[dependencies.openblas-src]
version = "0.10"
features = [
    "cblas",
    "cblas",
]
optional = true

[dependencies.ordered-float]
version = "5.0.0"

[dependencies.owens-t]
version = "0.1.5"

[dependencies.parking_lot]
version = "0.12.5"

[dependencies.plotly]
version = "0.10.0"
features = [
    "plotly_ndarray",
    "plotly_ndarray",
]

[dependencies.polars]
version = "0.43.1"
features = [
    "lazy",
    "lazy",
]
optional = true

[dependencies.pyo3]
version = "0.28"
features = [
    "extension-module",
    "chrono",
    "extension-module",
]
optional = true

[dependencies.quadrature]
version = "0.1.2"

[dependencies.rand]
version = "0.9.2"

[dependencies.rand_distr]
version = "0.5.1"

[dependencies.rayon]
version = "1.11.0"

[dependencies.roots]
version = "0.0.8"

[dependencies.sci-rs]
version = "0.4.1"

[dependencies.scilib]
version = "1.0.0"

[dependencies.slsqp]
version = "1.0.0"

[dependencies.stochastic-rs-ai]
version = "2.4"
optional = true

[dependencies.stochastic-rs-copulas]
version = "2.4"

[dependencies.stochastic-rs-core]
version = "2.4"

[dependencies.stochastic-rs-distributions]
version = "2.4"

[dependencies.stochastic-rs-quant]
version = "2.4"

[dependencies.stochastic-rs-stats]
version = "2.4"

[dependencies.stochastic-rs-stochastic]
version = "2.4"

[dependencies.stochastic-rs-viz]
version = "2.4"

[dependencies.tikv-jemallocator]
version = "0.6.1"
optional = true

[dependencies.time]
version = "0.3.36"
features = [
    "formatting",
    "parsing",
    "formatting",
    "parsing",
]
optional = true

[dependencies.tokio-test]
version = "0.4.4"
optional = true

[dependencies.wide]
version = "1.5.0"

[dependencies.yahoo_finance_api]
version = "2.3.0"
optional = true

[dev-dependencies.criterion]
version = "0.8"
features = [
    "html_reports",
    "html_reports",
]

[dev-dependencies.rand]
version = "0.9.2"

[dev-dependencies.rand_distr]
version = "0.5.1"

[dev-dependencies.romu]
version = "0.8.0"

[profile.release]
lto = true
codegen-units = 1
debug = 0
