Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    perp funding basis analyzer

    1

    Attribute linear spot/perp basis P&L, reconcile funding cash flows, and identify residual hedge risks.

    $15

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    perp funding basis analyzer

    perp funding basis analyzer

    Example session with this skill installed

    Analyze this basis trade data for BTC-USDT. Spot: 1.2 BTC @ 60000. Perp: -1.2 BTC @ 60100. Funding received: 45.00 USDT. Fees: 12.00 USDT. Spot mark is now 60500, Perp mark is 60550.

    • Read your context and instructions
    • Compiled the perp funding basis
    • Generated the document

    I have processed the BTC-USDT basis trade data. The analysis reconciles the mark P&L against the realized cash flows to determine the net basis performance.

    Basis Attribution Report

    ComponentValue (USDT)Type
    Spot Mark P&L+600.00Unrealized
    Perp Mark P&L-540.00Unrealized
    Gross Mark P&L+60.00Basis Convergence
    Funding Cash Flow+45.00Realized
    Trading Fees-12.00Realized
    Net Realized Cash+33.00Carry Income
    Total Attribution+93.00Net Result

    Position Residuals

    • Normalized Quantity: 1.20000000 BTC
    • Hedge Ratio: 1.00 (Perfectly Hedged)
    • Residual Delta: 0.00000000 BTC

    Basis Scenario Analysis

    If the Perpetual Mark Price moves to 60,700 USDT (+150) while Spot remains at 60,500 USDT:

    • Scenario P&L Change: -180.00 USDT
    • Adjusted Total Attribution: -87.00 USDT

    Next steps

    1. Review the trading_fees breakdown to see if the -12.00 USDT matches your venue's VIP tier.
    2. Verify if the +45.00 USDT funding payment includes or excludes interest on the spot margin loan.
    3. Update the report.json with the current borrowing rate for a more accurate net carry calculation.

    perp-funding-basis-analyzer.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Decompose basis trade P&L into mark movements and realized funding cash.Detect delta leakage in supposedly neutral spot/perp hedges.Model basis sensitivity to perpetual price shocks independently of spot.Audit exchange statements for missing or miscalculated funding payments.

    About this skill

    The problem

    Attributing P&L in basis trades is difficult due to the mixing of spot price movement, perpetual mark prices, and realized funding cash flows. Manual reconciliation often fails to distinguish between unrealized mark P&L and actual cash-in-hand funding payments.

    What it does

    • Normalizes linear spot and perpetual quantities into unified underlying units and quote currencies.
    • Separates mark P&L from realized account P&L, including signed funding cash flows and borrowing costs.
    • Calculates residual hedge quantities to identify delta leakage in delta-neutral positions.
    • Runs basis-only scenarios to model P&L sensitivity to perpetual price shocks relative to fixed spot.
    • Identifies missing records and unresolved discrepancies between helper calculations and statement data.

    Why this beats prompting it yourself

    General-purpose LLMs struggle with the precise arithmetic required for signed funding flows and often hallucinate annualized yields from small samples. This skill enforces a strict normalization workflow and prevents the common mistake of treating quoted rates as realized cash.

    Use cases

    • Reconciling monthly funding payments against spot/perp basis trade performance.
    • Auditing delta-neutral portfolios for residual exposure after quantity adjustments.
    • Stress testing basis positions against perpetual mark price deviations.
    • Identifying specific fee or borrowing cost drains on a carry trade.

    Known limitations

    Supports linear contracts only. Inverse and quanto contracts are rejected. No live market feeds or automated execution.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 13 days ago

    • Passed all security checks, Safe to install

    Needs access to

    Gitbook

    Listed13 days ago

    What's inside

    Frequently Asked Questions