Discussions
»
Product and Service Development
»
Formula Assistance
»
Taking the highest and lowest value of an indicator for each time period
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 6/16/2006(UTC) Posts: 47 Location: Italy
Thanks: 6 times
|
Hi everybody.
Let's say I have ten different rate of change (ROC) for each stock index. So each month I have ten different ROCs:
roc1:=roc(Security("Path1"),1,%);
roc2:=roc(Security("Path2"),1,%);
...
roc10:=roc(Security("Path10"),1,%);
Now...
I need to know for each period the highest and lowest value for each group of roc.
So, should for the latest day be roc4 the highest and roc7 the lowest, the formula needed would return these two values. Better, I need the difference between the highest and the lowest value.
I supposed something like hhv(roc1, roc2, ..., roc10)-llv(roc1, roc2, ..., roc10) would be fine, but it looks like it's a wrong syntax.
So I would appreciate so much your hints...
Greetings,
Gae.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
The ugly way would be:
a1:=If(roc1>roc2,roc1,roc2); a1:=If(roc3>a1,roc3,a1); a1:=If(roc4>a1,roc4,a1); a1:=If(roc5>a1,roc5,a1); a1:=If(roc6>a1,roc6,a1); a1:=If(roc7>a1,roc7,a1); a1:=If(roc8>a1,roc8,a1); a1:=If(roc9>a1,roc9,a1); a1:=If(roc10>a1,roc10,a1); a1
Reverse sign for the lowest.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Max(Max(Max(w,x),y),z)
etc
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 6/16/2006(UTC) Posts: 47 Location: Italy
Thanks: 6 times
|
wabbit wrote:Max(Max(Max(w,x),y),z)
etc
wabbit [:D]
Thanks a lot!
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Taking the highest and lowest value of an indicator for each time period
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.