Qubx 0.6.12__cp312-cp312-manylinux_2_39_x86_64.whl → 0.6.13__cp312-cp312-manylinux_2_39_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/core/account.py CHANGED
@@ -175,8 +175,9 @@ class BasicAccountProcessor(IAccountProcessor):
175
175
  self._lock_limit_order_value(order)
176
176
 
177
177
  if _closed or _cancel:
178
- if order.id in self._processed_trades:
179
- self._processed_trades.pop(order.id)
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)
qubx/core/basics.py CHANGED
@@ -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"pnl={self.unrealized_pnl():.2f}",
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 mv != 0.0 or all:
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('true' in line)
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 rm(self, line: str):
242
+ def remove(self, line: str):
243
243
  ctx - line.strip()
244
244
 
245
245
  @line_cell_magic
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: Qubx
3
- Version: 0.6.12
3
+ Version: 0.6.13
4
4
  Summary: Qubx - Quantitative Trading Framework
5
5
  Author: Dmitry Marienko
6
6
  Author-email: dmitry.marienko@xlydian.com
@@ -26,8 +26,8 @@ qubx/connectors/ccxt/factory.py,sha256=KROJ9-7zfoKZuess99UZMzgsZakISbN3XDOkEB-Ev
26
26
  qubx/connectors/ccxt/reader.py,sha256=qaZIaOZkRf3Rz31ZrEqqAv4kATk5zDlSq-LK1jziBs8,8314
27
27
  qubx/connectors/ccxt/utils.py,sha256=kWeYQ1Z9TxFTbgJgBh5o77mGB1g09l2AkiFdR6guDQY,11141
28
28
  qubx/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- qubx/core/account.py,sha256=Ewzmr1jxyLROnWshtx_ngi7fna1cH42NJ5wVRyP4dmQ,10411
30
- qubx/core/basics.py,sha256=sPB3dL0FYF_bYALySnUrOwGLQfKb7B9dkK3PIV1MCFM,29364
29
+ qubx/core/account.py,sha256=dFd3c4NvybzJPI0y09T-L1fFvmeeYdRcKorAW4Mqf4g,10498
30
+ qubx/core/basics.py,sha256=fynmFt6n8dc-9g9IuaXxixB8x52VQ1yFQDDK_FH3LmU,29463
31
31
  qubx/core/context.py,sha256=t4A1sWM6dn4t-LSKOC-66x4Y-_5aGduEedO_Gmd3Yrg,20593
32
32
  qubx/core/exceptions.py,sha256=ONFzWISjWfb2S0kEIorq-3L4MdhNR-xkHftHQALOZ0U,533
33
33
  qubx/core/helpers.py,sha256=9nl9L_ZzT1HsMC9VthMqXfmuRS_37crB-9bVfIRHeOs,19631
@@ -42,11 +42,11 @@ qubx/core/mixins/processing.py,sha256=Ny9EyrTuF_YBmPsAebykV54OfGMBGE1gSam9VFJJKa
42
42
  qubx/core/mixins/subscription.py,sha256=J_SX0CNw2bPy4bhxe0vswvDXY4LCkwXSaj_1PepKRLY,8540
43
43
  qubx/core/mixins/trading.py,sha256=KApWQE0zIh1jg_9HezLdR-mp3UEYIdylSyX9MajHmCc,3618
44
44
  qubx/core/mixins/universe.py,sha256=1ya2P3QZrsAVXmMXqq0t6CHGAC5iMGVD2ARUAtSfv04,10062
45
- qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=oGjkxetdjaacB1CRU3AZ09xbh8T8AsNhl5DswDeWs9Q,970056
45
+ qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=v_frHIGYUNXCnQyIxVrl7ZAMDtsheVQGmO_RtuPwl2s,970056
46
46
  qubx/core/series.pxd,sha256=ZA9mBrZ-ha112ZMZnBIun1kNrKjxzlaOoq4D_cDZYJw,3923
47
47
  qubx/core/series.pyi,sha256=r6o2SnYIBujmJuuoM8oEc3tbVg2Blz2CfSIdRKn9VMo,4547
48
48
  qubx/core/series.pyx,sha256=Y6GbCihO3zgUWOF9UvmyXisWLnGcVOcFl2u1ZtvM1zI,44909
49
- qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=WIcuOQ9itXm60-ItviKaUZHRSlARcCz0e-925ZpzSio,86568
49
+ qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=VFhCQch8GkwoZbX3gwHMw97CvAAohfn-wCx74mrttTw,86568
50
50
  qubx/core/utils.pyi,sha256=a-wS13V2p_dM1CnGq40JVulmiAhixTwVwt0ah5By0Hc,348
