Skip to content

Commit 6423fcd

Browse files
committed
DOC: Add notes about ajusted price being higher
1 parent 4aee89a commit 6423fcd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

backtesting/backtesting.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,14 @@ def __init__(self,
10601060
the commission, e.g. set it to `0.0002` for commission-less forex
10611061
trading where the average spread is roughly 0.2‰ of asking price.
10621062
1063+
.. note::
1064+
With nonzero `commission`, long and short orders will be placed
1065+
at an adjusted price that is slightly higher or lower (respectively)
1066+
than the current price. See e.g.
1067+
[#153](https://github.com/kernc/backtesting.py/issues/153),
1068+
[#538](https://github.com/kernc/backtesting.py/issues/538),
1069+
[#633](https://github.com/kernc/backtesting.py/issues/633).
1070+
10631071
`margin` is the required margin (ratio) of a leveraged account.
10641072
No difference is made between initial and maintenance margins.
10651073
To run the backtest using e.g. 50:1 leverge that your broker allows,

0 commit comments

Comments
 (0)