Qubx 0.2.79__cp311-cp311-manylinux_2_35_x86_64.whl → 0.2.81__cp311-cp311-manylinux_2_35_x86_64.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.

Potentially problematic release.


This version of Qubx might be problematic. Click here for more details.

qubx/data/helpers.py CHANGED
@@ -9,6 +9,7 @@ from collections import defaultdict
9
9
 
10
10
  from qubx import logger
11
11
  from qubx.core.basics import ITimeProvider
12
+ from qubx.core.series import TimeSeries
12
13
  from qubx.data.readers import (
13
14
  AsPandasFrame,
14
15
  CsvStorageDataReader,
@@ -314,6 +315,7 @@ class TimeGuardedWrapper(DataReader):
314
315
  _cut_dict = lambda xs, t: OhlcDict({s: v.loc[:t] for s, v in xs.items()})
315
316
  _cut_list_of_timestamped = lambda xs, t: list(filter(lambda x: x.time <= t, xs))
316
317
  _cut_list_raw = lambda xs, t: list(filter(lambda x: x[0] <= t, xs))
318
+ _cut_time_series = lambda ts, t: ts.loc[: str(t)]
317
319
 
318
320
  if prev_bar:
319
321
  _c_time = _c_time - pd.Timedelta(self._reader._data_timeframe)
@@ -329,6 +331,10 @@ class TimeGuardedWrapper(DataReader):
329
331
  else:
330
332
  return _cut_list_of_timestamped(data, _c_time.asm8.item())
331
333
 
334
+ # - input is TimeSeries
335
+ if isinstance(data, TimeSeries):
336
+ return _cut_time_series(data, _c_time)
337
+
332
338
  return data.loc[:_c_time]
333
339
 
334
340
  def __str__(self) -> str:
qubx/pandaz/utils.py CHANGED
@@ -575,8 +575,8 @@ class OhlcDict(dict):
575
575
  if isinstance(orig, dict):
576
576
  _lst = []
577
577
  for k, o in orig.items():
578
- if not k[0].isalpha():
579
- raise ValueError("Keys in the dictionary must start with an alphabet")
578
+ # if not k[0].isalpha():
579
+ # raise ValueError("Keys in the dictionary must start with an alphabet")
580
580
  if not isinstance(o, (pd.DataFrame | pd.Series)):
581
581
  raise ValueError("All values in the dictionary must be pandas Series or DataFrames")
582
582
  _lst.extend(o.columns.values)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Qubx
3
- Version: 0.2.79
3
+ Version: 0.2.81
4
4
  Summary: Qubx - quantitative trading framework
5
5
  Home-page: https://github.com/dmarienko/Qubx
6
6
  Author: Dmitry Marienko
@@ -14,16 +14,16 @@ qubx/core/helpers.py,sha256=V_3505UiQhQcNwKVFN3S7hQAgmfU0Lly3JX1kk3GW8E,12664
14
14
  qubx/core/loggers.py,sha256=zpehm2-RdKG1ISe6t3DiM3RrL_zzGni3YFcxfgDkV24,16575
15
15
  qubx/core/lookups.py,sha256=GzGmw8sEtS1ly2YSQMwrBVywFtWaAcXSd6mPCA1HIvQ,14614
16
16
  qubx/core/metrics.py,sha256=HcuwaAdyNS5CYQ39c8cM872jAR-B26ac6ODFczmBK-8,39522
17
- qubx/core/series.cpython-311-x86_64-linux-gnu.so,sha256=WS2GzQxc6Eeo8-PTgGKuQ_g7TJGUEXZ_1bzUw_e1NeQ,779016
17
+ qubx/core/series.cpython-311-x86_64-linux-gnu.so,sha256=hU4AJikIkN0wWCmRmn5AoV9U_oVezHPUL3rUdJ6PgSU,779016
18
18
  qubx/core/series.pxd,sha256=kF7QeLFgCM-C2hDxVvJM97ZOmyw1v7JEI9WfPKtQ6xs,3002
19
19
  qubx/core/series.pyi,sha256=vxCXVZt6hn2RdqR9M3CnXHR0Offv-YyR9nW2q8H5moY,2855
20
20
  qubx/core/series.pyx,sha256=UhZsnT7R3-UED05Fnp3mGxr4RSdMpWAHB4lkcz46MFo,32598
21
21
  qubx/core/strategy.py,sha256=K_Co6T4yXwj8N4Q7wZAEAVXm6dwyikvLdwnQdPEw4Zg,14973
22
- qubx/core/utils.cpython-311-x86_64-linux-gnu.so,sha256=8ijWhRsfFkXO1yX7MHdYfbkKMATFxv6juDCLQBAcMYE,82504
22
+ qubx/core/utils.cpython-311-x86_64-linux-gnu.so,sha256=goZLc2hKqyZ0D-3q-1EW1yO3FRkVBywYnf7yJi2kjbc,82504
23
23
  qubx/core/utils.pyi,sha256=DAjyRVPJSxK4Em-9wui2F0yYHfP5tI5DjKavXNOnHa8,276
24
24
  qubx/core/utils.pyx,sha256=-8ek58CrbqWZq0-OY7WSREsCXBoBeWrD_wEYbIBS9rI,1696
25
25
  qubx/data/__init__.py,sha256=ZBIOlciDTD44xyCYAJOngxwqxrKSgwJYDpMQdecPUIQ,245
26
- qubx/data/helpers.py,sha256=3hoTRfxz75dvDdMhhUPtR6qZJ-ZQK2eKpiFywekSpSM,15227
26
+ qubx/data/helpers.py,sha256=5FLjoyzB-gqWEsAZn-DzWmIRiaAefmpnFV_xSgqWgT0,15450
27
27
  qubx/data/readers.py,sha256=crjs5ZekSGiEuRWI9MfucUyKK1aCsNTBYFO3-yepeSg,42362
28
28
  qubx/gathering/simplest.py,sha256=Ez3YFZMKH3o0jV0Qbg1SuZiuFNs_5No_C7wZ6vOeqfo,3814
29
29
  qubx/impl/ccxt_connector.py,sha256=ja_0WJDyZfkzqhNvoV-c5CCg15YnbRIThxw0TTNdwcc,13066
@@ -34,9 +34,9 @@ qubx/math/__init__.py,sha256=QRat0pqEqmbJF7CIHBuqnB1xUek4CsDDhv7SpgssnFw,57
34
34
  qubx/math/stats.py,sha256=OAovG31EDJjkTOV5aRC9W4MoquiW8U0BrahlysXP2EQ,3085
35
35
  qubx/pandaz/__init__.py,sha256=xlZvm48eBur0U7N4F4xTKqh7-n5fN0wghj1Tb8lCCNk,332
36
36
  qubx/pandaz/ta.py,sha256=NthiiueUoqWGRcjovcKKThcCcdImZn3JRdWDA2vL28k,85075
37
- qubx/pandaz/utils.py,sha256=SySWTH2XJvV4UTy_YPwCjELzNbxeY9kjftMzybO-heA,22021
37
+ qubx/pandaz/utils.py,sha256=4clicJC5BsWDkRumXD6Jj6RFrb1Fy8lvdo6ndtG6Pq4,22021
38
38
  qubx/ta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- qubx/ta/indicators.cpython-311-x86_64-linux-gnu.so,sha256=ATA_VRgLwxSaodOewnwuybXGwuoEb2HgPuCeoEMFaa8,609640
39
+ qubx/ta/indicators.cpython-311-x86_64-linux-gnu.so,sha256=8ujlX13vbwwHrmF-eIAFcpBG8pwEInIlseDbGkc7gUE,609640
40
40
  qubx/ta/indicators.pxd,sha256=eCJ9paOxtxbDFx4U5CUhcgB1jjCQAfVqMF2FnbJ03Lo,4222
41
41
  qubx/ta/indicators.pyi,sha256=NJlvN_774UV1U3_lvaYYbCEikLR8sOUo0TdcUGR5GBM,1940
42
42
  qubx/ta/indicators.pyx,sha256=FVkv5ld04TpZMT3a_kR1MU3IUuWfijzjJnh_lG78JxM,26029
@@ -54,6 +54,6 @@ qubx/utils/misc.py,sha256=-iqFcpY9jAxlpvQKeplsRUJsxUqT2bsGT5jhPqzDEvo,10450
54
54
  qubx/utils/ntp.py,sha256=LZo4FPVY3rqLUV9VWkLcZaPOpUDFC8Qleynmfggg9No,1758
55
55
  qubx/utils/runner.py,sha256=Czo01KUCc9Oj9TIcs03d6Qh7fOpQV5w8oH6UDZ6Yqn0,9539
56
56
  qubx/utils/time.py,sha256=fIVWYRmqRT1zkLIWy9jo_Fpfpc03S0sYyOcrHZcfF74,5198
57
- qubx-0.2.79.dist-info/METADATA,sha256=gCpqB97G2w_oueFLTJi_XMLFZ7OknD1fVSMpBKBA_5Q,2572
58
- qubx-0.2.79.dist-info/WHEEL,sha256=MLOa6LysROdjgj4FVxsHitAnIh8Be2D_c9ZSBHKrz2M,110
59
- qubx-0.2.79.dist-info/RECORD,,
57
+ qubx-0.2.81.dist-info/METADATA,sha256=Om3Z_WXzhg0HsII7Sqp1zBpB1r6NYyWyxaNBVbmFeSs,2572
58
+ qubx-0.2.81.dist-info/WHEEL,sha256=MLOa6LysROdjgj4FVxsHitAnIh8Be2D_c9ZSBHKrz2M,110
59
+ qubx-0.2.81.dist-info/RECORD,,
File without changes