akquant 0.1.0__cp39-abi3-win_amd64.whl → 0.1.2__cp39-abi3-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
akquant/akquant.pyd CHANGED
Binary file
akquant/backtest.py CHANGED
@@ -277,7 +277,9 @@ def plot_result(
277
277
  if first_ts > 1e11:
278
278
  scale = 1e-9
279
279
 
280
- times = [datetime.fromtimestamp(t * scale) for t, _ in equity_curve]
280
+ from datetime import timezone
281
+ # Use UTC to avoid local timezone issues and align with benchmark data which is often UTC
282
+ times = [datetime.fromtimestamp(t * scale, tz=timezone.utc).replace(tzinfo=None) for t, _ in equity_curve]
281
283
  equity = [e for _, e in equity_curve]
282
284
 
283
285
  # Convert to DataFrame for easier calculation
@@ -304,6 +306,10 @@ def plot_result(
304
306
  # Ensure benchmark has DatetimeIndex
305
307
  if not isinstance(benchmark.index, pd.DatetimeIndex):
306
308
  benchmark.index = pd.to_datetime(benchmark.index)
309
+
310
+ # Normalize timezones: ensure benchmark is tz-naive UTC
311
+ if benchmark.index.tz is not None:
312
+ benchmark.index = benchmark.index.tz_convert('UTC').tz_localize(None)
307
313
 
308
314
  # Reindex benchmark to match strategy dates (forward fill for missing days if any, but strict alignment preferred)
309
315
  # Normalize dates to start of day for alignment if needed, but here we assume close match
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akquant
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -4,7 +4,7 @@ akquant\__pycache__\__init__.cpython-313.pyc,sha256=v4MCgnsG52O98N448snfO3xnlYso
4
4
  akquant\__pycache__\analyzer.cpython-312.pyc,sha256=z4h5ftrbl1YIk1IJz5aQyWWqoYEMgOMQWvvHhnK8UYk,3011
5
5
  akquant\__pycache__\analyzer.cpython-313.pyc,sha256=-0FTarlWoYezqbsirUI2U_5jGbYo3vDZZvtbO3LaZuY,3137
6
6
  akquant\__pycache__\backtest.cpython-312.pyc,sha256=VhHDmuIkPUFU6fHxB0j7TDeNo_iU6CABOJAEDUhURqk,15709
7
- akquant\__pycache__\backtest.cpython-313.pyc,sha256=Dw7EHnhzg0JqivzGQ5In4PIBWQyExWeVWKfzXJBaqMo,15882
7
+ akquant\__pycache__\backtest.cpython-313.pyc,sha256=wlNtkH2JxaunVMDIjXUzgx5GFg9_wJhGiWcvMaTeJy8,16247
8
8
  akquant\__pycache__\config.cpython-312.pyc,sha256=R_IQEOFv2U1O9D259fZ0VVZCZjFi3NvBw0VqjhB6InA,1231
9
9
  akquant\__pycache__\config.cpython-313.pyc,sha256=-tZ007Zm4MyobUkZ8ikkiJPmy1YEtPGya9hnQ8oyWHk,1279
10
10
  akquant\__pycache__\data.cpython-312.pyc,sha256=iSt_iTCUIOLp3R1cWUBi0xyVo-asKE510LXsDGbUEe0,5467
@@ -19,9 +19,9 @@ akquant\__pycache__\strategy.cpython-312.pyc,sha256=DCCTjDlMokK5GSc3V6irhgVV63Zp
19
19
  akquant\__pycache__\strategy.cpython-313.pyc,sha256=C-Hff41rO57evwscEVevKXXwEETUfHt-_sNt2aPqSbM,19291
20
20
  akquant\__pycache__\utils.cpython-312.pyc,sha256=QlooggAC7DNDL3sMaykQmJu3amobMo1pBVPEuzknOGI,6554
21
21
  akquant\__pycache__\utils.cpython-313.pyc,sha256=68I7EWrMtpHI4sfog43dlm6_M5BJxpzFzEqFTGWgU0Y,6537
22
- akquant\akquant.pyd,sha256=f4do4dmxCU3ljECac5yjijstSIwKQZgnpG-POSW-2G8,1060352
22
+ akquant\akquant.pyd,sha256=5Bx5gc8GGMHOM34c35fTvgrYYAlI90azg9FDIqWqw9w,1060352
23
23
  akquant\akquant.pyi,sha256=72VUghJhb12hkv6loZhPGaS5WOZxAc4xf3guKhV4Y6Y,12903
24
- akquant\backtest.py,sha256=PvlvSHKJ6X7xDIsf2UEKB4tvuFsFXoTxm3gY2oHzRzg,14261
24
+ akquant\backtest.py,sha256=iUBM6DUWprZojp0_gcBQlTCaOusQlPI5fk-UmNiCjoY,14641
25
25
  akquant\config.py,sha256=BwxYxQezZWtqUfq4HGmMOWjhDuXxBMr4Hv0dj1q3Z8o,863
26
26
  akquant\data.py,sha256=41sXOa2nOjYq8-blSum-Cer93xT8DdPlE7lOphzASSQ,3964
27
27
  akquant\indicator.py,sha256=1XaZL56nNi6OQOZVqw3q2TIWc6CcniebEHjXDq_lcSY,1792
@@ -29,7 +29,7 @@ akquant\log.py,sha256=O7nkqRhzRmjgGjyW6_2QEJLLC5KwoCiqqTs4xNkXHkI,3676
29
29
  akquant\sizer.py,sha256=upnZcZAmvEt09HvXSDqIGAaVmBFemTvKc96b_yj8st0,1900
30
30
  akquant\strategy.py,sha256=DHRIyXApXmwwRoUF1EAwAyn_fwVdCttq8l3HWoovbLg,16963
31
31
  akquant\utils.py,sha256=exLet8XLa1ui2s-YeFKxaxkobtb3_Gnph5pZK9uf1q0,5438
32
- akquant-0.1.0.dist-info\METADATA,sha256=2jTKMtbtiv6oBYa3iA_cCYfR9I2Nc9mAMX2PhOw9-ig,6347
33
- akquant-0.1.0.dist-info\WHEEL,sha256=OD0Is1kLHE07aD7XukSVDFU8ymUMI4Fdg0tKYWce3N0,95
34
- akquant-0.1.0.dist-info\licenses\LICENSE,sha256=dg6QB5xlcf1KRtzePAEKp6AryK3SF2Li6eRsRtErtzs,1075
35
- akquant-0.1.0.dist-info\RECORD,,
32
+ akquant-0.1.2.dist-info\METADATA,sha256=iBd9Vew3D4y7DaYVXwZAIiM4mkln7UPejqniRQYYdlE,6347
33
+ akquant-0.1.2.dist-info\WHEEL,sha256=OD0Is1kLHE07aD7XukSVDFU8ymUMI4Fdg0tKYWce3N0,95
34
+ akquant-0.1.2.dist-info\licenses\LICENSE,sha256=dg6QB5xlcf1KRtzePAEKp6AryK3SF2Li6eRsRtErtzs,1075
35
+ akquant-0.1.2.dist-info\RECORD,,