σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Market Structure skill›Module 2 · How trading works›Topic 2.3·~45 minBeginner

Order types and time-in-force

Skill positionModule 2 of 4 · Topic 3 of 3
2.3 Order types and time-in-force
—Lab score— / 100Total XP—Streak—

Telling the market what you want

An order states a side (buy or sell), a quantity, and conditions on price and time. The two basic types are the market order and the limit order. A market order executes immediately at the best prices available: execution is almost certain, but the price is not guaranteed. A limit order executes only at its limit price or better: the price is guaranteed, but execution is not.

A stop order sleeps until the market trades at its stop price, then becomes a market order (or a limit order, for a stop-limit). It is used to cut losses or enter a breakout; in a fast market the fill can be far from the stop price.

Time in force says how long an order lives. DAY expires at the close. GTC (good till cancelled) stays until cancelled, usually up to a broker limit of a few months. IOC (immediate-or-cancel) fills whatever it can right now and cancels the rest. FOK (fill-or-kill) must fill completely at once or is cancelled. Market-on-close (MOC) orders join the closing auction.

  • Market: executes now at the best available prices.
  • Limit: executes at the limit price or better, may rest in the book.
  • Stop: becomes a market order once the stop price trades.
  • IOC: fills what it can immediately and cancels the rest.
  • FOK: fills completely at once or is cancelled entirely.
  • MOC: a market order that joins the closing auction.
Filling a limit buyA buy limit order for 300 shares at 20.10 meets these offers: 200 shares at 20.05, 300 at 20.10 and 500 at 20.20. It takes 200 at 20.05, then 100 at 20.10, and stops: 20.20 is above its limit. The average price is (200 × 20.05 + 100 × 20.10) / 300 = 20.0667, better than the 20.10 limit.
Neither order type is safeA limit order protects the price but not the outcome: if the market runs away you do not trade and miss the move. A market order protects the outcome but not the price: in a thin book it can walk through several price levels.

Lab · what's graded

  • Order types25 pts
  • Where does a limit buy fill?10 pts
  • Market orders15 pts
  • Average fill price15 pts
  • Immediate-or-cancel15 pts
  • IOC versus FOK20 pts
0/ 6 answered
Tasks
1Match25 ptsNot answered

Match each order type to its behaviour.

Pick the partner of each item on the left.

Market
Limit
Stop
IOC
FOK
2Choice10 ptsNot answered

A buy limit order at 50.00 arrives when the best offer in the book is 49.95. At what price does it execute?

3Choice15 ptsNot answered

Select every true statement about market orders.

4Numeric answer15 ptsNot answered

A buy limit order for 300 shares at 20.10 meets offers of 200 shares at 20.05, 300 at 20.10 and 500 at 20.20. What is its average fill price?

average price=\text{average price} =average price=accepted: ± 0.001
5Choice15 ptsNot answered

Which time in force fills as much as possible immediately and cancels whatever is left?

6Explain in words20 ptsNot answered

In two or three sentences, explain how an IOC order differs from a FOK order.

Math modeKeyboard or LaTeX inputTask 1 of 6 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub