Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (Ayumi), 662 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
Unexpected behaviour with transaction costs #477866
08/07/19 21:23
08/07/19 21:23
Joined: Oct 2018
Posts: 72
J
JamesHH Offline OP
Junior Member
JamesHH  Offline OP
Junior Member
J

Joined: Oct 2018
Posts: 72
I have the line:

Spread = RollLong = RollShort = Commission = Slippage = 0;

in my run() loop, yet when I run this strategy with 4 assets, Zorro is calculating nonzero transaction costs in the results:

Transaction costs -1.26$ spr, 0$ slp, 0$ rol, -1.26$ com

Debugging with printf(...) shows that the Spread is 0 for 2 of the assets, but 0.01 for the other 2. Is this not incorrect behaviour?

When I add

Spread = Commission = 0;

inside the while(loop(Assets)) loop, the transaction costs are then 0, but is that supposed to be necessary?

Re: Unexpected behaviour with transaction costs [Re: JamesHH] #477868
08/08/19 06:48
08/08/19 06:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Definitely.

Re: Unexpected behaviour with transaction costs [Re: jcl] #477871
08/08/19 17:45
08/08/19 17:45
Joined: Oct 2018
Posts: 72
J
JamesHH Offline OP
Junior Member
JamesHH  Offline OP
Junior Member
J

Joined: Oct 2018
Posts: 72
Yeah, that makes sense, that the values are taken from the AssetList file unless specifically overridden.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1