Hi, Thanks to you two for your responses.
@Ara: I think I could achieve this (well I may need some help but this is something I am close to be able to do by myself), but the point 3 is the problem: I need this to be automatic. I need to be able to run a backtest using only the selected 500 symbols. E.g. If I use a script that backtests 8000 symbols and then can only act on 500 in real-time trading, then there is a problem. I need to find a code that would automatically select the 500 "best" results (e.g. the closest to HHV 52 weeks) for the backtest to go on. How would you do that? Thanks! @Graham: I plan to use EOD ranking to decide which 500 symbols to trade intraday the next day. I can run the code at night based on the previous day Close, and in the morning I can manually select the 500 stocks which are closest to 52 weeks high, and those will be the one I will trade. As I wrote to Ara, I need to find a way to make this process automatic, to include it in the backtesting so as not to distort the results. Why do I use that much symbols? Because I never know in advance what I will trade. Are you serious when you say you trade 10 symbols at a time? This seem like so little data to me! Or maybe you trade ticks? I prefer to trade swing trading but with better entry points based on 1-minute data... Is this possible? Thanks, Louis 2008/7/13 Graham <[EMAIL PROTECTED]>: > Louis there would be no reasonable way to use intraday ranking values > for live trading on 500 symbols. The time to run the ranking would > mean the market moved on. > I personally cannot see any reason to use 500 symbols intraday unless > your system only gives 1 or 2 signals per day over all the stocks, > surely 10 symbols would be sufficient for live intraday trading > > > -- > Cheers > Graham Kav > AFL Writing Service > http://www.aflwriting.com > > 2008/7/13 Louis Préfontaine <[EMAIL PROTECTED] <rockprog80%40gmail.com> > >: > > Hi Graham, > > > > What exactly is a multi pass method and how can I use composite to get > > exactly the 500 tickers I want to trade each day? > > > > I'm really confused about this, but this seem essential to me. I wasted > > dozens of hours on a system that is working but that would not be working > in > > RT because of the 500 symbols Real-time limitation. I must absolutely > find > > a way to reproduce this limitation in a backtest. Hence the idea of > getting > > a ranking of the 500 tickers. I understand that there can be problems, > and > > it is surely possible to add a limitation that would not consider tickers > > that had major holes, as an example. > > > > But where to start? I tried the code that is posted in this thread and 2 > > hours later AA is still running and nothing is happening. Is there a code > > that would help me? I must not be the only one with this problem! > > > > Thanks, > > > > Louis > > > > 2008/7/12 Graham <[EMAIL PROTECTED] <kavemanperth%40gmail.com>>: > >> > >> Some of the things I have found in the past running afl similar to the > >> one provided here for ranking > >> The ranking works great if all the symbols contain exactly the same > >> data dates or datetimes > >> Where it can cause problems with values is when some contain less > >> history, have data holes, or stopped trrading some time in the past > >> The indicator values are all calculated based on the bars of the > >> current symbol, so data holes in other symbols being referenced with > >> foreign function have padded or ignored bar information. This may not > >> affect all indicators but does with some. > >> eg base has holes, so the last 10 days may, in fuller symbols actually > >> be 11 days, thus 1 day is ignored. worse if the current symbol is a > >> very low traded symbol with many holes > >> Consider a simple HHV(H,100). In a fully traded symbol this would be, > >> say, 20 weeks of data. But in a symbol with holes it could represent > >> 25 weeks. Thus the full symbols are being calculated over 25 weeks not > >> 20, and the holes in base symbol may actually coincide with the > >> relevant indicator highs in fuller symbols > >> Of course you can get around this by using padding to reference symbol > >> in analsyis window. This can overcome some problems, but can also > >> introduce others in hole filled symbols depending on the indicator you > >> are using. > >> > >> Consider the effect of hole padding when your base symbol has full > >> trading. Your calculations will use the padded data for the weaker > >> symbols being referenced as foreign. > >> > >> A further problem can be that short history symbols being padded will > >> have the un-traded padded part at the start and give results of zero > >> or null. If zero then if your indicator has positive and negative > >> numbers (eg ROC) then the zero will be included in the ranking, even > >> though the symbol never actually existed at that earleir time. Same > >> can occur at the end of data if a symbol has not traded for some time > >> before the most recent date. it will provide results even though it > >> may have ceased trading on the exchange > >> > >> These are just some thoughts for you to consider > >> > >> I recommend that unless you are ranking over symbols that are > >> comparable in data that you use a multi pass method, utilising the > >> power of composites for storing the indicator values bgefore ranking > >> them. This can overcome some of the problems. > >> > >> -- > >> Cheers > >> Graham Kav > >> AFL Writing Service > >> http://www.aflwriting.com > >> > >
