Tbill yield convert

tbill-yield-convert · version 1.0.0 · Financial calculations · free, no key needed

Convert a Treasury bill price, discount rate, investment rate or money-market yield into all four (31 CFR 356 App. B).

Use when you need to: treasury bill discount rate to yield · T-bill price from discount rate · bond equivalent yield of a treasury bill.

Decide before calling

Read the versioned contract and the supported scope below. Reuse tbill-yield-convert@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use tbill-yield-convert@1.0.0 for treasury bill discount rate to yield. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "settlement": "2008-03-31",
  "maturity": "2008-06-01",
  "discount_rate": "0.09",
  "scale": 2,
  "rate_scale": 6
}

Response:

{
  "result": {
    "price": "98.45",
    "discount_rate": "0.090000",
    "investment_rate": "0.092687",
    "money_market_yield": "0.091417",
    "days_to_maturity": 62,
    "year_basis": 365,
    "investment_formula": "simple"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "tbill-yield-convert",
  "version": "1.0.0",
  "input": {
    "settlement": "2008-03-31",
    "maturity": "2008-06-01",
    "discount_rate": "0.09",
    "scale": 2,
    "rate_scale": 6
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/tbill-yield-convert/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"settlement":"2008-03-31","maturity":"2008-06-01","discount_rate":"0.09","scale":2,"rate_scale":6}'

The machine-readable contract is at /v1/tools/tbill-yield-convert/versions/1.0.0.

CLI

node cli.mjs run tbill-yield-convert 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.