Thanks for taking the time Chris, this definitely helps...and the 3 minute 
sanity check makes me feel better about things.  Thanks again. 




________________________________
From: Chris DePuy <[email protected]>
To: [email protected]
Sent: Thu, May 13, 2010 6:28:02 PM
Subject: Re: [amibroker] Real time trading - questions on practicality

  
 
BS,
 
The primary variables that I'm aware of that cause delay in scan/backtests are:

(a) number of bars
(b) complexity of calculations
(c) number of tickers
 
In the formula window, find the Tools, Code Check and profile feature that 
shows how long it takes to refresh the screen.  that should guide somewhat.
 
Having said that, 3 minutes for 1500-ish symbols sounds about right, at 0.12 
seconds each.  That is more or less my experience, when using relatively 
complex calculations over many bars.  If you are accessing external data 
sources or changing tickers using Foreign, this will be like 10 times slower 
than if you kept the data all in the Ami database, FWIW.
 
See if you can reduce bars.  Alternatively, if you've found the holy grail, buy 
more computers and reduce the number of tickers per machine, grouping 
alphaetically or something like that, depending on your strategy.  This makes 
it pretty complex to manage with multiple machines.
 
Hope this helps.

Chris  
 
 
----- Original Message ----- 
>From: B S 
>To: amibro...@yahoogrou ps.com 
>Sent: Wednesday, May 12, 2010 8:29 AM
>Subject: Re: [amibroker] Real time trading - questions on practicality
>
>  
>Keith-
>
>I'm embarassed to say that I am just now (as a result of a vanity search) 
>seeing that you've responded.  Thank you and my apologies.  What's even worse, 
>I guess, is that your response is still helpful as I haven't yet found my way 
>through the real time trading maze.  I have my multiple strategy AFL together 
>with money management logic and all that squared away, but I think I have some 
>major performance issues to contend with.  After doing all the EOD widdling 
>down of symbol universes that I possibly can, I am still often looking at 1200 
>or so tickers to watch in real time.  I'm happy to pay for the data and I've 
>checked my strategy logic so that there should be no adverse effects from bad 
>ticks (making me comfortable going with a slightly less expensive data 
>provider that does not do any filtering).  
> 
>Before I pay for a 1000 or 1800 symbol plan, I'd like to know that my scans 
>will actually be able to complete in a reasonable amount of time (would say 
>absolute maximum of 3 mins per scan).  To start, I will be running two 5min 
>strats and one 60min.  However, I've tried testing an extremely simple single 
>strategy on 5min historical data with n last quotations = 1 on a universe of 
>100 symbols and it took 84 seconds.  I'm not sure if that's an appropriate 
>test, but it certainly doesn't look promising for getting 1000-1800 symbols 
>done in under 3 minutes.  
> 
>Anyhow, I'm looking for guidance from anyone who has done some real time 
>trading/testing in AB on what's realistic to expect in terms of number of 
>symbols to process in < 3mins (i know this can be vary widely among AFLs but 
>ballpark idea would be very helpful).  Also, any suggestions for appropriate 
>settings/tips to process the symbols as quickly as possible would be a big 
>help.  Thanks in advance.  
>
>
>
>
________________________________
From: Keith McCombs <kmcco...@engineer. com>
>To: amibro...@yahoogrou ps.com
>Sent: Sat, April 17, 2010 4:15:00 PM
>Subject: Re: [amibroker] Real time trading - questions on practicality
>
>  
>B S --
>I understand your desire to automate multiple intraday strategies.  So, 
>regarding your four questions.
>
>1.  I wouldn't reject the idea of combining strategies into one afl.  Because:
>1.1  It is easy to do.  Just put each of your systems in a separate .afl file, 
>and have one master control .afl to call the separate files using #include.
>
>1.2  I don't know how you want to handle "available buying power".  Do you 
>want your multiple strategies to share money, or keep it separate?  But what 
>ever way you decide can be handled best by the master control .afl.
>
>1.3  What if more than one strategy wants to buy the same stock, or maybe even 
>one wants to buy while another wants to sell the same stock?  I don't know 
>what you want to do in these cases, but once you decide, put it in master 
>control.
>
>2.0  Personally, would use explore or scan.  I don't know what would be the 
>advantage of backtest over either of these two.
>
>3.0
>3.1  ~2000 tickers:  Not in real time, but maybe 1800 for $$$.  However, can 
>you use EOD to reduce down to say ~100?  IB can handle 100 tickers max in real 
>time.  See:
>http://www.amibroke r.com/guide/ h_quotes. html
>to find out what some of your choices are.
>
>3.2  What do you call a bad tick?  Is it typo, or a single transaction at 
>market near lunch time when volume was low.  Can you tell the difference?  
>Does it matter?  To me a bad tick is one I can't use in my strategy.  So, my 
>strategy has to deal with what I call 'bad' ticks.
>
>4.0  I don't know.  But my guess is that the answer is pretty complex and is a 
>function of your computer speed, what other software you have running, your 
>internet connection, and your data supplier, to mention a few.  Just for 
>laughs, on your computer, open Date and Time Properties>Date and Time.  Try to 
>say 'tick' in sync with the second hand or the seconds display.
>
>-- Keith
>
>On 4/11/2010 15:24, B S wrote: 
>  
>>I'm currently exploring the best way of automating multiple intraday 
>>strategies and was hoping some on the board could give their opinion on whats 
>>practical / possible when using AB and IBcontroller to send orders to IB: 
>>
>>1. If I don't want to combine the strategies into one AFL - whats the best 
>>way to simultaneously run multiple strategies in real time?  Is it multiple 
>>instances of AB?  If yes, will static variables set in one instance be 
>>available to other instances?  
>>
>>2. I've read Tomasz recommend that real-time trading should be done through 
>>AA - do most use scan, exploration, or backtest?  Are there 
>>advantages/disadvan tages that one should be aware of?  
>>
>>3. Is it practical to run these strategies against portfolios of ~2000 
>>tickers?  Any recommended data providers that do a good job of filtering bad 
>>ticks?   
>>
>>4. I understand that AB runs on set intervals rather than being event driven 
>>in real-time mode.  I'm assuming this means that each time the AFL runs, it 
>>checks every symbol for signals instead of only those with new data.  What is 
>>the limiting factor then for how often each symbol is checked for signals?  
>>Is it simply the time that it takes for the scan/exploration/ backtest to 
>>complete?  So if i set "Run Every" to 1sec, will it automatically restart as 
>>soon as it finished running?  Or is there more to it?  
>>
>>Would greatly appreciate hearing any suggestions/ opinions on the above 
>>points.  Thanks.  
>>
>>
>>
>



      

Reply via email to