Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 429 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Huge rollover cost in backtest even with cost set to 0 ? #466033
05/22/17 12:57
05/22/17 12:57
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
I'm currently having issues with one of my backtests that generating unexpected results.

I have set the following parameters in my script:
RollLong = RollShort = 0;

Even so, when testing this strategy, the transaction costs show huge losses incurred due to unreasonably high rollover costs. How can this be?

Transaction costs -3019$ spr, -670$ slp, -630500$ rol

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: Dalla] #466038
05/22/17 14:21
05/22/17 14:21
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
I'm reading the follwing in the manual:
"Daily rollover fee ("swap") for long resp. short trades per contract, resp. per 10000 contracts for currencies. This is the interest that is added to or subtracted from the account for holding trades overnight. Account currency units; accessible with the RollLong/Short variables. On Wednesdays it is often three times higher for compensating the weekend when no rollover fee is charged. When manually entering them, make sure to convert them to 10,000 contracts for currency pairs."

How does Zorro know if an asset is a currency pair or not?
I'm having the above issue only when backtesting mini contracts, not standard contracts. This make me think that my naming somehow makes Zorro treat the mini contracts as a non-currency asset. That would at least explain the huge rollover cost.

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: Dalla] #466130
05/26/17 11:53
05/26/17 11:53
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
This seems to happen with commision as well.
My asset name is "EUR/USD_mini" rather than just "EUR/USD".

The reason why RollLong = RollShort = 0; did not work was because I had placed it before my asset loop.

Still, if I remove that line my roll over is a factor 10000, which suggest my asset is not classified as a currency byt Zorro.

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: Dalla] #466132
05/26/17 12:35
05/26/17 12:35
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
This simple script shows that Zorry does not consider my asset to be a currency

void main()
{
printf("nEUR/USD asset type %i", assetType("EUR/USD"));
printf("nEUR/USD mini asset type %i", assetType("EUR/USD_mini"));
}

gives output
EUR/USD asset type 1
EUR/USD mini asset type 0

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: Dalla] #466335
06/09/17 14:51
06/09/17 14:51
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Yes. A currency has always 3 letters in capitals, such as "EUR". A forex pair name consists of two currencies. You cannot use names like "mini" for a currency.

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: jcl] #466336
06/09/17 15:20
06/09/17 15:20
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
OK, is there any way to work around this currently?
Can I for example have a "EUR/USD" for standard contract and a "EUR/USM" to denote USM as a mini contract, or does Zorro validate the currency names as well?

I guess IG is kind of special in having mini contracts rather than mini accounts.

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: Dalla] #466348
06/10/17 11:57
06/10/17 11:57
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
No, "USM" would not be recognized as a valid currency. You should really name it "EUR/USD". This way you can trade only one type of EUR/USD in your script - at least I would not see much sense in trading mini and standard types at the same time. Why don't you use only the type with the better parameters, like lower costs?

Re: Huge rollover cost in backtest even with cost set to 0 ? [Re: jcl] #466350
06/10/17 18:48
06/10/17 18:48
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
Yeah you're right, it doesn't make sense to use both in the same time. Perhaps just having two separate assets lists for standard and mini contract would be a viable solution.
Standard contracts have a little bit lower roll over cost, but I don't have the margin to handle standard contracts at this point.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1