Backtesting and Optimization: add leverage and swap cost
Backtesting and Optimization: add leverage and swap cost
04 Oct 2023, 08:21
I do really like the backtesting and optimization functions of the platform and use it quite a bit.
When running optimization and backtesting there are options to input starting capital, commissions and spread.
It would be great if the following to input parameters could be added and set:
-Leverage and margin calls percentage
-Swap cost
1: Leverage and margin calls
The optimization does a great job of maximizing profit and limiting drawdowns. However the drawdown amount does frequently exceed the maximum drawdown and would trigger a margin call, liquidating positions. Taking leverage calls and margin calls percentage, based on the starting capital would add a lot of additional value to the results of the optimization and backtesting results.
2: swap cost
When positions are held overnight during optimizations and backtesting Swap cost are incurred. Adding this cost, either self set, or even better sourced directly from the broker symbol info, further enhancing the realism of the optimization and backtesting.
Thank you in advance for considering to add this to the platform.
Replies
ctid6447085
05 Oct 2023, 09:21
Thank you very much for this information. I have now a much better understanding how to read the results and what has been taken into account.
@ctid6447085
PanagiotisChar
05 Oct 2023, 06:06 ( Updated at: 05 Oct 2023, 06:09 )
Hi there,
Swaps are already there and the leverage is taken from your account. The only thing missing now is the stop outs
@PanagiotisChar