A lot of the gap between a backtest and a live account comes down to fills.
Bid, ask and the spread
Every option has two prices at any moment. The bid is the most anyone will pay right now, and the ask is what the cheapest seller wants. You sell at the bid and buy at the ask, the gap between them is the spread, and halfway is the mid.
Made-up quote: bid $1.10, ask $1.20, mid $1.15. Buy at the ask, sell straight back at the bid with the stock unmoved, and you're down $0.10, or $10 a contract, before commission. That's the spread, and you pay it by buying at the ask and selling at the bid. Liquid contracts on big tickers have tight spreads. On thin ones it can be 15% of the price or more.
Market orders
A market order means fill me now at whatever's there. With a penny spread on a stock, fine. On an option it can cost real money, because whatever's there is the ask, and in a fast moment the ask can jump between the bot deciding and the order landing. Spreads in the first minutes after 9:30 are often wider than later in the day.
Limit orders
A limit order sets the worst price you'll take, so a buy limit at $1.20 fills at $1.20 or better and never above. The catch is it might not fill at all. If the price runs away, the order sits there and the trade you wanted never happens.
That trade-off is one of the choices in your spec. Limits can miss entries. Market orders almost always get in and sometimes pay a lot for it. A bot can send a limit and cancel it if it hasn't filled in a few seconds, then let that setup go instead of chasing it. Your spec says what yours does and whether it tries again. Exits often go the other way, with a market order for the time exit, because being stuck in a loser costs more than a few cents of spread.
Partial fills
Sometimes you ask for 4 contracts and get 2. The bot sees the order as still working and the position as 2, and it handles that on its own. You'll see it in the log.
Slippage
Slippage is the gap between the price your rule saw and the price you got. The rule fired with the mid at $1.15 and you filled at $1.22: that's $0.07 of slippage, $7 a contract. It comes from the spread, and fast moves and thin contracts make it worse.
Stops get hit hardest. A stop is a trigger, and the order it sends can fill below your level in a fast market or a gap. A backtest has to assume a fill price, and so does a paper account, and the live account will differ from both. Expect live to come in a little worse than paper on the same day. That's normal.
Commissions
Interactive Brokers charges a fee per contract on the buy and again on the sell. It's small next to the spread and adds up over a month. Check the current schedule for your account.
Questions about this lesson
What is the bid-ask spread on an option?
The bid is the most anyone will pay right now, and the ask is what the cheapest seller wants. The gap between them is the spread. If you buy at the ask and sell at the bid, getting in and back out costs you the spread.
Should I use a market order or a limit order for options?
That is one of the choices in your spec. A limit order sets the worst price you'll take and might not fill. A market order almost always gets in and sometimes pays a lot for it.
What is slippage?
Slippage is the gap between the price your rule saw and the price you got. It comes from the spread, and fast moves and thin contracts make it worse.
Check yourself
Bid $2.00, ask $2.20. You send a market buy. What's the likely fill, and what would an immediate sell get?
About $2.20 for the buy, and about $2.00 for the sell. That's $20 a contract gone to the spread.
Why can a limit order be the wrong choice for an exit?
Because it might not fill, and you'd stay in a position you wanted out of.
For education only, not financial advice. Prices in the worked examples are made up to show the arithmetic. Options can lose 100% of their value.
AwayTrader Bot Builds
Buy a bot
Pick the build by how many tickers the bot trades. The buttons open Whop, where you pay. Every build can be split into 3 or 6 payments.
Only want your rules backtested? The Backtest is $199 (day trades only, no written rules document). Compare the three Or send a free inquiry
For education only, not financial advice. Bot Builds is software built for your own Interactive Brokers account.