Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Value swap fixed leg pv

derivatives.swap_fixed_leg_pv

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

Calculate bounded deterministic swap fixed leg pv over explicit ordered cash-flow arrays with closed schemas, deterministic decimal arithmetic, bounded counts, and no hidden market-data lookup.

We provide bounded swap arithmetic that preserves audit identities.

Reliability

DERIVATIVE_INPUT_INVALID and ITEM_LIMIT_EXCEEDED identify closed-domain or bound failures.

Context footprint

One batch replaces per-swap orchestration loops. A successful call costs 1 execution credit.

When to use it

When one fixed coupon rate must be applied to explicit period notionals, year fractions, and discount factors.

When coupons are floating rather than a single fixed rate, or the schedule still needs to be generated.

Scope

Note
Calculate bounded deterministic swap fixed leg pv for one explicit leg or one ordered bounded swap set, preserving identifiers and deterministic input order without market-data or schedule inference.

Non-goals

  • Does not construct schedules or curves.
  • Does not fetch rates, cash flows, or currencies.

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

math

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input64 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
periodsarrayYesFrom 1 through 10,000 closed fixed-coupon period objects in payment order.
fixedRatestringYesSigned finite plain-decimal fixed coupon rate.
notionalExchangesarrayYesFrom 0 through 2 closed discounted notional-exchange objects.

Output schema

FieldTypeRequiredDescription
presentValuestringYesTotal coupon plus notional-exchange present value.
couponPresentValuestringYesPresent value of ordered coupon or cash-flow rows.
exchangePresentValuestringYesPresent value of explicit notional exchanges.
countintegerYesNumber of coupon or cash-flow rows valued.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"derivatives.swap_fixed_leg_pv","input":{"periods":[{"notional":"1000","yearFraction":"0.5","discountFactor":"0.99"}],"fixedRate":"0.04","notionalExchanges":[]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("derivatives.swap_fixed_leg_pv", {"fixedRate":"0.04","notionalExchanges":[],"periods":[{"notional":"1000","yearFraction":"0.5","discountFactor":"0.99"}]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
DERIVATIVE_INPUT_INVALID400NoThe request payload failed this skill's input validation.
ITEM_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not construct schedules or curves.
  • Does not fetch rates, cash flows, or currencies.
  • Unbounded books or implicit market data.

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "derivatives.swap_fixed_leg_pv",
  "input": {
    "fixedRate": "0.04",
    "notionalExchanges": [],
    "periods": [
      {
        "notional": "1000",
        "yearFraction": "0.5",
        "discountFactor": "0.99"
      }
    ]
  }
}

Examples

Verified vector

Inputjson
{
  "fixedRate": "0.04",
  "notionalExchanges": [],
  "periods": [
    {
      "notional": "1000",
      "yearFraction": "0.5",
      "discountFactor": "0.99"
    }
  ]
}
Expected outputjson
{
  "couponPresentValue": "19.8",
  "presentValue": "19.8",
  "count": 1,
  "exchangePresentValue": "0"
}
Tip
Independent W19 vector.

Repeated vector

Inputjson
{
  "fixedRate": "0.04",
  "notionalExchanges": [],
  "periods": [
    {
      "notional": "1000",
      "yearFraction": "0.5",
      "discountFactor": "0.99"
    }
  ]
}
Expected outputjson
{
  "couponPresentValue": "19.8",
  "presentValue": "19.8",
  "count": 1,
  "exchangePresentValue": "0"
}
Tip
Deterministic repeat.
  • Independent swap valuation from explicit cash flows.
  • Deterministic NAV support calculations.

Avoid for

  • Unbounded books or implicit market data.

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

swapmathderivatives