Skip to content

Commit 44aca75

Browse files
committed
update
1 parent c402794 commit 44aca75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rqalpha/mod/rqalpha_mod_sys_accounts/position_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ def _get_split_ratio(self, splits) -> Decimal:
273273
ratio = splits["split_coefficient_to"] / splits["split_coefficient_from"]
274274
return Decimal(ratio.cumprod[-1])
275275

276-
coefficient_to = (splits["split_coefficient_to"]).cumprod()[-1]
277-
coefficient_from = (splits["split_coefficient_from"]).cumprod()[-1]
276+
coefficient_to = (splits["split_coefficient_to"].astype(int)).cumprod()[-1]
277+
coefficient_from = (splits["split_coefficient_from"].astype(int)).cumprod()[-1]
278278
return Decimal(int(coefficient_to)) / Decimal(int(coefficient_from))
279279

280280
def _handle_split(self, trading_date, data_proxy) -> float:

0 commit comments

Comments
 (0)