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

Notification

Icon
Error

Options
Go to last post Go to first unread
oem7110  
#1 Posted : Wednesday, July 31, 2013 11:16:34 PM(UTC)
oem7110

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/30/2005(UTC)
Posts: 120

As a build-in function, I would like to know what Relative Performance Formula is,

Does anyone have any suggestions?

Thanks in advance for any suggestions

mstt  
#2 Posted : Thursday, August 1, 2013 3:06:38 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi oem

Here's a manual version of the indicator I created a while back. In it you can set up five favourite reference securities (with pathname) and replicate the MetaStock Relative Performance indicator. The calculation is quite simple and is shown in bold twxt in the last two sections. Hope this helps.

Roy


{Relative Performance (Manual)}
{Roy Larsen 2011, 19/9/11}

{User Options}
Sdm:=Input("Relative Performance, Starting Date - DDMM",0101,3112,0101);
Sy:=Input("Starting Year - YYYY",1900,2020,2011);
Ds:=Input("Start Bar Delay, 0=No 1=Yes",0,1,0);
X:=Input("Reference, 1=Nikkei 2=DJIA 3=SPX 4=FTSI 5=HS" ,1,5,2);

Sd:=Int(0.1+Sdm/100);
Sm:=Int(101*Frac(Sdm/100));
Start:=(DayOfMonth()>=Sd AND Month()=Sm AND
Year()=Sy) OR Year()>Sy OR (Year()=Sy AND Month()>Sm);
Start:=ValueWhen(1+Ds,1,Start);

{Referenced Indices}
S1:=Security("C:\Equis\Stocks\World Indices\$NK ",CLOSE); {Nikkei 225}
S2:=Security("C:\Equis\Stocks\World Indices\$DJ ",CLOSE); {DJIA}
S3:=Security("C:\Equis\Stocks\World Indices\$SP ",CLOSE); {S&P 500}
S4:=Security("C:\Equis\Stocks\World Indices\$FT ",CLOSE); {FTSI 100}
S5:=Security("C:\Equis\Stocks\World Indices\$HS ",CLOSE); {Hang Seng}

{Select Index}
Index:=If(X=1,S1,If(X=2,S2,If(X=3,S3,If(X=4,S4,S5))));

{Starting Date & Constant}
Constant:=LastValue(ValueWhen(1,Cum(Start)=1,Index/CLOSE));

{Relative Performance}
ValueWhen(1,Cum(Start)>0,CLOSE*Constant/Index);


thanks 1 user thanked mstt for this useful post.
geraldpc on 7/15/2015(UTC)
oem7110  
#3 Posted : Thursday, August 1, 2013 10:26:12 AM(UTC)
oem7110

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/30/2005(UTC)
Posts: 120

Referring to following coding, please correct me if I am wrong.

Relative Performance = (Index(Current value) / Index(Past value)) * (Stock(Past value) / Stock(Current value))

Am I correct on interpreting this formula?

Do you have any suggestions?

Thanks you very much for any suggestions

===================================

{Starting Date & Constant}
Constant:=LastValue(ValueWhen(1,Cum(Start)=1,Index/CLOSE));

{Relative Performance}
ValueWhen(1,Cum(Start)>0,CLOSE*Constant/Index);

oem7110  
#4 Posted : Thursday, August 1, 2013 10:35:46 PM(UTC)
oem7110

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/30/2005(UTC)
Posts: 120

Based on relative performance, do you have any suggestions on how to code jdk rs ratio and momentum?

Thanks you very much for any suggestions

oem7110  
#5 Posted : Tuesday, August 6, 2013 2:14:48 AM(UTC)
oem7110

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/30/2005(UTC)
Posts: 120

For determining Relative performance among 3 differents stocks, do you have any suggestions on how to normalize those prices into comparable scales?

For example,

Index : 12500(past) and 13000(current)

Stock A : 5(past) and 10(current)

Stock B : 200(past) and 203(current)

Do you have any suggestions?

Thanks you very much for any suggestions

mstt  
#6 Posted : Tuesday, August 6, 2013 2:16:58 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi oem

I would have thought that the constant in the formula I posted earlier gave a good starting point for relative performance. Locking in (Index CLOSE)/(Security CLOSE) at the beginning of any test period provides a scaling mechanaism by which any subsequent movement can be measured in percentage terms. I don't see what your difficulty is. How closely did you look at the Relative Performance formula, and how many variations on that theme have you tried for yourself?. It seems that you're requesting more or new information, and yet you haven't said why what has already been provided doesn't help.

