Compound Funding
workflow.run_compound_fundingProject capital growth from reinvesting perpetual futures funding income (compounding carry). Use when user asks "how much will I make compounding 0.01% funding for 90 days?" or "what's my APY on this carry position?". Funding received is split by reinvestPct (the rest is withdrawn and still counts as earned); funding paid comes out of capital in full, and the capital never goes below 0. Returns: finalCapital, totalWithdrawn, endValue, totalEarned, totalEarnedPct, annualizedAPY, dailyEarnings, snapshots.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reinvestPct | No | Percentage of funding received that is reinvested each interval, 0-100 (the rest is withdrawn and counts as earned; funding paid always comes out of capital). 100 = full compounding. Default 100. | |
| durationDays | Yes | Number of days to project, up to 3650 | |
| intervalHours | No | Funding interval: 8 (standard) or 1 (Hyperliquid, dYdX, Kraken: per-hour rates) | |
| fundingRatePct | Yes | Funding rate per interval as percentage, e.g. 0.01 for 0.01% | |
| initialCapital | Yes | Starting capital in USDT |