Add suspended and ST data helpers

This commit is contained in:
boris
2026-04-23 19:37:50 -07:00
parent 6106297a97
commit bb8f40f33c
5 changed files with 95 additions and 20 deletions

View File

@@ -285,6 +285,16 @@ impl StrategyContext<'_> {
self.data.next_trading_date(date, n)
}
pub fn is_suspended(&self, symbol: &str, count: usize) -> Vec<bool> {
self.data
.is_suspended_flags(self.execution_date, symbol, count)
}
pub fn is_st_stock(&self, symbol: &str, count: usize) -> Vec<bool> {
self.data
.is_st_stock_flags(self.execution_date, symbol, count)
}
pub fn has_subscriptions(&self) -> bool {
!self.subscriptions.is_empty()
}