fix: benchmark timestamp ns, vectorbt trade count x2, remove fake perf numbers from README

This commit is contained in:
Jimmy7892
2026-03-17 16:23:22 +01:00
parent 67ab17280b
commit c4e7e9abb4
2 changed files with 6 additions and 10 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ def bench_bt_engine(df: pd.DataFrame, n_runs: int) -> dict:
# Write synthetic data to a temp parquet (manifoldbt canonical schema)
parquet_df = pd.DataFrame({
"timestamp": pd.to_datetime(df["timestamp"].values, utc=True),
"timestamp": pd.to_datetime(df["timestamp"].values, utc=True).as_unit("ns"),
"symbol_id": np.uint32(1),
"open": df["open"].values,
"high": df["high"].values,
@@ -217,7 +217,7 @@ def bench_vectorbt(df: pd.DataFrame, n_runs: int) -> dict:
"median": np.median(times),
"mean": np.mean(times),
"total_return": stats.get("Total Return [%]", None),
"trades": stats.get("Total Trades", None),
"trades": int(stats.get("Total Trades", 0)) * 2, # vbt counts round-trips; x2 for entry+exit
}