Roy
oem7110  
#7 Posted : Friday, September 20, 2013 10:30:33 AM(UTC)
oem7110

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/30/2005(UTC)
Posts: 120

mstt wrote:
Hi oem

I would have thought that the constant in the formula I posted earlier gave a good starting point for relative performance. Locking in (Index CLOSE)/(Security CLOSE) at the beginning of any test period provides a scaling mechanaism by which any subsequent movement can be measured in percentage terms. I don't see what your difficulty is. How closely did you look at the Relative Performance formula, and how many variations on that theme have you tried for yourself?. It seems that you're requesting more or new information, and yet you haven't said why what has already been provided doesn't help.

Roy

Referring to following file, on Page 39/58, "JdK RS-Momentum is a normalized version of the Rate of Change of JdK RS-Ratio".

If RS-Ratio = (Index CLOSE)/(Security CLOSE), I would like to know whether following formula is JdK RS-Momentum or not.

RS-Momentum = (Index(Current value) / Index(Past value)) * (Stock(Past value) / Stock(Current value)).

Does anyone have any suggestions?

Thanks everyone very much for any suggestions :>

http://www.mta.org/eweb/docs/pdfs/11symp-dekempanaer.pdf

geraldpc  
#8 Posted : Wednesday, July 15, 2015 2:14:50 AM(UTC)
geraldpc

Rank: Newbie

Groups: Registered Users, Subscribers
Joined: 7/15/2015(UTC)
Posts: 1

Thanks: 1 times

Hi mstt,

 

Thank for sharing.

Do you have the exploration for this?

 

Originally Posted by: mstt Go to Quoted Post
Hi oem


Here's a manual version of the indicator I created a while back. In it you can set up five favourite reference securities (with pathname) and replicate the MetaStock Relative Performance indicator. The calculation is quite simple and is shown in bold twxt in the last two sections. Hope this helps.

Roy


{Relative Performance (Manual)}
{Roy Larsen 2011, 19/9/11}

{User Options}
Sdm:=Input("Relative Performance, Starting Date - DDMM",0101,3112,0101);
Sy:=Input("Starting Year - YYYY",1900,2020,2011);
Ds:=Input("Start Bar Delay, 0=No 1=Yes",0,1,0);
X:=Input("Reference, 1=Nikkei 2=DJIA 3=SPX 4=FTSI 5=HS" ,1,5,2);

Sd:=Int(0.1+Sdm/100);
Sm:=Int(101*Frac(Sdm/100));
Start:=(DayOfMonth()>=Sd AND Month()=Sm AND
Year()=Sy) OR Year()>Sy OR (Year()=Sy AND Month()>Sm);
Start:=ValueWhen(1+Ds,1,Start);

{Referenced Indices}
S1:=Security("C:\Equis\Stocks\World Indices\$NK ",CLOSE); {Nikkei 225}
S2:=Security("C:\Equis\Stocks\World Indices\$DJ ",CLOSE); {DJIA}
S3:=Security("C:\Equis\Stocks\World Indices\$SP ",CLOSE); {S&P 500}
S4:=Security("C:\Equis\Stocks\World Indices\$FT ",CLOSE); {FTSI 100}
S5:=Security("C:\Equis\Stocks\World Indices\$HS ",CLOSE); {Hang Seng}

{Select Index}
Index:=If(X=1,S1,If(X=2,S2,If(X=3,S3,If(X=4,S4,S5))));

{Starting Date & Constant}
Constant:=LastValue(ValueWhen(1,Cum(Start)=1,Index/CLOSE));

{Relative Performance}
ValueWhen(1,Cum(Start)>0,CLOSE*Constant/Index);


mstt  
#9 Posted : Wednesday, July 15, 2015 4:38:02 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi geraldpc I'm not aware of any exploration using the above formula as a starting point. However i don't think it would be difficult to put together an exploration with each column referencing a specific index or security. If you can spell out (in detail) what you're looking for I'd be happy to put something together for you. Either post your requirements here or send me a private message or email For an exploration I'd need to know what user options you want, number of bars to load, reference indices and anything else that might be relevant. Roy
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.