Skip to content

Commit 2a7ec08

Browse files
committed
agent 매도시 주당 매수 단가 갱신 bug fix
1 parent bb0dfe8 commit 2a7ec08

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

quantylab/rltrader/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def act(self, action, confidence):
168168
if invest_amount > 0:
169169
# 주당 매수 단가 갱신
170170
self.avg_buy_price = \
171-
(self.avg_buy_price * self.num_stocks - curr_price) \
171+
(self.avg_buy_price * self.num_stocks - curr_price * trading_unit) \
172172
/ (self.num_stocks - trading_unit) \
173173
if self.num_stocks > trading_unit else 0
174174
self.num_stocks -= trading_unit # 보유 주식 수를 갱신

0 commit comments

Comments
 (0)