51
51
  qubx/core/utils.pyx,sha256=k5QHfEFvqhqWfCob89ANiJDKNG8gGbOh-O4CVoneZ8M,1696
52
52
  qubx/data/__init__.py,sha256=ELZykvpPGWc5rX7QoNyNQwMLgdKMG8MACOByA4pM5hA,549
@@ -104,7 +104,7 @@ qubx/restorers/signal.py,sha256=DBLqA7vDhoMTAzUC4N9UerrO0GbjeHdTeMoCz7U7iI8,6621
104
104
  qubx/restorers/state.py,sha256=ePmh604fp2kRYzMNXL-TWvZOxmtTGAaKYfHJcnKResY,4042
105
105
  qubx/restorers/utils.py,sha256=We2gfqwQKWziUYhuUnjb-xo-5tSlbuHWpPQn0CEMTn0,1155
106
106
  qubx/ta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
- qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=JfqqbFytabhLARoUwoDKuGXw3uPrl6Tf0eg8L944pB4,654440
107
+ qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=ntNBoKDFKjgf-UORjJjrPvEQxw736N0WHx8zEkSU9go,654440
108
108
  qubx/ta/indicators.pxd,sha256=eCJ9paOxtxbDFx4U5CUhcgB1jjCQAfVqMF2FnbJ03Lo,4222
109
109
  qubx/ta/indicators.pyi,sha256=19W0uERft49In5bf9jkJHkzJYEyE9gzudN7_DJ5Vdv8,1963
110
110
  qubx/ta/indicators.pyx,sha256=FVkv5ld04TpZMT3a_kR1MU3IUuWfijzjJnh_lG78JxM,26029
@@ -132,13 +132,13 @@ qubx/utils/plotting/interfaces.py,sha256=mtRcoWIMt2xkv-Tc2ZgXZQpr5HRiWhPcqkIslzZ
132
132
  qubx/utils/plotting/renderers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
133
  qubx/utils/plotting/renderers/plotly.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
134
  qubx/utils/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
- qubx/utils/runner/_jupyter_runner.pyt,sha256=0f6ZdfhM1BYoWFuZVqwZj7jvlv7_PZE1upJ3Tx9L2NI,9198
135
+ qubx/utils/runner/_jupyter_runner.pyt,sha256=41dLQeI2EL4wJjBDht2qKbgISgS5DtmJ6XtPWE9NWGs,9243
136
136
  qubx/utils/runner/accounts.py,sha256=brf_RP22-nFlpyLg-eES-4pCikqev-I7OHa2bnLDK6o,3304
137
137
  qubx/utils/runner/configs.py,sha256=vtl04A42kT21hD68zpoZZw96rEC8HnFFX9en0Y85GLA,3131
138
138
  qubx/utils/runner/runner.py,sha256=kwigJ9MgBcOkDpYAHj2TuwQzNerwyUWaE4UmyNYxD34,37910
139
139
  qubx/utils/time.py,sha256=J0ZFGjzFL5T6GA8RPAel8hKG0sg2LZXeQ5YfDCfcMHA,10055
140
140
  qubx/utils/version.py,sha256=e52fIHyxzCiIuH7svCF6pkHuDlqL64rklqz-2XjWons,5309
141
- qubx-0.6.12.dist-info/METADATA,sha256=wrLTsq0yccxDnyeB2sHqCU6p6jiS8A5DjHZtivEVoWI,4142
142
- qubx-0.6.12.dist-info/WHEEL,sha256=h1DdjcD2ZFnKGsDLjEycQhNNPJ5l-R8qdFdDSXHrAGY,110
143
- qubx-0.6.12.dist-info/entry_points.txt,sha256=VqilDTe8mVuV9SbR-yVlZJBTjbkHIL2JBgXfQw076HY,47
144
- qubx-0.6.12.dist-info/RECORD,,
141
+ qubx-0.6.13.dist-info/METADATA,sha256=ZkNA2-y6Jf7P0jd1GUSJ-qHCVTWj05sXXIv_7i6MY5w,4142
142
+ qubx-0.6.13.dist-info/WHEEL,sha256=h1DdjcD2ZFnKGsDLjEycQhNNPJ5l-R8qdFdDSXHrAGY,110
143
+ qubx-0.6.13.dist-info/entry_points.txt,sha256=VqilDTe8mVuV9SbR-yVlZJBTjbkHIL2JBgXfQw076HY,47
144
+ qubx-0.6.13.dist-info/RECORD,,
File without changes