Question - Buying Open, Selling Close

Discussion in 'Order Execution' started by gmst, Oct 31, 2011.

  1. gmst


    I am thinking of dabbling in stocks, primarily trade forex. Was backtesting some ideas using OHLC data from

    I have a basic question. Is is possible to buy/sell at the open price and buy/sell at the close price. Or these open and close prices as reported on google finance are some kind of average prices (average from auctions ??) - and its not possible to buy/sell at them.

    I am doubtful because I have read on this board that many morning open orders don't get filled (like bright trading opening only strategy etc.). Also, there is a MOC type of order (market on close). It will be great if someone can explain how this kind of order works ? Is it guaranteed that this order will fill you at closing price ?

    Thanks in advance.
  2. If you're talking about daily bars, which I assume since you mention downloading OHLC from google, then obviously yes. The minute the market opens, buy at market, and the minute before it closes, sell at market. If that doesn't answer your question, I'm not sure what the question really is?

    Open and Close prices are only the last traded prices at the time the bar begins and ends (ie 1 minute, 1 day, whatever). Those prices are there and available to everyone, but if you're looking at 1-minute charts, you will have to be very quick on bar open and you can count on slippage too.
  3. gmst


    Yes, I am talking about daily bars. if it is easy/possible to buy/sell open print and buy/sell closing print. Thanks for your response - probably its doable.

    The reason I asked is because i am very new to stocks. To do any kind of backtesting on daily bars, I only have O,H,L,C data available to me. H,L data for current bar are not really of any use - as I won't know when current bar is reaching its high/low for the day. Ofcourse, high/lows of previous days should be useful for backtesting.

    If the google finance open and close prints are not some kind of average/auction prints, then yes it should be possible to trade them.
  4. For forex, usually the price is available at both the open and close. Maybe sunday open may not be available depending when the first print in the data is and when your broker start trading. Forex is open 24 hours per day (unless your talking ETFs or futures) so the opening problem only occurs once per week.
    For stocks I disagree with the previous poster. I got wet dreams about all the money I would make using Yahoo data for backtesting. And the erotic dream didn't materialise because the data is not always tradable. Closing prices are about ok. Opening prices are not. Sometimes the opening price is only a 100 shares that happened on a very wide spread and therefore can be off up to a dollar. Obviously on stocks like GE and SPY this should not happen. But on many other it will every once in a while. And I am not talking penny stocks. A lot of stocks pre-open have wide spreads.
    If you want to convince yourself of that backtest a strategy that trades pairs (KO:pEP, CVX:XOM, ...), open trade at the open and close trade at the close of the same day. Your backtest will be profitable but in real life you'll lose money.
  5. t482


  6. gmst


    Thanks, my concern was very similar to your point. So, if you are restricted to only OHLC daily data for your strategy development and trading, how do you use opening prices in your backtests? Basically I am asking, how do you overcome this problem. Also, in your experience (lets say we are talking about top 1000 stocks in US by MCap - that will mean 500 S&P500 names and 500 other names), in how many names - the opening price will be non-tradeable because of liquidity issues, market quickly moving away from opening print issues.

    Thanks to all the experienced stock traders who respond !! Just trying to survey the battlefield before I jump into it. :)
  7. ronblack


    I usually get filled at the reported open/close for liquid stocks. For illiquid stocks you will get slippage. Keep in mind that MOC orders must be submitted ahead of time depending on broker. Mine requires at leat 20 minutes ahead for MOC and 10 minutes for MOO.
  8. gmst


    Thanks for the feedback. what are illiquid stocks (what range of average volume) and how much slippage do you get with MOC and MOO trades ?

    Its a bit confusing as a previous poster said that liquidity is highest during open, so he doesn't experience any slippage; whereas another poster said that opening print might trade only 100 shares, and then price might move against it quite a bit. Its confusing to hear diverse opinions, so if you can please explain in a bit more detail about your experience with the liquidity that will help. Thanks
  9. Bob111


    depend on amount of money you willing to play with..i think it's pretty easy to understand for everyone..with 1000$ per position,per stock you can play with stocks like 50K average volume..with 10M even most liquid might not be enough..bottom line-liqud stocks >1M average daily volume=relatively accurate open data,but no way you can get this price(open in particular). MOC is only for NYSE,odd lots probably will be rejected. i would not touch MOC on nasdaq,unless you into S&M.:p
    creating any strategy\system where fill on open price is involved as been said above- a wet dream.forgetaboutit
  10. gmst


    Hey Bob, thanks very much for the heads up!
    Can you pls shed some more light on below:
    1. What is so particular with Nasdaq that you won't touch MOC on it? What is S&M (Sorry if its a basic question, I think I need to visit NYSE website and do some reading on different order types/auctions etc.)
    2. why will MOC odd lots be rejected on NYSE ?

    Thanks for your pointers.
    #10     Oct 31, 2011