Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,135 guests, and 2 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
Creating series of spread with / operation #463889
01/03/17 09:10
01/03/17 09:10
Joined: Apr 2013
Posts: 35
J
Joaquin Offline OP
Newbie
Joaquin  Offline OP
Newbie
J

Joined: Apr 2013
Posts: 35
Hi again,
I've found something weird and I don't know the reason. According to the documentation, one can create artificial series variables of different assets or of different series variables just by doing something like

vars spread = series(asset1[0] + asset2[0]);

Being asset1 and asset2 series of closing prices of 2 different assets.
So far so good. But what I was trying to do was

vars pairsRatio = series(asset1[0] / asset2[0]);

And that operation always gives 1 as a result.
It is not a big problem, as I have seen that

vars pairsRatio = series(asset1[0] * asset2[0]);

works correctly, so with this operation I can get what I was looking for. Just wanted to ask if this behavior with the / operation is normal or not...

Thanks again jcl!

Last edited by Joaquin; 01/03/17 09:11.
Re: Creating series of spread with / operation [Re: Joaquin] #463908
01/05/17 12:11
01/05/17 12:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, series(x/y) is not always 1 except when x and y are always equal. So check the values of asset1 and asset2.

Re: Creating series of spread with / operation [Re: jcl] #463949
01/09/17 10:00
01/09/17 10:00
Joined: Apr 2013
Posts: 35
J
Joaquin Offline OP
Newbie
Joaquin  Offline OP
Newbie
J

Joined: Apr 2013
Posts: 35
LOL . My fault, x and y were the same... Sorry!


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1