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

RE: [amibroker] Rel Strength - Market Cap - Dan Clark



PureBytes Links

Trading Reference Links

Ara,

 

I’m not sure why the difference, either.

 

Regarding results, remember that I’m doing a simple ROC of the Sector/Industry indexes.   So, the data is already normalized.  I.e., if the index of the Energy sector changes by positive 2% and the Information Sector changes by minus 3%, the percentage values should still be valid regardless of the difference in amount values.

 

Regarding the number of stocks in each cap group…   The way I’ve coded it, a stock is categorized as “Small Cap” based on its latest Market Cap.  I.e., number of shares outstanding times latest day’s Close price as of the time the ATC load is run. 

 

Below is the “cap” code that I use.  The bold, red text retrieves the close value of the latest bar (using LastValue() might be better).

 

Using this method, the components of a Sector or Industry Market Cap index will not change.   Therefore, charted Market Cap indexes should be valid for all time periods and times.

 

Notes:

 

·         One caveat obviously is new and delisted stocks.    These could changes the number of stocks from bar to bar.   I’m working on changing my code to further normalize the indexes by dividing OHLC (and maybe volume) values by the number of stocks in the index on that day.  

 

·         Also, remember that I’m using a Relative Performance Chart.  It charts the ROC from a zero point which is the left edge of the chart.

 

·         I also chart the ROC in two ways - “raw” and relative to a market index (my own or a standard index like S&P 500 or “VTI”).    The values relative to the market index are computed by subtracting the market value ROC bar value from all symbols ROC values for that bar.  That the market ROC always will be 0 and the others will be relative to the market.

 

Does this shed any light on the differences?

 

Regards,

 

Dan.

 

 

 

function MarketCapGet()

      {

      CurDatabase = GetDatabaseName();

     

      if(CurDatabase == "QuotesPlus_Stocks")

            {

            MarketCap = round(Close[BarCount -1] * GetExtraData("shares")/1000);

            }

      else

            {

            MarketCap = 666;  //indicating N/A

            }

      return MarketCap ;

      }

 

function MarketCapCategoryGet(MarketCap)

      {

      CurDatabase = GetDatabaseName();

     

      if(CurDatabase == "QuotesPlus_Stocks")

            {

            if (MarketCap < 1000)

                  MarketCapCategory= "Small";

            else

                  {

                  if (MarketCap >= 1000 AND MarketCap < 5000)

                        MarketCapCategory= "Mid";

                  else

                        MarketCapCategory= "Large";

                  }

            }

      else

            {

            MarketCapCategory=      "N/A";      //indicating N/A

            }

      return MarketCapCategory;

      }


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Ara Kaloustian
Sent: Saturday, December 10, 2005 10:27 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Rel Strength - Market Cap - Dan Clark

 

Dan,

 

Can not understand why our results ae so different ... and agree that data purity issues would not change much.

 

Wondering if you are normalizing you data....  I removed my normalizzation and got results more like yours ...

 

By normalization I mean converting results into relative form, easiest would be %

 

When using ATCs, the number of stocks in each cap group can change based on price fluctuations. This in turn changes the total values in ATCs wrt to each other, such that if ROC is defined as Close - Ref(Close,-x) the results will be affected by this phenomena.

 

A normalized form would be if dividing above by reference value (and x 100):

ROC = ((Close - Ref(Close,-x)) * 100 / Ref(Close,-x)) ;

 

Ara

----- Original Message -----

From: Dan Clark

Sent: Wednesday, December 07, 2005 3:42 AM

Subject: RE: [amibroker] Rel Strength - Market Cap - Dan Clark (QP3 Bad Data Problems)

 

Ara,

 

My chart looks significantly different from yours.  I’m seeing different performance by Sector and what appears to be rollover from Small to Large cap stocks and vice-versa.    That said…

 

While I was writing this memo, I discovered some serious data problems – primarily spikes in the data.   I don’t think that it affects the outcome, but I have to be sure. So, I’m cleaning out my database.  

 

I found many delisted stocks still in the QP3 database.   I’m cleaning them out.   When complete, I’ll rerun my ATC scans and respond again.

 

Regards,

 

Dan.  

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Ara Kaloustian
Sent: Tuesday, December 06, 2005 4:57 PM
To: AB-Main
Subject: [amibroker] Rel Strength - Market Cap - Dan Clark

 

Dan,

 

here is a chart that's a bit more useful

 

This is ROC (rather than RS). This compares in style with yours, but I still don't see the Small Caps having any sytematic larger movements.

 

The chart shows percent ROC for Transportation. Othe sectors may be different, but there seems no systematic trend based on mkt cap.

 

Ara 

 




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS