Skip to content

Commit

Permalink
fix(py): fix the price equality check in event order validation to ha…
Browse files Browse the repository at this point in the history
…ndle NaN values.
  • Loading branch information
nkaz001 committed Aug 7, 2024
1 parent 17dc527 commit 7361acf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py-hftbacktest/hftbacktest/data/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def correct_event_order(
and sorted_exch.local_ts == sorted_local.local_ts
):
assert sorted_exch.ev == sorted_local.ev
assert sorted_exch.px == sorted_local.px
assert (sorted_exch.px == sorted_local.px) or (np.isnan(sorted_exch.px) and np.isnan(sorted_local.px))
assert sorted_exch.qty == sorted_local.qty

sorted_final[out_rn] = sorted_exch
Expand Down

0 comments on commit 7361acf

Please sign in to comment.