When we want to close out the position of futures prior to the delivery period, you will
entering into the opposite trade to the original one. Equivalently, except for the P&L at the closing time, you have nothing related to this contract again.
But in the real trading, you still have two contracts and should make the delivery both of them at the maturity, and we never consider the commission, default from one of your counterparty etc. So can anyone tell me the mechanics of the closing out for a future contract in the real trading?