Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6423fcd

Browse filesBrowse files
committed
DOC: Add notes about ajusted price being higher
1 parent 4aee89a commit 6423fcd
Copy full SHA for 6423fcd

1 file changed

+8Lines changed: 8 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎backtesting/backtesting.py‎

Copy file name to clipboardExpand all lines: backtesting/backtesting.py
+8Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.