[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: How to test IBD's idea?



PureBytes Links

Trading Reference Links




Ace,
Thanks for the explanation.  Obviously I need 
to do a lot more studying.  I don't want to burden you with ongoing 
explanations, but one area of puzzlement is your point 2 in the first part: 
"Select a stock or index with more data bars than the total number of stocks in 
the sample group.  So if you are using 3000 stocks make sure the current 
Ticker has at least 3001 days of data in it."  Is this an unavoidable 
result of the calculation method?  With a five-year history and a 4000 
stock database it would be necessary to take three or four bites at the data and 
it might be difficult to ensure that each bite is a respresntative sample.  
Is this correct?
HHP
=============
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  acesheet 
  
  To: <A 
  href="" 
  title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
  Sent: 05 January, 2004 3:11 PM
  Subject: [amibroker] Re: How to test 
  IBD's idea?
  HHP,Your welcome.I actually use the new 
  Percentile function to create the initial survey and the CPD curve. The 
  "First Part" code uses the 11 points (1,10,20,30,40,50,60,70,80,90,99) in 
  the percentile function to determine the probability distribution. In this 
  block of code:<A 
  href="">file://-----------------------------------------------------------// 
  First Loop i goes through percentile ranks in// increments of 10 from 1 to 
  99// x = the ROC(C,260) that corresponds to rank y// y = % Rank in 10% 
  Increments//-----------------------------------------------------------m=LastValue(Count);for( 
  i = 0; i<=10; i++ ){y[i]=i*10;if(i<1) y[i]=1;if(i>9) 
  y[i]=99;x[i]=LastValue(Percentile( ROC260, m-1, y[i] ));}You 
  can screw around with weightings within the ROC's if you want. What you 
  could do is instead of the variable ROC260, you could say something like 
  relROC=ROC(C,260)+ROC(C,130)+2*ROC(C,65);and place that 
  expression into all the locations where ROC260 is in the code I posted. I 
  read somewhere in one of O'neil's books that IBD uses a higher weighting 
  for more recent data, but they never say what the weighting is. I actually 
  do something like this for my RS rank.I would like to set it up so 
  that I can use more than just the most recent data so that I can do 
  backtesting using comparative relative strength. I have an idea of how I 
  can do it, but I suspect it will take a very long time to crunch the 
  "calibration" numbers.If you create Industry Group surrogates you can 
  rack and stack them as well using this method and create an IG_RS 
  variable. Just place them into a separate Group or WL and perform the RS 
  calibration procedure over that group.This is one of the better 
  ways of performing ranking in my opinion. Its truly a statistical 
  percentage rank of what's outperformed what. No funky fitting formulas, 
  just the real data racked and stacked for your 
  pleasure.-ace--- In amibroker@xxxxxxxxxxxxxxx, harveyhp 
  <harveyhp@xxxx> wrote:> Many thanks for making this available, 
  Ace.  Not only is it a useful function (message #55197), but so well 
  documented that it serves as a lesson for those of us whose coding skills 
  are somewhat elementary.  Just curious: does the recently introduced 
  Percentile function duplicate some of your work, or is that 
  different?> > FWIW, on another forum at another time it was 
  stated that the IBD weighting assigns a weight of one to each of the first 
  three quarters of the year and a weight of two to the most recent quarter, 
  but I cannot confirm that.> > HHP> 
  =================>   ----- Original Message ----- 
  >   From: acesheet >   To: 
  amibroker@xxxxxxxxxxxxxxx >   Sent: 04 January, 2004 8:36 
  PM>   Subject: [amibroker] Re: How to test IBD's 
  idea?> > >   JOE,> >   
  I'm 99% certain the way I propose to calculate the IBD RS *is* the 
  >   way that it is done in terms of comparing relative 
  strength on a >   purely statistical basis. If you look in 
  Excel at the PERCENTRANK >   function you'll see that it does 
  essentially the same thing as what >   I designed in AFL 
  for this code. > >   Other formulations may try to 
  approximate the IBD number - I've >   designed a few of those 
  myself - but they aren't really doing what >   the 
  essence of the 1-99 comparison is. The code I showed does >   
  exactly what a RS Rank compared to all stocks in the database and is 
  >   not really an approxiamtion, except for the 11 point 
  curve fit of >   the CPD curve.> >   
  The only difference between the one I show and IBD's is that they do 
  >   some weighting of either more than one ROC going into the 
  CPD >   comparison. I don't know what IBD's weightings are, 
  but I'm pretty >   sure it doesn't matter all that much 
  as long as the idea finds high >   RS stocks to trade. In 
  other words I really don't think it matters >   if IBD 
  says a stock is an 88 and this calculation says its a 84.> 
  >   Have fun.> >   -ace> 
  >   --- In amibroker@xxxxxxxxxxxxxxx, "Joseph Landry" 
  <jelandry@xxxx> >   wrote:>   > Ace 
  - I subscribe to the forum digest so I don't get any >   > 
  attachments, and I'm wondering if you could forward the AFL code 
  >   to >   > me 
  directly?>   > >   > The folks over in 
  the TC2000 area have a way of calculating what >   > 
  they say is IBD relative strength number and as soon as I find it 
  >   > and the underlying rationale I'll post it 
  here.>   > >   > Thanks 
  >   > JOE >   > >   
  > --- In amibroker@xxxxxxxxxxxxxxx, "gary_tiger2001" >   
  > <gary_tiger2001@xxxx> wrote:>   > > Thanks 
  Ace, Harvey & Jason,>   > > >   
  > > I will study the code...>   > > 
  >   > > Cheers,>   > > 
  Gary>   > > --- In amibroker@xxxxxxxxxxxxxxx, 
  "acesheet" <acesheet@xxxx> >   
  wrote:>   > > > Gary,>   > > 
  > >   > > > There's a couple of different ways of 
  doing it. Some more time >   > > > consuming, 
  some less. One way is to compare the returns using >   
  > ROC >   > > to >   > > > 
  a reference index (like SP500 or Value Line for US stocks). If 
  >   a >   > > > stock's performance 
  significantly beats out the index, then >   its 
  >   > a >   > > > safe bet that 
  it has high relative strength. I've used this >   > > 
  concept >   > > > for back 
  testing.>   > > > >   > > 
  > Another way is to use what's called the 'Cumulative >   
  Probability' >   > > of >   > > 
  > the market returns. See post # 55179. If you have a large 
  >   enough >   > > > database you 
  should be able to get these AFL scripts to work >   > 
  very >   > > > well in terms of comparison with 
  IBD's RS ranks. Currently I >   > only 
  >   > > > have a script that uses "today's" data 
  however, so it won't be >   > so >   
  > > > hot for backtesting. This method of ranking works very 
  well.>   > > > >   > > > 
  You could take the idea shown in post 55179 and adapt it to 
  >   > > collect >   > > > the 
  data over time and create several historical ROC indices 
  >   for >   > > the 
  >   > > > 10 point curve fit. Something like 
  >   > > ~xroc1,~xroc10...~xroc90,~xroc99. 
  >   > > > It will probably take AB a very long time 
  to crunch the >   numbers, >   > > 
  > however.>   > > > >   > 
  > > Hope that gives you some ideas.>   > > > 
  >   > > > -ace>   > > > 
  >   > > > --- In amibroker@xxxxxxxxxxxxxxx, 
  "gary_tiger2001" >   > > > 
  <gary_tiger2001@xxxx> wrote:>   > > > > 
  Happy new year to all of you.>   > > > > 
  >   > > > > I wish to test the idea from IBD, 
  like the relative >   strenghth >   > 
  > > > ranking, etc. I cannot figure out how to do it in AB. 
  >   > Basically, >   > > I 
  >   > > > > have a universe of stocks. Is it 
  possible to rank the >   strength >   > 
  > of >   > > > > stocks compared to my stock 
  universe, from 1 - 99? >   > > > > 
  >   > > > > Cheers,>   > > 
  > > Gary> > > >   Send BUG REPORTS 
  to bugs@xxxx>   Send SUGGESTIONS to 
  suggest@xxxx>   
  ----------------------------------------->   Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
  >   (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)>   
  -------------------------------------------->   Check group 
  FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  > > >         
  Yahoo! Groups Sponsor 
  >               
  ADVERTISEMENT>                 
  >        
  >        > > > 
  ------------------------------------------------------------------------------>   
  Yahoo! Groups Links> >     a.. To visit your 
  group on the web, go to:>     <A 
  href="">http://groups.yahoo.com/group/amibroker/>       
  >     b.. To unsubscribe from this group, send an 
  email to:>     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx>       
  >     c.. Your use of Yahoo! Groups is subject to 
  the Yahoo! Terms of Service.Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  
  
  Yahoo! Groups Links
  
    To visit your group on the web, go to:<A 
    href="">http://groups.yahoo.com/group/amibroker/  

    To unsubscribe from this group, send an email to:<A 
    href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
  


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html





Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.