Calculate each observed payment
With fixed quantity q, mark price P and rate_percent r, the signed-rate amount before choosing side is q × P × r ÷ 100. Under the convention used here, a positive rate is paid by the long and received by the short; a negative rate reverses those cashflows. Long cashflow is therefore the negative of the signed-rate amount, while short cashflow uses its existing sign. Use settlement mark prices and finalized rates rather than mixing a predicted rate with an actual payment row.
Respect the observations you actually have
The total is the sum of the supplied settlement rows. It does not invent missing payments or assume a fixed eight-hour interval. A timestamp identifies the event but does not demonstrate that the position was eligible for funding then. The model assumes the same base quantity was held for every included observation; split the analysis when quantity changed or the position was temporarily closed. Growing mark prices increase modeled notional even when the number of BTC or other underlying units stays unchanged.
Reconcile with an account statement
Check position direction, rate units and quote currency before comparing the total with exchange records. Entering 0.01 means 0.01 percent, not a decimal rate of one percent. Differences can come from position size changes, contract multipliers, settlement rounding or an unsuitable inverse-contract model. This linear calculation excludes mark-to-market trading profit, entry and exit fees, borrowing, margin transfers and taxes. Use it to audit the funding component of a strategy, then combine compatible cashflows in a separate total-return review.