Skip to content

Commit

Permalink
修改拆分送股逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin-Dongzhao committed Jun 24, 2024
1 parent 2ee6f76 commit f72cc02
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit f72cc02

Please sign in to comment.