Qubx 0.6.9__tar.gz → 0.6.10__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.
- {qubx-0.6.9 → qubx-0.6.10}/PKG-INFO +1 -1
- {qubx-0.6.9 → qubx-0.6.10}/pyproject.toml +1 -1
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/account.py +1 -2
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/runner/configs.py +1 -1
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/runner/runner.py +20 -10
- {qubx-0.6.9 → qubx-0.6.10}/README.md +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/build.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/_nb_magic.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/account.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/broker.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/data.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/management.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/ome.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/optimization.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/runner.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/simulated_data.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/simulator.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/backtester/utils.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/cli/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/cli/commands.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/cli/deploy.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/cli/misc.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/cli/release.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/account.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/broker.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/customizations.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/data.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/exceptions.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/factory.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/reader.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/connectors/ccxt/utils.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/basics.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/context.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/exceptions.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/helpers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/initializer.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/interfaces.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/loggers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/lookups.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/metrics.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/mixins/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/mixins/market.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/mixins/processing.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/mixins/subscription.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/mixins/trading.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/mixins/universe.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/series.pxd +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/series.pyi +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/series.pyx +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/utils.pyi +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/core/utils.pyx +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/composite.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/helpers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/hft.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/readers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/registry.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/data/tardis.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/emitters/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/emitters/base.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/emitters/composite.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/emitters/prometheus.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/emitters/questdb.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/composite.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/formatters/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/formatters/base.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/formatters/incremental.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/formatters/slack.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/redis_streams.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/exporters/slack.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/features/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/features/core.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/features/orderbook.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/features/price.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/features/trades.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/features/utils.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/gathering/simplest.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/math/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/math/stats.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/notifications/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/notifications/composite.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/notifications/slack.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/pandaz/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/pandaz/ta.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/pandaz/utils.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/_build.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-binance.cm.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-binance.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-binance.um.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-bitfinex.f.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-bitfinex.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-kraken.f.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/resources/instruments/symbols-kraken.json +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restarts/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restarts/state_resolvers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restarts/time_finders.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/balance.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/factory.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/interfaces.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/position.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/signal.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/state.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/restorers/utils.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/ta/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/ta/indicators.pxd +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/ta/indicators.pyi +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/ta/indicators.pyx +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/trackers/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/trackers/advanced.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/trackers/composite.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/trackers/rebalancers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/trackers/riskctrl.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/trackers/sizers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/_pyxreloader.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/charting/lookinglass.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/charting/mpl_helpers.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/marketdata/binance.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/marketdata/ccxt.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/marketdata/dukas.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/misc.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/ntp.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/numbers_utils.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/orderbook.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/plotting/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/plotting/dashboard.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/plotting/data.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/plotting/interfaces.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/plotting/renderers/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/plotting/renderers/plotly.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/runner/__init__.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/runner/_jupyter_runner.pyt +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/runner/accounts.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/time.py +0 -0
- {qubx-0.6.9 → qubx-0.6.10}/src/qubx/utils/version.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "Qubx"
|
|
7
|
-
version = "0.6.
|
|
7
|
+
version = "0.6.10"
|
|
8
8
|
description = "Qubx - Quantitative Trading Framework"
|
|
9
9
|
authors = [ "Dmitry Marienko <dmitry.marienko@xlydian.com>", "Yuriy Arabskyy <yuriy.arabskyy@xlydian.com>",]
|
|
10
10
|
readme = "README.md"
|
|
@@ -62,9 +62,8 @@ class BasicAccountProcessor(IAccountProcessor):
|
|
|
62
62
|
def get_total_capital(self) -> float:
|
|
63
63
|
# sum of cash + market value of all positions
|
|
64
64
|
_cash_amount = self._balances[self.base_currency].total
|
|
65
|
-
_r_pnl = sum([p.r_pnl for p in self._positions.values()])
|
|
66
65
|
_positions_value = sum([p.market_value_funds for p in self._positions.values()])
|
|
67
|
-
return _cash_amount + _positions_value
|
|
66
|
+
return _cash_amount + _positions_value
|
|
68
67
|
|
|
69
68
|
def get_balances(self) -> dict[str, AssetBalance]:
|
|
70
69
|
return self._balances
|
|
@@ -742,13 +742,19 @@ def _create_data_type_readers(warmup: WarmupConfig | None) -> dict[str, DataRead
|
|
|
742
742
|
data_type_to_reader = {} # Maps data type to reader instance
|
|
743
743
|
|
|
744
744
|
for typed_reader_config in warmup.readers:
|
|
745
|
-
|
|
746
|
-
|
|
745
|
+
data_types = typed_reader_config.data_type
|
|
746
|
+
if isinstance(data_types, str):
|
|
747
|
+
data_types = [data_types]
|
|
748
|
+
readers_for_types = []
|
|
747
749
|
|
|
748
750
|
for reader_config in typed_reader_config.readers:
|
|
749
751
|
# Create a hashable representation of the reader config
|
|
750
|
-
#
|
|
751
|
-
|
|
752
|
+
# Create a hashable key from reader name and stringified args
|
|
753
|
+
if reader_config.args:
|
|
754
|
+
args_str = str(reader_config.args)
|
|
755
|
+
reader_key = f"{reader_config.reader}:{args_str}"
|
|
756
|
+
else:
|
|
757
|
+
reader_key = reader_config.reader
|
|
752
758
|
|
|
753
759
|
# Check if we've already created this reader
|
|
754
760
|
if reader_key not in unique_readers:
|
|
@@ -761,14 +767,18 @@ def _create_data_type_readers(warmup: WarmupConfig | None) -> dict[str, DataRead
|
|
|
761
767
|
logger.error(f"Reader {reader_config.reader} could not be created: {e}")
|
|
762
768
|
raise
|
|
763
769
|
|
|
764
|
-
# Add the reader to the list for
|
|
765
|
-
|
|
770
|
+
# Add the reader to the list for these data types
|
|
771
|
+
readers_for_types.append(unique_readers[reader_key])
|
|
766
772
|
|
|
767
773
|
# Create a composite reader if needed, or use the single reader
|
|
768
|
-
if len(
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
774
|
+
if len(readers_for_types) > 1:
|
|
775
|
+
composite_reader = CompositeReader(readers_for_types)
|
|
776
|
+
for data_type in data_types:
|
|
777
|
+
data_type_to_reader[data_type] = composite_reader
|
|
778
|
+
elif len(readers_for_types) == 1:
|
|
779
|
+
single_reader = readers_for_types[0]
|
|
780
|
+
for data_type in data_types:
|
|
781
|
+
data_type_to_reader[data_type] = single_reader
|
|
772
782
|
|
|
773
783
|
return data_type_to_reader
|
|
774
784
|
|
|
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
|
|
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
|
|
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
|
|
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
|