Rate of Annual Return - Traders Laboratory

Go Back   Traders Laboratory > Trading Resources > Trading Indicators > Coding Forum

Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-28-2008, 09:14 PM
156's Avatar
156 156 is offline
156 is learning

 
Join Date: Jul 2008
Location: Bulgaria
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to 156 Send a message via Skype™ to 156
Rate of Annual Return

Hello, I have been reading a book and I read about the Rate of Annual Return, unfortunately I couldn't find the indicator...it looks interesting.

Here is a quote from the book:

The ‘Rate of Annual Return’ Indicator
The ‘Rate of Annual Return’ (ROAR) indicator is used to calculate the annual rate of returnof a share given its current rate of climb or fall. It achieves this by calculating the annual increase in price activity and then dividing it by the current share price. The result is thenmultiplied by 100 to convert it to a percentage.
Example
• Lets assume that a share is climbing at a rate of $2 per year.
• The current price of the share is $5.
• The ‘Rate of Annual Return’ would be 0.4 ($2 divided by $5).
• Converting this to a percentage we get 0.4 x 100 = 40%.

Reply With Quote
  #2 (permalink)  
Old 07-28-2008, 11:23 PM
brownsfan019's Avatar
brownsfan019 is happy football season is finally here! Go Browns!

 
Join Date: Jan 2007
Posts: 2,294
Thanks: 59
Thanked 144 Times in 91 Posts
Re: Rate of Annual Return

Is it an actual indicator or just a math formula? If it's just a math formula that you plug #'s into, Excel will do the trick.

__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause.
Reply With Quote
  #3 (permalink)  
Old 07-29-2008, 06:39 AM
156's Avatar
156 156 is offline
156 is learning

 
Join Date: Jul 2008
Location: Bulgaria
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to 156 Send a message via Skype™ to 156
Re: Rate of Annual Return

well it can be an indicator but I think a formula could work also, though you will constantly need to search for data to use a formula.. here is how the indicator should work ( I attach the screen shot) and also I searched on google and found some codes but I don't understand anything of coding .. here it is :

---------------------

// ROAR Version 1.0

Period=52;
X=Close;
LinReg=( Period * Sum( Cum( 1 ) * X,Period ) -
Sum( Cum( 1 ),Period) * Sum( X,Period) ) /
(Period * Sum(Cum( 1 )^2,Period ) -
Sum( Cum( 1 ),Period )^2 ) * Cum( 1 ) + (MA(X,Period) -
MA( Cum(1 ),Period) * (Period * Sum( Cum( 1 ) * X,Period) -
Sum( Cum( 1 ),Period ) * Sum( X,Period) ) / (Period *
Sum( Cum(1 )^2 ,Period) - Sum( Cum( 1 ),Period )^2 ) );

Graph1 = 200*(LinReg-Ref(LinReg,-26))/C;


// RAOR Version 2.0

TimeFrameSet(inWeekly);
RAOR = LinearReg((C-Ref(C,-26))/C*200,4);

Plot(raor,"RAOR",colorBla ck,0);


---------------------


and here is another one:


// ROAR

Enter = 30; // Make it whatever you want
Cutoff = 20;

roar = int(5200*(LinRegSlope(C, 26)/LinearReg(C,26)));
roar30 = int(LinearReg(roar, 5));

for (nCntr=0; nCntr<BarCount; nCntr++)
{
if (roar[nCntr] >= Enter AND roar30[nCntr] >= Enter)
roar[nCntr] = roar30[nCntr];
else if (roar[nCntr] <cutoff> 0)
roar[nCntr] = 0;
else if (roar[nCntr] <= -Enter AND roar30[nCntr] <= -Enter)
roar[nCntr] = roar30[nCntr];
else if (roar[nCntr] > -Cutoff AND roar[nCntr] < 0)
roar[nCntr] = 0;
}

Plot(roar, "ROAR", colorBlack, 1);
Plot(Cutoff, "Cutoff", colorRed, 1);
Plot(-Cutoff, "Cuttoff", colorRed, 1);


what do you think?

Thank you!
Attached Images
File Type: jpg roar.JPG (35.1 KB, 19 views)

