Calculate accrual period fraction
finance.accrual_period_fraction
Overview
Calculate explicit accrual period fraction from ordered ISO dates under an explicit closed profile, returning an auditable decimal receipt without hidden schedule, calendar, locale, or wall-clock state.
We provide pinned day-count arithmetic without hidden schedule assumptions.
Reliability
DAY_COUNT_INPUT_INVALID means dates, endpoint rule, or profile are unsupported.
Context footprint
The compact receipt replaces prompt date arithmetic. A successful call costs 1 execution credit.
When to use it
When the day-count convention is still chosen at call time through a closed profileId rather than a dedicated skill.
When the convention is already known; call the dedicated year-fraction skill instead of passing a profile object.
Scope
Non-goals
- Does not infer a day-count profile.
- Does not accept schedule-dependent Actual/Actual ICMA.
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | Required closed startDate field. |
| endDate | string | Yes | Required closed endDate field. |
| dayCountProfile | object | Yes | Closed object {profileId, profileVersion}; allowed profileId: THIRTY_360_US, THIRTY_E_360, ACT_360, ACT_365F; profileVersion must be 1. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| yearFraction | string | Yes | Deterministic day-count output receipt field yearFraction. |
| dayCount | integer | Yes | Deterministic day-count output receipt field dayCount. |
| profileId | string | Yes | Deterministic day-count output receipt field profileId. |
| profileVersion | string | Yes | Deterministic day-count output receipt field profileVersion. |
| trace | object | Yes | Output receipt object with properties {numerator, denominator, startDate, endDate} reproducing the selected profile calculation. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"finance.accrual_period_fraction","input":{"startDate":"2026-01-01","endDate":"2026-07-01","dayCountProfile":{"profileId":"ACT_360","profileVersion":"1"}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("finance.accrual_period_fraction", {"startDate":"2026-01-01","endDate":"2026-07-01","dayCountProfile":{"profileId":"ACT_360","profileVersion":"1"}});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| DAY_COUNT_INPUT_INVALID | 400 | No | The request payload failed this skill's input validation. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not infer a day-count profile.
- Does not accept schedule-dependent Actual/Actual ICMA.
- Schedule-dependent or inferred conventions.
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "finance.accrual_period_fraction",
"input": {
"startDate": "2026-01-01",
"endDate": "2026-07-01",
"dayCountProfile": {
"profileId": "ACT_360",
"profileVersion": "1"
}
}
}Examples
Verified vector
{
"startDate": "2026-01-01",
"endDate": "2026-07-01",
"dayCountProfile": {
"profileId": "ACT_360",
"profileVersion": "1"
}
}{
"profileId": "ACT_360",
"profileVersion": "1",
"trace": {
"numerator": 181,
"denominator": 360,
"startDate": "2026-01-01",
"endDate": "2026-07-01"
},
"yearFraction": "0.5027777777777778",
"dayCount": 181
}Repeated vector
{
"startDate": "2026-01-01",
"endDate": "2026-07-01",
"dayCountProfile": {
"profileId": "ACT_360",
"profileVersion": "1"
}
}{
"profileId": "ACT_360",
"profileVersion": "1",
"trace": {
"numerator": 181,
"denominator": 360,
"startDate": "2026-01-01",
"endDate": "2026-07-01"
},
"yearFraction": "0.5027777777777778",
"dayCount": 181
}Recommended use cases
- Explicit deterministic accrual fractions.
- Independent verification of an accounting period fraction.
Avoid for
- Schedule-dependent or inferred conventions.
Related skills
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.