Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hftbacktest/src/backtest/proc/l3_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ where
wait_resp_order_received = true;
}

// Processes receiving order response.
if order.status == Status::Filled {
// Processes receiving order response (full and partial fills).
if order.status == Status::Filled || order.status == Status::PartiallyFilled {
self.state.apply_fill(&order);
}
// Applies the received order response to the local orders.
Expand Down
4 changes: 2 additions & 2 deletions hftbacktest/src/backtest/proc/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ where
wait_resp_order_received = true;
}

// Processes receiving order response.
if order.status == Status::Filled {
// Processes receiving order response (full and partial fills).
if order.status == Status::Filled || order.status == Status::PartiallyFilled {
self.state.apply_fill(&order);
}
// Applies the received order response to the local orders.
Expand Down
4 changes: 2 additions & 2 deletions hftbacktest/src/backtest/proc/partialfillexchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ where
// q_ahead is negative since is_filled is true and its value represents the
// executable quantity of this order after execution in the queue ahead of this
// order.
let exec_qty = if filled_qty > order.leaves_qty {
let exec_qty = if filled_qty >= order.leaves_qty {
self.filled_orders.push(order.order_id);
order.leaves_qty
} else {
Expand Down Expand Up @@ -192,7 +192,7 @@ where
// q_ahead is negative since is_filled is true and its value represents the
// executable quantity of this order after execution in the queue ahead of this
// order.
let exec_qty = if filled_qty > order.leaves_qty {
let exec_qty = if filled_qty >= order.leaves_qty {
self.filled_orders.push(order.order_id);
order.leaves_qty
} else {
Expand Down