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

Re: [amibroker] Russell 2000 constituent lists



PureBytes Links

Trading Reference Links


Ken, 

I'm so glad that you and others are finding these historical constituent
lists to be of value.   To me, it makes absolutely no sense to
take a current list (say the N100) and test a system backwards over the
last few years of stock data.  First of all, unless you keep the
tickers in that list up to date, stocks will fall out of it every
day.   More importantly, such a list contains the survivors...
the best performers... in the past.  As a minimum, I would encourage
system developers to use a single historical list (2000?) and test going
forward from there.   At least that approximates how trading
systems MAY perform on the current list going forward.

Ken, you asked for an example of how to use these lists.  I posted
this code before, but I didn't have too many believers then.  
It seems that interest in (what I think is) more realistic backtesting is
on the rise.   Here is what I do:

1.  Let's say we only want to trade NASDAQ 100 stocks and that we
want to backtest starting in 2000.

2.  I would build five contiguous watchlists (2000, 2001, 2002, 2003
and 2004) using the N100 constituent lists that I previously
posted.   Actually, looking at my code, they don't have to be
contiguous.

3.  I would build a composite watchlist containing all of the
tickers in the five lists.

4.  I would set AB to look at the composite watchlist.

5.  In my trading system, I would have code similar to the
following:

     InList
=
IIf(Year()
==
2000,
InWatchList(26),
                 
IIf(Year()
==
2001,
InWatchList(27),
                 
IIf(Year()
==
2002,
InWatchList(28),
                 
IIf(Year()
==
2003,
InWatchList(29),
                 
IIf(Year()
==
2004,
InWatchList(30),False)))));

     Buy = myBuyIndicator AND
Inlist;
     Sell = mySellIndicator;

6. Of course, you could take the trouble to quit positions in a stock if it falls out of the watchlist even though it is still trading.   These NASDAQ lists are "as at January 1", however, and aren't precise enough to incorporate this additional logic.



Further notes:

a.  I will upload the N100 lists to the amibroker-ts site for those who are interested (later today).

b.  If you know a better way to code around this issue, by all means post it.  The above works for me, but there are probably lots of ways to achieve the same objective.

c.  I realise that I can default to 2004==false, but I prefer the above style for documentation purposes.

d.  Remember that the lists that I post show de-listed stocks with a prefix of '~'.   While I feel that using (more) accurate watchlists is essential, I feel quite strongly about including de-listed stocks.   

e.  I will upload some zip files containing de-listed stocks and I encourage you to give it a try using them.  I probably won't have time to do the uploading until next week.   I may also need another site to store them as they are quite large.   

f.  If there is sufficient interest and people are willing to incorporate more logic in their AFL, I will make semi-annual or quarterly lists.  For the record, I use daily lists using my own (non-AB) systems.

g.  Enjoy!!




At 07:32 AM 1/20/2004 -0500, you wrote:

Chuck:  I add my thanks for this generous sharing you are doing.

 

Can you or someone else offer me a code snippit that would illustrate how to best use these SEGREGATED lists in a basic backtest?  Running such a segregated list approach vs just the current list should show much improved results, am I correct?

 

Ken

 




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 Sponsor


  ADVERTISEMENT 









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.