Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, degenerate_762, AndrewAMD, ozgur), 774 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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