- Home
- Skills
- Trading & Investing
- perp funding basis analyzer
Works with the AI tools you already use
perp funding basis analyzer
Attribute linear spot/perp basis P&L, reconcile funding cash flows, and identify residual hedge risks.
$15
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
| Component | Value (USDT) | Type |
|---|---|---|
| Spot Mark P&L | +600.00 | Unrealized |
| Perp Mark P&L | -540.00 | Unrealized |
| Gross Mark P&L | +60.00 | Basis Convergence |
| Funding Cash Flow | +45.00 | Realized |
| Trading Fees | -12.00 | Realized |
| Net Realized Cash | +33.00 | Carry Income |
| Total Attribution | +93.00 | Net 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
- Review the
trading_feesbreakdown to see if the -12.00 USDT matches your venue's VIP tier. - Verify if the +45.00 USDT funding payment includes or excludes interest on the spot margin loan.
- Update the
report.jsonwith the current borrowing rate for a more accurate net carry calculation.
perp-funding-basis-analyzer.pdf
PDF · document
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
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.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 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