Huge rollover cost in backtest even with cost set to 0 ?

Posted By: Dalla

Huge rollover cost in backtest even with cost set to 0 ? - 05/22/17 12:57

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
Posted By: Dalla

Re: Huge rollover cost in backtest even with cost set to 0 ? - 05/22/17 14:21

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.
Posted By: Dalla

Re: Huge rollover cost in backtest even with cost set to 0 ? - 05/26/17 11:53

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.
Posted By: Dalla

Re: Huge rollover cost in backtest even with cost set to 0 ? - 05/26/17 12:35

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
Posted By: jcl

Re: Huge rollover cost in backtest even with cost set to 0 ? - 06/09/17 14:51

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.
Posted By: Dalla

Re: Huge rollover cost in backtest even with cost set to 0 ? - 06/09/17 15:20

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.
Posted By: jcl

Re: Huge rollover cost in backtest even with cost set to 0 ? - 06/10/17 11:57

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?
Posted By: Dalla

Re: Huge rollover cost in backtest even with cost set to 0 ? - 06/10/17 18:48

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.
© 2024 lite-C Forums