Skip to content

Commit

Permalink
Merge pull request #888 from ricequant/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Cuizi7 authored Jun 26, 2024
2 parents 5821e6a + 3238f91 commit d703cff
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests
numpy
numpy < 2.0.0
pandas >=0.18.1
python-dateutil >=2.5.3
six >=1.10.0
Expand Down
4 changes: 2 additions & 2 deletions rqalpha/mod/rqalpha_mod_sys_accounts/position_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ def _handle_split(self, trading_date, data_proxy):
self._last_price /= ratio
ratio = Decimal(ratio)
# int(6000 * 1.15) -> 6899
self._old_quantity = self._quantity = int(Decimal(self._quantity) * ratio)
self._logical_old_quantity = int(Decimal(self._logical_old_quantity) * ratio)
self._old_quantity = self._quantity = round(Decimal(self._quantity) * ratio)
self._logical_old_quantity = round(Decimal(self._logical_old_quantity) * ratio)


class FuturePosition(Position):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[metadata]
name = rqalpha
version = 5.4.0
version = 5.4.1

[versioneer]
VCS = git
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

requirements = [
'requests',
'numpy',
'numpy < 2.0.0',
'pandas >=1.0.5',
'python-dateutil',
'six',
Expand Down
Binary file modified tests/outs/test_f_mean_reverting.pkl
Binary file not shown.
Binary file modified tests/outs/test_f_tick_size.pkl
Binary file not shown.

0 comments on commit d703cff

Please sign in to comment.