Suppose `A` takes a long position by buying a December gold futures contract in January, and `B` at the same time takes a short position by selling the contract. The orders from `A` and `B` are matched and the agreed price for December gold is **$1000**.

Assume that the December gold futures price goes like this:

January = **$1000** → ... → November = **$800** → December = **$700**

In November, at the end of the day, the balance in the `A`'s margin account would be reduced by **$200**, and the `B`'s margin account would be increased by **$200**. (Daily settlement)

Now in November, if `A` decides to close out the position

1. Can `A` just walk away from the market, with a loss of **$200**? I read from the book *Options Futures and Other Derivatives* that

 > Closing out a position means entering into the opposite trade to the original one. For example, the New York trader who bought a September corn futures contract
on June 5 can close out the position by selling (i.e., shorting) one September corn futures
contract on, say, July 20. The Kansas trader who sold (i.e., shorted) a September contract
on June 5 can close out the position by buying one September contract on, say,
August 25. In each case, the trader’s total gain or loss is determined by the change in
the futures price between June 5 and the day when the contract is closed out

 but I don't understand why would `A` want to sell a December gold contract? And if he has to do so, what should be the agreed price (the price he's willing to sell) and who will buy his contract?

2. What happens to `B`? If `B` holds the contract until December, he would have the right to sell the gold at **$1000** while the price in the market is only (or should be very closed to) **$700**, meaning that `B` should gain **$300**. But now his margin account has increased only **$200**. Where would an extra **$100** come from?