feat(optimal_control): implement Kalman filter module with Python bindings
- Add kalman_filter.rs with LinearKF, RTSSmoother, UKF implementations - Add kalman_py_bindings.rs for Python API exposure - Create tutorial notebook with 3 real-world examples (vehicle tracking, financial time series, multi-sensor fusion) - All tests passing with excellent results (63-88% RMSE improvements) - Fix compilation errors in py_bindings.rs (type annotations, imports) - Successfully builds with maturin develop --release
This commit is contained in:
@@ -153,7 +153,7 @@ pub fn backtest_optimal_switching(
|
||||
|
||||
// Maximum drawdown
|
||||
let mut cummax = pnl[0];
|
||||
let mut max_dd = 0.0;
|
||||
let mut max_dd: f64 = 0.0;
|
||||
for &p in &pnl {
|
||||
cummax = cummax.max(p);
|
||||
let dd = (p - cummax) / (cummax.abs() + 1e-10);
|
||||
|
||||
Reference in New Issue
Block a user