Skip to content

Commit

Permalink
Add back commission allowance to address missed buys due to pricing d…
Browse files Browse the repository at this point in the history
…iscrepancy
  • Loading branch information
enzoampil committed Jun 27, 2021
1 parent 9e28316 commit a0b5c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/fastquant/strategies/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def next(self):
# Afforded size is based on closing price for the current trading day
# Margin is required for buy commission
# Add allowance to commission per transaction (avoid margin)
afforded_size = self.cash / (self.dataclose[0] * (1 + self.commission))
afforded_size = self.cash / (self.dataclose[0] * (1 + self.commission + 0.001))
buy_prop_size = afforded_size * self.buy_prop

# Used for take profit method
Expand Down

0 comments on commit a0b5c83

Please sign in to comment.