logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ageitalia  
#1 Posted : Tuesday, February 8, 2011 1:28:15 AM(UTC)
ageitalia

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.
johnl  
#2 Posted : Tuesday, February 8, 2011 7:02:25 PM(UTC)
johnl

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.

wabbit  
#3 Posted : Wednesday, February 9, 2011 2:00:30 AM(UTC)
wabbit

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]

ageitalia  
#4 Posted : Wednesday, February 9, 2011 7:19:06 AM(UTC)
ageitalia

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)
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.