Spreads are uncertain transaction costs. The price difference in quotation-driven market consists of the inventory cost, adverse selection cost and order processing cost of market makers, while the price difference in order-driven market consists of adverse selection cost, order processing cost and execution cost, and there is no inventory cost. When calculating the price difference, when opening a position, subtract the lower price from the higher price. So in futures, the spread is generally positive.
The average price difference is calculated by weighted average.