Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (dBc), 18,004 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
MarginCost vs Leverage #470653
01/28/18 22:37
01/28/18 22:37
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline OP
Member
kujo  Offline OP
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
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.

Re: MarginCost vs Leverage [Re: kujo] #470662
01/29/18 09:41
01/29/18 09:41
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
That's right. The margin is allocated when the position is opened, so furter margin cost changes have normally no effect in the backtest.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1