排除仅作参考的基准并记录周期买入风控拒绝

This commit is contained in:
boris
2026-09-10 20:21:44 +08:00
parent 40481e8825
commit 4664f1a2d3
5 changed files with 67 additions and 23 deletions
+6
View File
@@ -3375,6 +3375,12 @@ impl DataSet {
.unwrap_or(&[])
}
pub fn is_reference_only_benchmark(&self, symbol: &str) -> bool {
if symbol != self.benchmark_code() { return false; }
let Some(symbol_id) = self.symbol_id(symbol) else { return true; };
!self.candidate_symbol_ids_by_date.values().any(|ids| ids.contains(&symbol_id))
}
pub fn bundle_on(&self, date: NaiveDate) -> Result<DailySnapshotBundle, DataSetError> {
let benchmark = self
.benchmark(date)