test: qualify execution clock regression time types
This commit is contained in:
@@ -11614,7 +11614,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn later_execution_clocks_do_not_replenish_the_same_observed_volume() {
|
fn later_execution_clocks_do_not_replenish_the_same_observed_volume() {
|
||||||
let date = NaiveDate::from_ymd_opt(2025,1,2).unwrap();
|
let date = chrono::NaiveDate::from_ymd_opt(2025,1,2).unwrap();
|
||||||
let broker = BrokerSimulator::new_with_execution_price(
|
let broker = BrokerSimulator::new_with_execution_price(
|
||||||
ChinaAShareCostModel::default(), ChinaEquityRuleHooks, PriceField::Last,
|
ChinaAShareCostModel::default(), ChinaEquityRuleHooks, PriceField::Last,
|
||||||
).with_volume_limit(true).with_volume_percent(0.25).with_liquidity_limit(false);
|
).with_volume_limit(true).with_volume_percent(0.25).with_liquidity_limit(false);
|
||||||
@@ -11633,7 +11633,7 @@ mod tests {
|
|||||||
assert_eq!(first.legs[0].execution_timestamp,Some(clock));
|
assert_eq!(first.legs[0].execution_timestamp,Some(clock));
|
||||||
assert_eq!(first.liquidity_consumption[0].timestamp,quotes[0].timestamp);
|
assert_eq!(first.liquidity_consumption[0].timestamp,quotes[0].timestamp);
|
||||||
ledger.apply_liquidity_consumption(&first.liquidity_consumption);
|
ledger.apply_liquidity_consumption(&first.liquidity_consumption);
|
||||||
let later = clock + Duration::seconds(1);
|
let later = clock + chrono::Duration::seconds(1);
|
||||||
let second = broker.select_execution_fill_with_ledger(
|
let second = broker.select_execution_fill_with_ledger(
|
||||||
&snapshot.symbol,&snapshot,"es,OrderSide::Sell,MatchingType::MinuteLast,
|
&snapshot.symbol,&snapshot,"es,OrderSide::Sell,MatchingType::MinuteLast,
|
||||||
Some(later),Some(later),100,100,100,100,true,None,None,None,&ledger,None,
|
Some(later),Some(later),100,100,100,100,true,None,None,None,&ledger,None,
|
||||||
|
|||||||
Reference in New Issue
Block a user