修复迟到成交跨公司行为的经济账本校正
This commit is contained in:
@@ -2766,6 +2766,15 @@ where
|
||||
if execution.side == OrderSide::Sell {
|
||||
let date = execution.executed_at.with_timezone(&chrono::FixedOffset::east_opt(8 * 3600).unwrap()).date_naive();
|
||||
self.mark_same_day_sold(date, &execution.symbol);
|
||||
if let Some(adjustment) = &execution.corporate_adjustment {
|
||||
for successor in adjustment
|
||||
.actions
|
||||
.iter()
|
||||
.filter_map(|action| action.successor_symbol.as_deref())
|
||||
{
|
||||
self.mark_same_day_sold(date, successor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user