[package]
name = "bts-rs"
version = "0.9.2"
edition = "2024"
description = "Backtest your trading strategy."
authors = ["tetuaoro <65575727+tetuaoro@users.noreply.github.com>"]
documentation = "https://docs.rs/bts-rs"
repository = "https://github.com/raonagos/bts-rs"
license = "MIT"
readme = "README.md"
keywords = [
    "trading",
    "finance",
    "backtest",
    "indicators",
    "technical-analysis",
]
categories = ["finance", "science", "algorithms"]

[dependencies]
rand = "0.9.2"
chrono = "0.4.42"
thiserror = "2.0.17"

rayon = { version = "1.11.0", optional = true }
plotters = { version = "0.3.7", optional = true }
num_cpus = { version = "1.17.0", optional = true }
serde = { version = "1.0.226", features = ["derive", "rc"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = "0.3.4"

[features]
metrics = []
draws = ["dep:plotters"]
optimizer = ["dep:rayon", "dep:num_cpus"]

serde = ["chrono/serde", "dep:serde"]
wasm = ["rayon/web_spin_lock", "getrandom/wasm_js"]

[package.metadata.docs.rs]
features = ["metrics", "draws", "optimizer"]

[dev-dependencies]
ta = "0.5.0"

[[example]]
name = "par_parameters_optimization"
path = "examples/par_parameters_optimization.rs"
required-features = ["optimizer"]