Reply With Quote
  #4 (permalink)  
Old 07-29-2008, 11:33 AM
brownsfan019's Avatar
brownsfan019 is happy football season is finally here! Go Browns!

 
Join Date: Jan 2007
Posts: 2,294
Thanks: 59
Thanked 144 Times in 91 Posts
Re: Rate of Annual Return

I think it could work very well in a bull market.

I'd love to see how it reacts in a bear / sideways market.

__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause.
Reply With Quote
  #5 (permalink)  
Old 07-29-2008, 12:38 PM
156's Avatar
156 156 is offline
156 is learning

 
Join Date: Jul 2008
Location: Bulgaria
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to 156 Send a message via Skype™ to 156
Re: Rate of Annual Return

Quote:
View Post
I think it could work very well in a bull market.

I'd love to see how it reacts in a bear / sideways market.
I am pretty sure it is used only for long signals due to its specifics - if you look at the chart it is "activated" when a certain value is reached - otherwise it is just standing by. Does the code makes sense to anyone who is up to date with programming? I would really love to see how it performs,

Thanks!

Reply With Quote
  #6 (permalink)  
Old 07-29-2008, 12:44 PM
brownsfan019's Avatar
brownsfan019 is happy football season is finally here! Go Browns!

 
Join Date: Jan 2007
Posts: 2,294
Thanks: 59
Thanked 144 Times in 91 Posts
Re: Rate of Annual Return

Quote:
View Post
I am pretty sure it is used only for long signals due to its specifics - if you look at the chart it is "activated" when a certain value is reached - otherwise it is just standing by. Does the code makes sense to anyone who is up to date with programming? I would really love to see how it performs,

Thanks!
Exactly. Long only = bull market.

Therefore, if not in bull market but if this provides long signals, will have hard time making money.

So once a bull market is identified, then I would consider use of something like this.

__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause.
Reply With Quote
  #7 (permalink)  
Old 07-29-2008, 01:14 PM
156's Avatar
156 156 is offline
156 is learning

 
Join Date: Jul 2008
Location: Bulgaria
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to 156 Send a message via Skype™ to 156
Re: Rate of Annual Return

Quote:
View Post
Exactly. Long only = bull market.

Therefore, if not in bull market but if this provides long signals, will have hard time making money.

So once a bull market is identified, then I would consider use of something like this.
I think it might be a useful tool if anyone can code it. There are so many markets, there will be at least one bullish to trade it As long as it can work I don't see a problem ... thanks!

Reply With Quote
  #8 (permalink)  
Old 07-31-2008, 08:16 AM
john.potter has no status.

 
Join Date: Jun 2008
Location: Darwin Australia
Posts: 11
Thanks: 3
Thanked 3 Times in 2 Posts
Re: Rate of Annual Return

Quote:
View Post
I think it might be a useful tool if anyone can code it. There are so many markets, there will be at least one bullish to trade it As long as it can work I don't see a problem ... thanks!
Hi Guys
I think this may be what you want, it is Alan Hulls ROAR indicator from his book "Active investing"

