fix: distinguish signal consumption and strategy decision schedule dates
This commit is contained in:
@@ -185,9 +185,9 @@ impl ValidatedSignalBook {
|
||||
Ok(snapshot)
|
||||
}
|
||||
|
||||
pub fn is_due_on(&self, ctx: &StrategyContext<'_>) -> bool {
|
||||
self.index.range(ctx.execution_date.and_hms_opt(0,0,0).expect("session start")..)
|
||||
.next().is_some_and(|(at,_)|at.date()==ctx.execution_date)
|
||||
pub fn is_due_on(&self, execution_date: NaiveDate) -> bool {
|
||||
self.index.range(execution_date.and_hms_opt(0,0,0).expect("session start")..)
|
||||
.next().is_some_and(|(at,_)|at.date()==execution_date)
|
||||
}
|
||||
|
||||
fn snapshot_at(&self, execution_date: NaiveDate, current_time: Option<NaiveTime>, lagged: bool) -> Result<&SignalSnapshot, String> {
|
||||
|
||||
Reference in New Issue
Block a user