We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990ac10 commit 55f84d7Copy full SHA for 55f84d7
backtesting/backtesting.py
@@ -735,7 +735,10 @@ def last_price(self) -> float:
735
return self._data.Close[-1]
736
737
def _adjusted_price(self, size=None, price=None) -> float:
738
- """ Long/short `price`, adjusted for commitions."""
+ """
739
+ Long/short `price`, adjusted for commisions.
740
+ In long positions, the adjusted price is a fraction higher, and vice versa.
741
742
return (price or self.last_price) * (1 + copysign(self._commission, size))
743
744
@property
0 commit comments