I have an intraday trading strategy based on TA that is designed for high volume instruments. I have backed tested it and everything looks great. I am now in the process of setting up the necessary infrastucture to connect to a broker and start trading live. Below are assumptions and methodolgy used. Please comment or advise/confirm my approach. The stock I have used for my whole design is AAPL. 1. I am using tick data filtered by order fill size of 100 shares upon my receiving it. The data is the actual quantity of shares and the price the shares were sold/bought at. From the tick data, 133 tick bars are then constructed. The O,H,L,C of the tick bars are used in the TA for the algorithm. 2. I am assuming that the ordersize of 100 shares will be filled at market price instantly and will have no impact on the overall stock direction. I am assuming this can be done with atleast a 100 share order size. (I am hoping that the ordersize that can satisfy these two assumptions can be alot more that 100 shares.) 3. I have accounted for commissions in the algo. I am assuming that the slippage will be negligible since I am trading a "small" order size in a very liquid stock. The backtest and PL look great. I think my assumptions and my approach are sound. But I just wanted to get some feedback from others with a simular approach or simular working system. Thanks for all your comments!
I thought I would add this info. The orders (both buy and sell, long and short) all occur on the close of a bar. No orders can take place in between closes.
Which instruments? If it includes US equities, reported trades could be "internalized" or otherwise reported late, making a seemingly profitable strategy actually impossible in certain cases. For many US stocks, dark/internalized trades exceed 50% of total volume. So to be more sure, you need to use trade data that has these flagged, as well as late reported trades and busts. All of these need to be filtered out, as they otherwise might show a lot of "profit" that doesn't actually exist. Also, for AAPL and other high-priced stocks, unless you're using direct exchange data from every exchange, you're probably missing the odd-lot trades until later in December, when it's finally going to be reported. That may help or hinder (but far more likely to help, IMO). Maybe you're already considering these things, but I just thought I'd let you know. You probably won't really know the whole story until you start trading live, anyway. It never works out exactly the way it does in a simulation.
Thanks for the post Occam! I have only considered AAPL stock at this time. The tick data that I use is from a Norwegian exchange which compiles the tick info straight from the NYSE live. Like I mentioned before, as far as I can tell, the data seems to be filtered only by an order size of 100 shares minimum. I believe I am missing the dark pool trades according to what you posted before. I was hoping that the NYSE data that I am getting from the exchange would be more or less representative of any live feed that I would get. You can probably tell that I have never done anything like this before. So my knowledge on the subject isn't very deep. Next, I plan to connect to a broker (most likely IB) and do some paper trading. If I get similar results to my backtesting, would you think that those results are more or less likely to transfer to a live trading account? Any guidance you can give me is greatly appreciated! Thanks!
Re: your data, I'm not sure what data coming from the NYSE you'd mean. NYSE has many data products. If it's a consolidated feed, then it will include the dark trades as well as the lit ones (they are reported via something called a TRF); unfortunately there's probably no way to tell them apart unless you've got a feed that's pretty comprehensive and makes a note of this explicitly. Regarding your paper trading, it won't tell you a whole lot more than your backtesting, if you're talking about doing this by hand. But it is another data point for what it's worth, and you may have occasion to modify your assumptions in the process. If you're talking about trading equities, the routing method could also affect your results a lot unless your expected return on each trade significantly overshoots the potential slippage. This slippage you encounter may be worse if you use a "smart" order route, which are generally designed to give you the NBBO (which is fine), but also engineered to benefit the broker in some way (e.g., so they can trade against your order via "internalization", or sell your order flow or get some other type of rebate). Just another thing to watch out for if your results don't match what you think they should. You can avoid that using DMA, i.e. routing directly to exchanges yourself. But that may not be necessary depending on your strategy.
http://www.netfonds.no/index.php The above is the exchange where I get the tick data that I use for my backtesting and simulation. For paper trading, I would impliment my algo with the broker's API in a demo account to simulate live trading. I plan on using the broker's provided data for the paper trading. If I get similar results to the backtesting, I will then move forward to a live, funded account. I know IB has "smart" order routing but provide other routing options as well. I don't know very much about that subject matter yet. I'm going to cross that bridge when I get there. I know with IB routing options gives you different commissions as well. So I am going to see what works best for my strategy. Slippage is very important to my strategy. My backtests are showing 50 or so trades per day. The holding period is never too long so any slippage would be detrimental to the strategy. Thats why the strategy is restricted to very liquid stocks and "small" order size. Thanks for all the advise! Please continue to comment. You are giving me some good topics to research, and its always nice to hear some one else's point of view.
Your project sounds like fun. Going with IB is probably a good idea. You open a real account with them and they provide a simulated account that behaves exactly like the real one [with the probable exception of fill prices]. That will allow you to home in on the realities of your trading adventure.
What's the cents per share of the backtest? In my experience that's pretty important when talking about backtest vs. live trading.
Do you mean the return per trade? I don't have that information with me currently. What range would you find acceptable? This not a HFT strategy so micro-second speed isn't a must. However, order fill time is assumed to be immediate. Since the orders are only sent on the close of a bar, I assume that they can be filled immediately if the order size is "small" enough. Order size is the major constraint for this strategy.
When your algo sees the close of the latest tick bar and tells you to buy at that price, you will only sometimes be able to trade at that price. If you place a limit buy order at that price and the stock goes immediately up, you will miss the trade and that profit. This will happen more often than you think, particularly for high volume stocks. They frequently have large orders on both the buy and sell side. Being last in and a public order will need to wait for a large number of trades on the bid before you get hit -- probably not until the bid is about to be taken out. Of course, you will get hit on all of your losing trades. The correct way to backtest your strategy is to assume your buy price is the current asking price at the time you get the close for the tick bar. Conversely, your selling price will be the current bid price once you have all information needed for making your sell decision. In practice, you will have a bit of a time delay beyond that, but that is probably not that important unless you're trying to grab very rapidly moving markets. This is not theoretical. It is what will actually happen to you in practice. If you don't include the slippage from the bid-ask spread, you don't know what your actual returns will be. Don't be fooled into thinking your algorithm can capture or even capture part of the bid-ask spread. This is a different approach/modification that you can try to lay on top of a successful strategy. But, if you make such an assumption in your basic strategy, you will be disappointed.