Qubx 0.2.79__tar.gz → 0.2.81__tar.gz

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.

Files changed (57) hide show
  1. {qubx-0.2.79 → qubx-0.2.81}/PKG-INFO +1 -1
  2. {qubx-0.2.79 → qubx-0.2.81}/pyproject.toml +1 -1
  3. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/data/helpers.py +6 -0
  4. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/pandaz/utils.py +2 -2
  5. {qubx-0.2.79 → qubx-0.2.81}/README.md +0 -0
  6. {qubx-0.2.79 → qubx-0.2.81}/build.py +0 -0
  7. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/__init__.py +0 -0
  8. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/_nb_magic.py +0 -0
  9. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/backtester/__init__.py +0 -0
  10. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/backtester/ome.py +0 -0
  11. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/backtester/optimization.py +0 -0
  12. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/backtester/queue.py +0 -0
  13. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/backtester/simulator.py +0 -0
  14. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/__init__.py +0 -0
  15. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/account.py +0 -0
  16. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/basics.py +0 -0
  17. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/context.py +0 -0
  18. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/exceptions.py +0 -0
  19. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/helpers.py +0 -0
  20. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/loggers.py +0 -0
  21. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/lookups.py +0 -0
  22. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/metrics.py +0 -0
  23. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/series.pxd +0 -0
  24. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/series.pyi +0 -0
  25. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/series.pyx +0 -0
  26. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/strategy.py +0 -0
  27. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/utils.pyi +0 -0
  28. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/core/utils.pyx +0 -0
  29. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/data/__init__.py +0 -0
  30. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/data/readers.py +0 -0
  31. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/gathering/simplest.py +0 -0
  32. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/impl/ccxt_connector.py +0 -0
  33. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/impl/ccxt_customizations.py +0 -0
  34. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/impl/ccxt_trading.py +0 -0
  35. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/impl/ccxt_utils.py +0 -0
  36. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/math/__init__.py +0 -0
  37. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/math/stats.py +0 -0
  38. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/pandaz/__init__.py +0 -0
  39. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/pandaz/ta.py +0 -0
  40. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/ta/__init__.py +0 -0
  41. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/ta/indicators.pxd +0 -0
  42. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/ta/indicators.pyi +0 -0
  43. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/ta/indicators.pyx +0 -0
  44. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/trackers/__init__.py +0 -0
  45. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/trackers/composite.py +0 -0
  46. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/trackers/rebalancers.py +0 -0
  47. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/trackers/riskctrl.py +0 -0
  48. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/trackers/sizers.py +0 -0
  49. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/__init__.py +0 -0
  50. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/_pyxreloader.py +0 -0
  51. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/charting/lookinglass.py +0 -0
  52. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/charting/mpl_helpers.py +0 -0
  53. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/marketdata/binance.py +0 -0
  54. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/misc.py +0 -0
  55. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/ntp.py +0 -0
  56. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/runner.py +0 -0
  57. {qubx-0.2.79 → qubx-0.2.81}/src/qubx/utils/time.py +0 -0
@@ -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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "Qubx"
3
- version = "0.2.79"
3
+ version = "0.2.81"
4
4
  description = "Qubx - quantitative trading framework"
5
5
  authors = ["Dmitry Marienko <dmitry@gmail.com>", "Yuriy Arabskyy <yuriy.arabskyy@gmail.com>"]
6
6
  readme = "README.md"
@@ -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:
@@ -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)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes