增强回测引擎第二版策略与快照层
This commit is contained in:
@@ -41,6 +41,7 @@ pub struct DailyEquityPoint {
|
||||
pub total_equity: f64,
|
||||
pub benchmark_close: f64,
|
||||
pub notes: String,
|
||||
pub diagnostics: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -126,6 +127,7 @@ where
|
||||
date: execution_date,
|
||||
})?;
|
||||
let notes = decision.notes.join(" | ");
|
||||
let diagnostics = decision.diagnostics.join(" | ");
|
||||
|
||||
result.equity_curve.push(DailyEquityPoint {
|
||||
date: execution_date,
|
||||
@@ -134,6 +136,7 @@ where
|
||||
total_equity: portfolio.total_equity(),
|
||||
benchmark_close: benchmark.close,
|
||||
notes,
|
||||
diagnostics,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user