修正平台策略市值选股日期口径
This commit is contained in:
@@ -4674,6 +4674,11 @@ impl PlatformExprStrategy {
|
||||
.data
|
||||
.previous_trading_date(decision_date, 1)
|
||||
.unwrap_or(decision_date);
|
||||
let universe_factor_date = if self.config.current_day_precomputed_factors {
|
||||
decision_date
|
||||
} else {
|
||||
previous_factor_date
|
||||
};
|
||||
let stock_factor_date = if self.config.current_day_precomputed_factors {
|
||||
decision_date
|
||||
} else {
|
||||
@@ -4686,7 +4691,7 @@ impl PlatformExprStrategy {
|
||||
} else {
|
||||
decision_date
|
||||
};
|
||||
(selection_date, previous_factor_date, stock_factor_date)
|
||||
(selection_date, universe_factor_date, stock_factor_date)
|
||||
}
|
||||
|
||||
fn buy_scale(
|
||||
@@ -16853,7 +16858,7 @@ mod tests {
|
||||
decision
|
||||
.diagnostics
|
||||
.iter()
|
||||
.any(|item| item.contains("selection_universe_factor_date=2025-01-02")),
|
||||
.any(|item| item.contains("selection_universe_factor_date=2025-01-03")),
|
||||
"{:?}",
|
||||
decision.diagnostics
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user