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

[amibroker] Intraday data importing from myFile.txt



PureBytes Links

Trading Reference Links


G'day Joe,

My kind of guy!   I'm delighted to see you putting in the
effort to try to get more accurate backtesting results.

IMO, there is a better way of achieving the desired objective than having
dozens of watchlists.   I frequently talk about having the
"actual price" in my OI column.   To properly test
some of your IBD methods using weekly lists, you could place a true/false
indicator into the OI column of your data showing whether a stock
appeared on such a list on a specific day.  I have done this AND
squeezed the actual close into the same column by using bit
manipulation.   To do this, however, generally requires
database and/or programming skills.

I am developing a database and a program that people can use to create
data along the lines that I am suggesting as well as incorporating some
fundamental data.   It will probably take another month to
complete and I will upload it to one of the AmiBroker/Yahoo sites. 
There will be no charge for the database or the software and I would urge
you to have a look at it.

If you can tell me what form your weekly IBD (or other) lists take, I can
probably build some logic into the program for you.

A word of warning.  In spite of my genuine attempts to deliver
something when I promise (one month in this case), I am generally about
100% off on my estimate.   Not because it takes longer than I
thought.   Simply because I promise too many things.


At 10:32 AM 1/20/2004 -0600, you wrote:
Chuck -
Want to add my thanks for your work and insight.   Speaking for
myself and our local group in Houston, I like to add that there are
believers here and strong interest here in what you're doing.  We've
discussed the problem with backtesting with dated lists giving a
survivorship bias, but know there's no easy way to handle the changes.
Your way handling multiple lists on an annual basis is straight forward
enough and should certainly be more representative then going back 5
years with say the RU2K or NDX100.  We also have additional interest
in backtesting families/screens coming from uncorrelated sources like the
IBD 100 in addition to the market composites but the amount and
complexity of the code goes up exponentially (?) I think;  since one
would have to track weekly changes and have the historical lists in their
archive. Multiple watchlists for each week may work for a years
backtest.  If not then one might have to pack around 100+
ATComposites arrays to reflect individual equity membership over time (or
the Osaka plugins for data file input/output) but that shouldn't be a
burden for today's disk drives or systems, only to my coding ability.

 
Best regards
Joe Landry      
 
----- Original Message ----- 

From: Chuck Rademacher 
To:
amibroker@xxxxxxxxxxxxxxx 
Sent: Tuesday, January 20, 2004 8:50 AM
Subject: RE: [amibroker] Russell 2000 constituent lists


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 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. 



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. 




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.