For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
How to mimic forex spread in backtest?
-
I am using backtrader to backtest my strategy for forex trading. In live trading there is spread (difference) between the buy and sell price of a currency. For example, the price of euro/usd is 1.1850/1.1857, meaning when I buy one euro, I need to pay $1.1857; yet when I sell one euro, I can only get $1.1850. This spread can really make a difference to the profit of my strategy.
How can take the spread into consideration when doing backtest?
-