Skip to content

Commit 62e2e4d

Browse files
committed
Add trade cost adjustment in StockPosition class
1 parent 73e5878 commit 62e2e4d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rqalpha/mod/rqalpha_mod_sys_accounts/position_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def settlement(self, trading_date):
190190
delta_cash = self.market_value_local
191191
if self.cash_return_by_stock_delisted:
192192
delta_cash = self.market_value_local
193+
self._trade_cost = -self.market_value # 相当于卖掉了,所以给一个负成本
193194
self._quantity = self._old_quantity = 0
194195
self._queue.clear()
195196
return delta_cash

0 commit comments

Comments
 (0)