Derivatives, One Step at a Time

Choose an order and understand its limits

Loading Java…

Choose an order and understand its limits

A sensible hedge can still be executed badly. An order tells a broker what to do and under which conditions; it cannot force another trader to provide liquidity. Follow the bakery’s orders through a small market and separate protection against a bad price from certainty of getting a trade.

Predict before running each calculation. Every cell stands alone. Make the requested edit before answering when an exercise specifies one. Enter numeric answers without units; round to two decimals unless stated otherwise. The calculations explain market mechanics, not a trading strategy.

What does an order instruction control?

InstructionOur fictional execution ruleWhat it does not promise
Market buyTake available asks, starting with the lowestA fixed price or complete execution in an empty book
Buy limitBuy only at or below the limitThat enough sellers will appear
Buy stop-marketA qualifying trade at/above the trigger releases a market orderExecution at the trigger price
Buy stop-limitThe trigger releases a buy limit orderExecution if prices gap above the limit

A sale reverses the relevant price inequalities. Stop-trigger definitions and order handling are venue-specific; the rules above are the entire rulebook for these examples.

A price limit restricts allowed prices during a session; it is not insurance against loss. At a limit there may be no liquidity to close a position. A position limit restricts the outstanding position under specified aggregation rules; it is different from contract size or order quantity.

Average fill price = sum of (filled contracts × price) / filled contracts. Apply the 25-bag multiplier afterward to translate a quoted-price difference into cash. Keep filled and unfilled quantities separate.

Scenario and assumptions

Use 25-bag flour contracts, no fees, no competing orders and no hidden liquidity. Each exercise is a separate market snapshot. Stops trigger from trades, not quotes. Orders remain active only as described. All price and position limits are fictional instructional rules, not current exchange specifications.

Exercise 1 — A market order walks the book

The visible asks are two contracts at $21.40 and three at $21.60. Buy four immediately. Two fill at each price; the last displayed ask is not the price of the whole order. Calculate the average dollars per bag.

A market buy takes two contracts at $21.40 and two at $21.60, filling all four at a $21.50 average.

The diagram uses this exercise’s fixed snapshot; editing code does not update it.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is the average fill price per bag?

Need a hint?

Keep quantity, quote units and cash-flow signs explicit. Round only the final answer.

Waiting for your answer.

Exercise 2 — Count a partial limit fill

Use the same asks. A four-contract buy limit at $21.40 can take only the two contracts offered at that price. The remainder stays unfilled in this snapshot. The code counts the remaining contracts.

A $21.40 buy-limit ceiling blocks the higher asks: two contracts fill and two remain unfilled.

The diagram uses this exercise’s fixed snapshot; editing code does not update it.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

How many contracts remain unfilled?

Need a hint?

Keep quantity, quote units and cash-flow signs explicit. Round only the final answer.

Waiting for your answer.

Exercise 3 — Change the limit, then calculate the extra cost

With that unchanged book, raising the buy limit from $21.40 to $21.60 allows the remaining two contracts to fill at $21.60. Compare the four-contract average of $21.50 with the original best ask of $21.40. Then change quantity from 4 to 6 only as a cost-scaling thought experiment; this cell does not claim the book can fill six.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

After scaling the comparison to six contracts, what is the cost difference?

Need a hint?

Keep quantity, quote units and cash-flow signs explicit. Round only the final answer.

Waiting for your answer.

Exercise 4 — A stop-market can jump past its trigger

A bakery is short four contracts and uses a buy stop-market triggered at $22.00. The next trade jumps from $21.80 to $22.50. The trigger fires and the available ask for all four contracts is $22.60. Calculate the extra closing cost relative to assuming a $22.00 fill.

A trade gaps over the $22.00 trigger to $22.50; the released market buy fills at the $22.60 ask.

The diagram uses this exercise’s fixed snapshot; editing code does not update it.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

How much extra does the actual fill cost relative to the trigger-price assumption?

Need a hint?

Keep quantity, quote units and cash-flow signs explicit. Round only the final answer.

Waiting for your answer.

Exercise 5 — A stop-limit can leave the hedge open

Replace that stop with a $22.00 buy trigger and a $22.20 limit. The next trade is still $22.50 and the best ask is $22.60. The released limit order cannot execute. The code counts the contracts still short.

The same gap triggers a $22.20 buy limit, but the $22.60 ask is above its ceiling: all four shorts remain open.

The diagram uses this exercise’s fixed snapshot; editing code does not update it.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · CHOOSE ONE

Which statement describes the resulting position?

Need a hint?

Read the stated contract or account rule; do not assume every market uses it.

Waiting for your answer.

Exercise 6 — A daily price limit is not exit liquidity

The short four-contract position entered at $21.00. Today the fictional upper price limit is $23.00, and buyers queue there with no sellers. Settlement reaches $23.00. Calculate the short’s daily loss from the $21.00 prior settlement; the inability to buy does not prevent the account debit.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is the signed settlement cash flow?

Need a hint?

Keep quantity, quote units and cash-flow signs explicit. Round only the final answer.

Waiting for your answer.

Exercise 7 — Check a position limit before sending the order

Our fictional broker permits at most twelve net long contracts in this account. The bakery holds nine and requests five more. Ignore exemptions and aggregation across other accounts. Calculate how many additional longs fit under this rule.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is the largest additional long quantity permitted here?

Need a hint?

Keep quantity, quote units and cash-flow signs explicit. Round only the final answer.

Waiting for your answer.

Remember

Market orders face price and liquidity risk; limit orders face nonexecution risk. Stops are triggers, not guaranteed prices. Price limits and position limits constrain trading in different ways. Always inspect the remaining position after a partial fill or failed exit.

Keyboard shortcuts

Press Esc to enter cell command mode. Then use the keys below. Press Enter to edit again.

A
In command mode: insert a Java cell above the selected cell.
B
In command mode: insert a Java cell below the selected cell.
D, D
In command mode: press D twice within one second to delete the selected cell. Runtime variables remain until kernel restart.
Z
In command mode: undo the last cell deletion.
Shift + Enter
Run code, check a quiz answer, or advance past Markdown; then select the next cell.
Tab
Move focus to the next control or cell.
Shift + Tab
Move focus to the previous control or cell.
Enter
Edit the selected cell in command mode; check an answer when a quiz input is focused, or activate a focused button.
Esc
Enter cell command mode, or close this popup when it is open.