We may have to agree to disagree here. Talking with my trader who has 20+ years of experience on the street with large and institutional investors, he says that if you put in a MOO order and you don’t get the opening price, then something is wrong. (Note that Alpaca uses Market → OPG instead of MOO.)
Prior to the open, all MOO, LOO, or GTC limit orders are tabulated and based upon the order prices, an opening price is generated. All MOO orders should receive that price. Depending on that opening price, GTC Limit or LOO orders may or may not be filled. But Market On Open orders should always be filled and at that opening price. My trader said that if he didn’t get the market price for a MOO order, he’d be on the phone to get that price changed.
After watching the Alpaca paper trading engine work for awhile, I can say that it doesn’t work this way…essentially ever. The Alpaca engine is looking at MOO orders as if they’re normal market orders during the trading day. If you have a market sell order, it should go off at the highest bid providing that there are enough shares in the bid to fill your order. If not, the price should go down to the next highest bid…and so on until your sell order is filled.
If your market order is to buy some shares, then your buy order price will be the lowest asking price, again providing that there are enough shares on the ask to fill your buy.
But that’s not the way a MOO / Market-OPG order is supposed to work as I’ve outlined above.
It’s become pretty apparent after watching weeks worth of paper Market-OPG orders, that Alpaca never put any effort into the paper trading engine code to have Market-OPG orders function as they would in the real world. I mean, it does make sense from their perspective; paper trades don’t directly equate into real order flow selling or other revenue generating opportunities. So they skimped on the coding a little bit…though the coding for this capability would be extremely minor. Just have a Market-OPG order price automatically equal the market’s actual opening price.
This would cost a little programmer time (a very little time) but it would then allow more than functional testing of a trading algorithm; it would allow anyone using MOO or LOO orders to actually test the logic behind their algo’s trades.
Their current method for Market-OPG orders creates really bizarre artifacts. For example, about 10 to 15% of the time, my test Market-OPG orders receive partial fills…and I’m talking partial fills on $4k paper money orders. Also, since bid / ask volume can be pretty slow immediately after the open, you can get some strange results. For example, one of my algos had a MOO buy on for KLAC and it paper filled at the lowest ask after the open…at $305.71. The real market open was $301.60…which also was the HOD. So, with this flawed / lazy way of doing Market-OPG orders, my algorithm’s opening buy came in at 1.36% above the HOD.
Let’s just say that my trader is very unimpressed with how the paper trading engine works and it makes him question why we’re using Alpaca for our programs. He wonders if we’re going to see the same ridiculous differences with live money trades. And while I try to explain to him how this is a non sequitur when it comes to programming, I can understand how someone whose career has been focused within the street rather than directly in technology would lose some confidence when seeing paper trades go off so inaccurately. If our initial investors saw these trade prices, I suspect they also would be far less confident in trusting us and Alpaca with their money. And because of this, I’m pretty surprised that Alpaca wouldn’t put a very small amount of programmer time into fixing how their Market-OPG orders work. And, I suspect, Market-CLS orders have this issue but none of my algorithms use MOC / LOC orders currently.