Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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