Qubx 0.6.12__tar.gz → 0.6.14__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.12 → qubx-0.6.14}/PKG-INFO +1 -1
- {qubx-0.6.12 → qubx-0.6.14}/pyproject.toml +1 -1
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/account.py +3 -2
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/basics.py +3 -1
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/tardis.py +1 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/runner/_jupyter_runner.pyt +3 -3
- {qubx-0.6.12 → qubx-0.6.14}/README.md +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/build.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/_nb_magic.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/account.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/broker.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/data.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/management.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/ome.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/optimization.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/runner.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/simulated_data.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/simulator.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/backtester/utils.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/cli/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/cli/commands.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/cli/deploy.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/cli/misc.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/cli/release.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/account.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/broker.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/customizations.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/data.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/exceptions.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/factory.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/reader.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/connectors/ccxt/utils.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/context.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/exceptions.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/helpers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/initializer.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/interfaces.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/loggers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/lookups.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/metrics.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/mixins/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/mixins/market.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/mixins/processing.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/mixins/subscription.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/mixins/trading.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/mixins/universe.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/series.pxd +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/series.pyi +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/series.pyx +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/utils.pyi +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/core/utils.pyx +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/composite.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/helpers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/hft.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/readers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/data/registry.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/emitters/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/emitters/base.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/emitters/composite.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/emitters/prometheus.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/emitters/questdb.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/composite.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/formatters/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/formatters/base.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/formatters/incremental.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/formatters/slack.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/redis_streams.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/exporters/slack.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/features/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/features/core.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/features/orderbook.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/features/price.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/features/trades.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/features/utils.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/gathering/simplest.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/math/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/math/stats.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/notifications/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/notifications/composite.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/notifications/slack.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/pandaz/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/pandaz/ta.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/pandaz/utils.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/_build.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-binance.cm.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-binance.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-binance.um.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-bitfinex.f.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-bitfinex.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-kraken.f.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/resources/instruments/symbols-kraken.json +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restarts/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restarts/state_resolvers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restarts/time_finders.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/balance.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/factory.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/interfaces.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/position.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/signal.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/state.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/restorers/utils.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/ta/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/ta/indicators.pxd +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/ta/indicators.pyi +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/ta/indicators.pyx +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/trackers/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/trackers/advanced.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/trackers/composite.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/trackers/rebalancers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/trackers/riskctrl.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/trackers/sizers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/_pyxreloader.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/charting/lookinglass.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/charting/mpl_helpers.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/marketdata/binance.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/marketdata/ccxt.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/marketdata/dukas.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/misc.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/ntp.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/numbers_utils.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/orderbook.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/plotting/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/plotting/dashboard.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/plotting/data.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/plotting/interfaces.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/plotting/renderers/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/plotting/renderers/plotly.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/runner/__init__.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/runner/accounts.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/runner/configs.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/runner/runner.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/src/qubx/utils/time.py +0 -0
- {qubx-0.6.12 → qubx-0.6.14}/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.14"
|
|
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"
|
|
@@ -175,8 +175,9 @@ class BasicAccountProcessor(IAccountProcessor):
|
|
|
175
175
|
self._lock_limit_order_value(order)
|
|
176
176
|
|
|
177
177
|
if _closed or _cancel:
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
# TODO: (LIVE) WE NEED TO THINK HOW TO CLEANUP THIS COLLECTION !!!! -> @DM
|
|
179
|
+
# if order.id in self._processed_trades:
|
|
180
|
+
# self._processed_trades.pop(order.id)
|
|
180
181
|
|
|
181
182
|
if order.id in self._active_orders:
|
|
182
183
|
self._active_orders.pop(order.id)
|
|
@@ -679,7 +679,9 @@ class Position:
|
|
|
679
679
|
f"qty={self.quantity:.{self.instrument.size_precision}f}",
|
|
680
680
|
f"entryPrice={self.position_avg_price:.{self.instrument.price_precision}f}",
|
|
681
681
|
f"price={self.last_update_price:.{self.instrument.price_precision}f}",
|
|
682
|
-
f"
|
|
682
|
+
f"PNL: (unrealized={self.unrealized_pnl():.2f}",
|
|
683
|
+
f"realized={self.r_pnl:.2f}",
|
|
684
|
+
f"pnl={self.pnl:.2f})",
|
|
683
685
|
f"value={self.market_value_funds:.2f}",
|
|
684
686
|
]
|
|
685
687
|
)
|
|
@@ -181,7 +181,7 @@ def portfolio(all=True):
|
|
|
181
181
|
d = dict()
|
|
182
182
|
for s, p in ctx.get_positions().items():
|
|
183
183
|
mv = round(p.market_value_funds, 3)
|
|
184
|
-
if
|
|
184
|
+
if p.quantity != 0.0 or all:
|
|
185
185
|
d[dequotify(s.symbol)] = _pos_to_dict(p)
|
|
186
186
|
|
|
187
187
|
d = pd.DataFrame.from_dict(d, orient='index')
|
|
@@ -232,14 +232,14 @@ class IntMagics(Magics):
|
|
|
232
232
|
|
|
233
233
|
@line_cell_magic
|
|
234
234
|
def lp(self, line: str):
|
|
235
|
-
portfolio(
|
|
235
|
+
portfolio(any(x in line.lower() for x in ['true', 'all']))
|
|
236
236
|
|
|
237
237
|
@line_cell_magic
|
|
238
238
|
def add(self, line: str):
|
|
239
239
|
ctx + line.strip()
|
|
240
240
|
|
|
241
241
|
@line_cell_magic
|
|
242
|
-
def
|
|
242
|
+
def remove(self, line: str):
|
|
243
243
|
ctx - line.strip()
|
|
244
244
|
|
|
245
245
|
@line_cell_magic
|
|
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
|