MarginCost vs Leverage

Posted By: kujo

MarginCost vs Leverage - 01/28/18 22:37

Hello,

It’s possible to enter both MarginCost and Leverage in an asset list. As I understand, for a proper backtest the following parameters should be used in the asset list:
  • For brokers that are using fixed margin (like, FXCM) the MarginCost should be entered in the asset list (entered Leverage in this case will be ignored). MarginCost remains constant throughout a backtest unless it’s updates, for example, once a month with the formula: MarginCost = Initial MarginCost * Asset Price / InitialPrice.
  • For brokers with variable margin (like, Global Prima, OANDA, etc.) MarginCost should be 0 and Leverage value should be entered. In this case the MarginCost is calculated from the leverage and the current asset price.

Do I understand this correctly?

Now about the MarginVal in a backtest. MarginVal of an open trade remains constant until the trade is closed even if MarginCost changes. MarginVal could be calculated in a script to be in align with MarginCost changes. Right?

Please correct me if I’m wrong.
Posted By: jcl

Re: MarginCost vs Leverage - 01/29/18 09:41

That's right. The margin is allocated when the position is opened, so furter margin cost changes have normally no effect in the backtest.
© 2024 lite-C Forums