Quant Memo
Foundational

Time In Force: Day, GTC, IOC And FOK

The price and size of an order are only half the instruction. Time in force says how long it should wait, and what to do if it can't fill completely — and picking the wrong one is a common, expensive mistake.

Prerequisites: Order Book Mechanics

Every order needs two answers besides price and size: how long should it sit before the exchange gives up on it, and what happens to the part that doesn't fill right away. That's what time in force (TIF) controls.

Day. The default. The order rests until it fills, is cancelled, or the trading session ends, whichever comes first. At the close it simply vanishes — no residual carries to tomorrow.

GTC (good-till-cancelled). Same as Day, but it survives the close and keeps resting on subsequent sessions until filled or explicitly cancelled (most venues still cap this at some number of days, so "cancelled" eventually happens on its own).

IOC (immediate-or-cancel). Fill whatever quantity is available right now, at your limit or better, and cancel the rest. Nothing rests on the book, even for a microsecond.

FOK (fill-or-kill). All-or-nothing IOC: fill the entire size immediately or cancel the whole order. No partial fills allowed.

A worked comparison

The offer side of a book shows: 200 @ 50.02, 150 @ 50.03, 300 @ 50.04. A trader sends a buy limit order for 400 shares at 50.03.

  • Day/GTC: sweeps 200 @ 50.02 and 150 @ 50.03 (350 filled), then the remaining 50 shares rest on the bid at 50.03, waiting for a seller to come to them.
  • IOC: same 350 shares fill immediately, but the leftover 50 is cancelled instead of resting — the trader gets partial execution and no residual order sitting exposed.
  • FOK: the engine checks first whether 400 shares are available at 50.03 or better. Only 350 are (200 + 150), so the entire 400-share order is cancelled — zero shares trade.
400-share buy @ 50.03 vs offers 200@50.02, 150@50.03 Day / GTC 350 filled, 50 rests

IOC 350 filled, 50 cancelled

FOK 0 filled — 400 not fully available

only 350 shares exist at 50.03 or better Day rests the shortfall · IOC drops it · FOK kills everything

Same order, same book, three different results — the difference is entirely in what the qualifier does with the shares that couldn't fill instantly.

IOC and FOK never rest — they trade what's there right now or nothing. Day and GTC rest whatever is left over. Choosing between them is a choice about how much you're willing to reveal by leaving an order on the book.

Why it matters in practice. IOC is the workhorse of liquidity-seeking algorithms: it probes hidden and displayed liquidity across venues without ever leaving a trace on the book if it misses. FOK is used when a trade only makes sense as a complete unit — a pairs trade or an option combo where a partial fill leaves unwanted risk. GTC orders are convenient for retail limit orders but dangerous for anything price-sensitive: a stale GTC order from three weeks ago can execute against a price the trader would never have chosen today.

A day order left unmonitored across a scheduled event (earnings, an economic release) can fill at a price the trader would have cancelled given the news. "Day" only protects you from the next session, not from the next headline.

In interviews, the FOK-versus-IOC distinction is a favorite because it's a one-line answer that's easy to get backwards: FOK is stricter (all or nothing), IOC is looser (as much as possible, right now).

Related concepts

Practice in interviews

Further reading

  • Harris, Trading and Exchanges (ch. 4)
ShareTwitterLinkedIn