Skip to content

Commit 55f84d7

Browse files
committed
DOC: Minor fix a docstring
1 parent 990ac10 commit 55f84d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backtesting/backtesting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,10 @@ def last_price(self) -> float:
735735
return self._data.Close[-1]
736736

737737
def _adjusted_price(self, size=None, price=None) -> float:
738-
""" Long/short `price`, adjusted for commitions."""
738+
"""
739+
Long/short `price`, adjusted for commisions.
740+
In long positions, the adjusted price is a fraction higher, and vice versa.
741+
"""
739742
return (price or self.last_price) * (1 + copysign(self._commission, size))
740743

741744
@property

0 commit comments

Comments
 (0)