bug fixes: types.rs

This commit is contained in:
KhizarImran
2026-06-20 17:52:19 +01:00
parent 5609249180
commit 706be103f0
2 changed files with 16 additions and 2 deletions
+7
View File
@@ -45,6 +45,13 @@ fn max_drawdown(equity_curve: &[f64]) -> f64 {
max_dd
}
#[pymethods]
impl Stats {
fn __repr__(&self) -> String {
format!("{}", self)
}
}
impl Stats {
pub fn compute(broker: &Broker, equity_curve: &[f64]) -> Self {
let num_trades = broker.trade_history.len();