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

Notification

Icon
Error

Options
Go to last post Go to first unread
rudolf  
#1 Posted : Sunday, August 29, 2010 12:34:16 AM(UTC)
rudolf

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/2/2006(UTC)
Posts: 9

Hello, The purpose of the RSC is to show how a security performs relative to another. However, simply dividing the price of a security by the price of another security should not allow one to draw any conclusions regarding their relative performance as the volatility of each security is not taken into consideration. For instance, say, the S&P 500 went up 10% in the last 20 days, and, in the meantime, Microsoft gained 12%.The RSC would tell us that Microsoft is performing better than the S&P 500. Now, say Microsoft is on average 50% more volatile than the S&P 500, we would expect Microsolft to gain 15% when the S&P500 gains 10% (knowing that stocks are rather well correlated with their indexes). Therefore, when we take volatility into consideration we might well draw a conclusion that is different than when we use the RSC alone. I have therefore thought of creating a custom RSC that includes the volatility in its calculation in order to make more adequate conclusions about the relative performance of a security. That is where I need your help. I thought I would use Beta. Beta being a measure of volatility of one security against another, I thought my custom RSC would simply be RSC/Beta which would allow me to have a good picture of a security's performance relative to its index. I will use the symbol "spy" as the index.Knowing that the formula for Beta in metastock is: [formula1] (( 21 * Sum( ROC( CLOSE,1,%) * ROC( INDICATOR,1,%),21))- ( Sum( ROC( CLOSE,1,%),21) * Sum( ROC( INDICATOR,1,%), 21))) / (( 21 * Sum( Pwr( ROC( INDICATOR,1,%),2),21)) - Pwr( Sum( ROC( INDICATOR,1,%),21),2)) I thought, for future backtests and explorations I should code the following in the indicator builder: [formula2] (( 21 * Sum( ROC( CLOSE,1,%) * ROC(Security("c:\Metastock Data\dataondemand cache\spy",C) ,1,%),21))- ( Sum( ROC( CLOSE,1,%),21) * Sum( ROC(Security("c:\Metastock Data\dataondemand cache\spy",C) ,1,%), 21))) / (( 21 * Sum( Pwr( ROC(Security("c:\Metastock Data\dataondemand cache\spy",C) ,1,%),2),21)) - Pwr( Sum( ROC( INDICATOR,1,%),21),2)) For now, I am stuck here. Indeed, I thought that [formula1] was the same as [formula2] taken that I use the price plot of "spy" in formula 1. Now, when I plot the indicator given by formula 1 I end up with something completely different from what I get when I use formula 2. Could you please indicate to me what I did wrong so I could fix my mistake and continue the elaboration of my custom RSC? I will greatly appreciate your help. Cheers,
wiked  
#2 Posted : Monday, August 30, 2010 4:10:39 PM(UTC)
wiked

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 31

I have two suggestions to get you started.
1) assign the security function to variable at the top of the formula so you only reference the SPY data once. This will make the formula shorter and it will run faster
2) do not use the dataondemand cache as the source of the security function data. The cache folder is not permanent and is only current up to the last time you opened a chart of SPY. Instead create a local data file for SPY with the downloader or use online data for the security.
rudolf  
#3 Posted : Tuesday, August 31, 2010 6:53:18 AM(UTC)
rudolf

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/2/2006(UTC)
Posts: 9

Wicked, Thanks for your inputs. I will try the way you told me and let you know how it works.
amice  
#4 Posted : Sunday, February 6, 2011 9:03:05 AM(UTC)
amice

Rank: Newbie

Groups: Registered, Registered Users, Unverified Users
Joined: 12/26/2009(UTC)
Posts: 8

Hi Rudolf,

I was thinking of the same concept as you while I was busy making a momentum ranking of ETF's adjusted for beta. Did you succeed?

Peter

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.