'Rate of Return' lndicator
Variablec: ord(o),LD(o),Roar(0),cuto ff(o),Enter(0c)o, unter(52),P eriod(26);
For Counter = 52 downto 13 Begin
' "^ --;
I"""rRegValue(clos.,io.r. rt.r,0) > linearRegValue(close,Peri od,t0h)e n Period
= Counter;
End;
Cord = linearRegValue(close,Peri od,0);
iO = Co.a - Q.618 * Cord * AvgTiueRange(52)/Average(close,5)2
If LD < LD[l] then LD = LD[l];
If Cord < LD then LD = Cord;
ii i-."rn"gV"fue(close,26,0 )>O then Roar = IntPortion (5200 * linearRegslope(close,26)/
LinearRegValue(c1ose,26)e ,0ls)e R oar = 0;
iin";t t= 30 and IntPortion (LinearRegValue(roar,5,0) >)= 30 then Roar = IntPortion
(LinearRegValue(roar,5), )0;
Cutoff = 20;
Enter = 30;
if Roar < Cutoff then Roar = 0;
if Roar < Enter and Roar[l] = 0 then Roar = 0;
if Roarll] = 0 and summation(volume * MedianPrice'l3) < 120000 then Roar = 0 ;
iin.-ifj > 0 and summationivolume * MedianPrice,l3) < 100000 then Roar = 0 ;
if Cord = LD then Roar=O;
plotl (Roar,"Roar", darkgray,b lack' I );
plot2 (Cutoff, "Cutoff' , black , black , I );

This is supposed to work on Tradestation, Which I don't have.

I do have a bull charts version but have not messed with it much

if you want to know more just google Alan Hull or alan hull.com.au


Last edited by john.potter; 07-31-2008 at 08:30 AM.
Reply With Quote
  #9 (permalink)  
Old 07-31-2008, 08:05 PM
156's Avatar
156 156 is offline
156 is learning

 
Join Date: Jul 2008
Location: Bulgaria
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to 156 Send a message via Skype™ to 156
Re: Rate of Annual Return

Quote:
View Post
Hi Guys
I think this may be what you want, it is Alan Hulls ROAR indicator from his book "Active investing"

'Rate of Return' lndicator
Variablec: ord(o),LD(o),Roar(0),cuto ff(o),Enter(0c)o, unter(52),P eriod(26);
For Counter = 52 downto 13 Begin
' "^ --;
I"""rRegValue(clos.,io.r. rt.r,0) > linearRegValue(close,Peri od,t0h)e n Period
= Counter;
End;
Cord = linearRegValue(close,Peri od,0);
iO = Co.a - Q.618 * Cord * AvgTiueRange(52)/Average(close,5)2
If LD < LD[l] then LD = LD[l];
If Cord < LD then LD = Cord;
ii i-."rn"gV"fue(close,26,0 )>O then Roar = IntPortion (5200 * linearRegslope(close,26)/
LinearRegValue(c1ose,26)e ,0ls)e R oar = 0;
iin";t t= 30 and IntPortion (LinearRegValue(roar,5,0) >)= 30 then Roar = IntPortion
(LinearRegValue(roar,5), )0;
Cutoff = 20;
Enter = 30;
if Roar < Cutoff then Roar = 0;
if Roar < Enter and Roar[l] = 0 then Roar = 0;
if Roarll] = 0 and summation(volume * MedianPrice'l3) < 120000 then Roar = 0 ;
iin.-ifj > 0 and summationivolume * MedianPrice,l3) < 100000 then Roar = 0 ;
if Cord = LD then Roar=O;
plotl (Roar,"Roar", darkgray,b lack' I );
plot2 (Cutoff, "Cutoff' , black , black , I );

This is supposed to work on Tradestation, Which I don't have.

I do have a bull charts version but have not messed with it much

if you want to know more just google Alan Hull or alan hull.com.au
Thanks for the code, I am on the task to code it for Metatrader4 but this part ...
Cord = linearRegValue

This uses another indicator? Linear Regression? Anyone has any suggestions what is the code of that indicator?

Thank you!

Reply With Quote
  #10 (permalink)  
Old 08-01-2008, 12:34 AM
brownsfan019's Avatar
brownsfan019 is happy football season is finally here! Go Browns!

 
Join Date: Jan 2007
Posts: 2,294
Thanks: 59
Thanked 144 Times in 91 Posts
Re: Rate of Annual Return

Quote:
View Post
I think it might be a useful tool if anyone can code it. There are so many markets, there will be at least one bullish to trade it As long as it can work I don't see a problem ... thanks!
As long as you are able to find the bullish markets, it may give you what you need. The question is - can you find the bullish markets?

__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rate the chimp... walterw General Discussion 36 01-12-2008 11:31 PM
MarketProfile vs Return Destribution ImXotep Market Profile® 2 11-28-2007 04:53 PM
Can function in TS8 return array? ImXotep Technical Analysis 4 04-10-2007 05:22 PM
Interest Rate Parity Nick1984 Forex Laboratory 5 03-14-2007 08:28 PM
Rate our website Labcast General Discussion 5 09-12-2006 02:03 PM


All times are GMT -4. The time now is 12:01 PM.