I'm trying to understand exactly when cash changes hands in regards to a futures contract, ignoring exchange fees, say for the purpose of determining how much interest I could receive on the cash. Suppose the previous day's settlement price of the future was 99 dollars. If I enter into a long position in a futures contract at a price of 100 dollars, then I enter a short position within the same trading day at a price of 101 dollars, when exactly do I receive the 1 dollar profit? I see 3 possibilities in order from most to least likely:
The exchange just keeps track of all the long and short positions and prices of those positions made by everyone and settles them all at the end of the day, regardless of whether a position is still open or closed before the end of the day. I cannot earn interest on my 1 dollar profit intra-day.
No money exchanges hands when I enter the long position, the exchange keeps track of open positions and I get the 1 dollar when I enter the short position and close my position. I can earn interest on my 1 dollar profit immediately after closing my position.
Money changes hands immediately based off the difference of the market price and the previous day's settlement price, so when I enter my long position I pay 1 dollar, then when I close my long position I receive 2 dollars. I may have to pay interest on the 1 dollar I borrow when I open the position, but then I can receive interest on my profit of 1 dollar after closing my position.
I'm guessing the answer is 1. uniformly across all exchanges, but I'd be interested to know the details and if any exchanges do it any other way.