Gamestudio Links
Zorro Links
Newest Posts
Alternative to Stooq for Zorro S
by cwford. 10/09/26 00:46
Stooq now requires an API key
by cwford. 10/08/26 23:27
ZorroGPT
by TipmyPip. 10/06/26 05:32
Purchase A8 full licence version
by jcl. 10/05/26 12:12
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (cwford, AndrewAMD, JeyKey II), 21,007 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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,139
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,139
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