Free lesson · Crypto derivatives
Perpetual funding as actual cash flows
Open interactive lessonPractice calculationsExplore labs
Start with the idea
Funding is a sequence of payments. The sign, assessment times and notional used for each payment matter more than a headline annual rate.
Symbols, units & horizon
- C_fund: USD funding cash flow, positive received
- k: funding event
- K: event count
- s_k: +1 long or −1 short
- N_k: positive assessed USD notional
- f_k: funding fraction per event
- positive f means long pays in this convention
When and why to use this
Build a spot/perpetual carry ledger using actual eligible positions and funding events.
Funding is a sequence of payments. The sign, assessment times and notional used for each payment matter more than a headline annual rate.
Adopt an explicit teaching convention: a positive rate means longs pay shorts; position sign is positive for a long. Real venue rules can differ in assessment notional, caps and timing, so verify them before implementation.
Sum realized payments at each funding timestamp using the position that was eligible then. Future rates remain uncertain, and closing early can avoid or forfeit a scheduled payment depending on the rules.
Perpetual funding as actual cash flows
- At each assessment time identify side, eligible notional and rate.
- Multiply −side×notional×rate to obtain signed payment.
- Sum all event cash flows without multiplying by an arbitrary annualization factor.
Short $10,000 assessed notional at rates .001, −.0005 and .0008 receives $10, pays $5 and receives $8: total +$13.
Apply it in a strategy
- Build a spot/perpetual carry ledger using actual eligible positions and funding events.
- Record the input timestamp, executable quantity, currency and horizon. Reconcile the result with a cash-flow or state table.
- Stress this failure condition: Multiplying one observed rate by a year invents future funding and ignores changing notional and sign.
Research deliverable
Build and explain a perpetual funding as actual cash flows worksheet. Build a spot/perpetual carry ledger using actual eligible positions and funding events.
Evidence boundary: Synthetic arithmetic and scenarios illustrate mechanics. They are not historical returns, a paper replication, or evidence of an executable edge. Research sources and their access limitations are recorded at the end of this module.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
# Python 3.10+; standard library unless NumPy is imported below.
# Inputs and outputs use the units defined in this lesson. Synthetic teaching example.
def funding_cash(sides,notionals,rates):
if not(len(sides)==len(notionals)==len(rates)) or any(s not in (-1,1) for s in sides) or any(n<0 for n in notionals):
raise ValueError("Aligned funding events required")
return sum(-s*n*f for s,n,f in zip(sides,notionals,rates))
print(funding_cash([-1,-1,-1],[10000,10000,10000],[.001,-.0005,.0008]))Continue learning
Crypto Derivatives: Carry, Funding and Liquidation — all lessons- Linear contract payoff and the multiplier
- Inverse contracts pay in the base asset
- Basis annualization and its limits
- Perpetual funding as actual cash flows
- Equity versus maintenance along a price path
- Solve a simplified liquidation boundary
- Collateral depegs and wrong-way exposure
- Reconcile the funded spot–perpetual hedge
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations