Hello,
I’d like to discuss how the asset parameters like Spread, Rollover and PIPCost affect the backtest results and how to make the results close to the live trading results. Below are my thoughts. You are encouraged to add your ideas and share your experience!
1. PIPCostManual says that this value should normally remain constant during the simulation for not adding artifacts to the result. If desired for special purposes, it can be calculated by script to fluctuate with the exchange rate.
I wonder what artifacts are meant and in what cases it’s better to calculate PIPCost in a script?
2. RollLong / RollShortI believe that the ideal case is to use historical rollover costs but it’s not always possible to get this data. In this case, we assume that the rollover is a constant value and enter it into an asset list. However, Rollover costs depend on a number of variables. These variables could change dramatically throughout a backtest and can falsify backtest results, especially when it’s a long-term strategy and trades are open for a long period of time. It’s recommended to measure performance results in the worst cases to understand what to expect during the live trading.
In case of Forex, rollover costs are roughly proportional to the interest rate differential and depend on exchange rates (or PIPCost). In order to avoid false positives manual suggests to set RollShort and RollLong to their minimum (RollLong = RollShort = min(RollLong,RollShort).
In case of the stock market, rollover depends on a current asset price, an interest rate and leverage (IR / 360 * price * (1 - 1/leverage). Therefore using the highest interest rate and the current asset price (there is an assumption that the market goes up and the current price is higher then previous prices) should be relatively safe.
From your experience in what cases it’s save to use constant Rollover costs (current values) and in what cases they affect the results a lot? If current rollover values are not an option what is the best substitute?
3. SpreadAs with the rollover, the best case is to use a historical spread for backtesting. However, sometimes this data is unavailable or the spread doesn’t change much. So, we have to we assume that the spread is a constant. This constant can be the current spread but maybe it’s not the best spread representation for a several years backtest. I believe, it’s better to use an average spread (or an average spread * k, where k=1,2, etc.; average spread data can be retrieved from
https://www.myfxbook.com/forex-broker-spreads, for example). Manual also suggests to set Spread to a high percentile of a one-day sample to be on the safe side.
I wonder what the best option is and pros and cons depending on the situation?
Please feel free to comment.