修复FIDC选股阶段风控语义
This commit is contained in:
@@ -5002,9 +5002,22 @@ mod tests {
|
||||
.map(|snapshot| snapshot.close),
|
||||
Some(11.5)
|
||||
);
|
||||
assert_eq!(
|
||||
dataset
|
||||
.eligible_universe_on(first)
|
||||
.iter()
|
||||
.map(|row| row.symbol.clone())
|
||||
.collect::<Vec<_>>(),
|
||||
vec![SYMBOL.to_string()],
|
||||
"raw DataSet helper should not apply default selection risk"
|
||||
);
|
||||
let mut selection_risk_config = FidcRiskControlConfig::default();
|
||||
selection_risk_config.static_rules.reject_paused_selection = true;
|
||||
assert!(
|
||||
dataset.eligible_universe_on(first).is_empty(),
|
||||
"raw DataSet helper remains a risk-filtered universe"
|
||||
dataset
|
||||
.eligible_universe_on_with_risk_config(first, &selection_risk_config)
|
||||
.is_empty(),
|
||||
"explicit raw DataSet selection risk can still filter the universe"
|
||||
);
|
||||
assert_eq!(
|
||||
manual_ctx
|
||||
@@ -5017,7 +5030,7 @@ mod tests {
|
||||
);
|
||||
assert_eq!(
|
||||
manual_ctx
|
||||
.eligible_universe_on_with_risk_config(first, &FidcRiskControlConfig::default())
|
||||
.eligible_universe_on_with_risk_config(first, &selection_risk_config)
|
||||
.into_iter()
|
||||
.map(|row| row.symbol)
|
||||
.collect::<Vec<_>>(),
|
||||
|
||||
Reference in New Issue
Block a user