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.