OpenHedgeDocs
Menu

Part III · S&P 500 Algorithmic Strategy

Section 036 Coming soon

Funding and Carry Guard

When longs pay expensive funding, the guard trims exposure so the cost of carry cannot quietly erode the strategy.

F_ann = mean(hourly funding, last 72 h) × 24 × 365Positive when longs pay shorts.f_funding = 1.0 | 0.5 (F_ann > 20%) | 0.25 (F_ann > 40%)Negative funding keeps the factor at 1.0.
Figure 36Funding measurement and guard.

A perpetual has no expiry. Instead, longs and shorts exchange a funding payment every hour that keeps the perpetual price close to its oracle. When the market is crowded long, longs pay shorts; in strong bull markets the annualized cost can be large. Because this strategy is long-biased and leveraged, funding is one of its main running costs.

Measurement. At each daily cycle, the strategy averages the hourly funding rate over the previous 72 hours and annualizes it. Seventy-two hours smooths single-hour spikes while still reacting within days.

Guard tiers (design):

Annualized funding paid by longsf_funding
Below 20%1.0
20% to 40%0.5
Above 40%0.25

When funding is negative (shorts pay longs), the factor stays at 1.0. The strategy does not increase size to harvest positive carry, because funding can reverse within hours.

Cost accounting. Funding paid and received is recorded per hour and shown on the dashboard as a separate line from trading fees, so users can see the full cost of holding exposure. The book's equity, and therefore its performance, already includes funding.

The 20% threshold matches the instrument selection criterion in section 28: a market that is persistently that expensive also triggers a review of whether it is still the right instrument.

© 2026 HedgeFund DAO · OpenHedgeNot investment advice. Trading leveraged perpetuals can lose all deposited funds.