From 21393bb2268e53d5a4e291a5fd1f646dae41bfb5 Mon Sep 17 00:00:00 2001 From: nkaz001 Date: Tue, 3 Sep 2024 08:16:18 -0400 Subject: [PATCH] docs: update the docstring. --- py-hftbacktest/hftbacktest/__init__.py | 4 ++++ py-hftbacktest/src/lib.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/py-hftbacktest/hftbacktest/__init__.py b/py-hftbacktest/hftbacktest/__init__.py index dd1abae..d941ab3 100644 --- a/py-hftbacktest/hftbacktest/__init__.py +++ b/py-hftbacktest/hftbacktest/__init__.py @@ -135,6 +135,10 @@ def intp_order_latency(self, data: str | NDArray | List[str], latency_offset: in Args: data: A list of file paths for the historical order latency data in `npz`, or a NumPy array of the historical order latency data. + latency_offset: the latency offset to adjust the order entry and response latency by the + specified amount. This is particularly useful in cross-exchange + backtesting, where the feed data is collected from a different site than + the one where the strategy is intended to run. """ if isinstance(data, str): super().intp_order_latency([data], latency_offset) diff --git a/py-hftbacktest/src/lib.rs b/py-hftbacktest/src/lib.rs index 0e51d30..e3c67c1 100644 --- a/py-hftbacktest/src/lib.rs +++ b/py-hftbacktest/src/lib.rs @@ -243,6 +243,10 @@ impl BacktestAsset { /// /// Args: /// data: a list of file paths for the historical order latency data in `npz`. + /// latency_offset: the latency offset to adjust the order entry and response latency by the + /// specified amount. This is particularly useful in cross-exchange + /// backtesting, where the feed data is collected from a different site than + /// the one where the strategy is intended to run. pub fn intp_order_latency( mut slf: PyRefMut, data: Vec,