diff --git a/.gitignore b/.gitignore index 9a382b0..8603b8d 100644 --- a/.gitignore +++ b/.gitignore @@ -167,4 +167,6 @@ output # PositionBT output/ -.ruff_cache/ \ No newline at end of file +.ruff_cache/ + +src/benchmark \ No newline at end of file diff --git a/data/btc_ohlcv_1m.parquet b/data/btc_ohlcv_1m.parquet new file mode 100644 index 0000000..029d06a Binary files /dev/null and b/data/btc_ohlcv_1m.parquet differ diff --git a/src/positionbt/utils/validation.py b/src/positionbt/utils/validation.py index 68cad7e..8fe67e2 100644 --- a/src/positionbt/utils/validation.py +++ b/src/positionbt/utils/validation.py @@ -156,10 +156,7 @@ def validate_time_alignment(close_df: pl.DataFrame, position_df: pl.DataFrame) - ValidationError: If timestamps are not aligned """ - close_times = set(close_df["time"]) - position_times = set(position_df["time"]) - - if close_times != position_times: + if not close_df["time"].equals(position_df["time"]): raise ValidationError("Close and position data must have identical timestamps")