The itemized settlement formula is: profit and loss of the day = profit and loss of liquidation+profit and loss of position.
(1) Ending profit and loss = average historical profit and loss+average current profit and loss.
Average historical warehouse profit and loss = ∑ [(selling closing price-settlement price on the last trading day) * selling volume]+∑ [(settlement price on the last trading day-buying closing price) * buying volume]
Average profit and loss of the day = ∑ [(selling closing price of the day-buying opening price of the day) * selling closing amount]+∑ [(selling opening price of the day-buying closing price of the day) * buying closing amount]
(2) Position profit and loss = historical position profit and loss+opening profit and loss on the same day
Historical position profit and loss = (settlement price of the day-settlement price of the previous day) * position.
Opening profit and loss of the day = ∑ [(selling opening price-settlement price of the day) * selling opening quantity]+∑ [(settlement price of the day-buying opening price) * buying opening quantity]
(3) The profit and loss of the day can be integrated into a general formula.
Profit and loss of the day = ∑ [(selling price-settlement price of the day) * sold quantity]+∑ [(settlement price of the day-settlement price of the day) *]+(settlement price of the previous trading day-settlement price of the day) * (selling position of the previous trading day-buying position of the previous trading day)