{
  "category": "Financial functions",
  "display_name": "ODDLYIELD",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.ODDLYIELD",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 6 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 6 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "matched": 6
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L234-L237",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/odd_bond_family.rs#L664-L744"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::basis",
        "catalogue/bonds::odd_out",
        "catalogue/financial::date_1900",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/day_count_common::days_in_month",
        "ported/day_count_common::us_30_360",
        "ported/odd_bond_family::parse_basis",
        "ported/odd_bond_family::parse_frequency",
        "ported/odd_bond_family::max_excel_serial",
        "ported/odd_bond_family::parse_date_serial",
        "ported/odd_bond_family::days_in_year",
        "ported/odd_bond_family::days_in_month",
        "ported/odd_bond_family::add_months_clamped",
        "ported/odd_bond_family::days360_us",
        "ported/odd_bond_family::days360_us_both",
        "ported/odd_bond_family::days360_eu",
        "ported/odd_bond_family::day_count",
        "ported/odd_bond_family::day_count_non_negative",
        "ported/odd_bond_family::day_count_non_negative_with_us_hack",
        "ported/odd_bond_family::validate_positive_inputs",
        "ported/odd_bond_family::map_odd_bond_error_to_ws"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L234-L237",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 6 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.ODDLYIELD.json",
  "name": "ODDLYIELD",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[ODDLPRICE](FUNC.ODDLPRICE.md) prices the same last-coupon schedule at a supplied yield. [ODDFYIELD](FUNC.ODDFYIELD.md) handles an irregular first coupon; [YIELD](FUNC.YIELD.md) handles regular coupons.\n\n\n",
    "how-to-implement": "\nBuild quasi-coupon periods from last_interest, accumulate normalized issue-to-maturity, accrued and remaining fractions, and solve the final simple-discount equation for yield. The current last-yield helper uses a direct algebraic formula rather than the odd-first root solver. The worked zero-yield example isolates the coupon and accrual arithmetic from discount powers. Calendar seams, long/short-period branches and residual numerical differences remain open where the recorded reports say so. The family combines a credited Apache-licensed ExcelFinancialFunctions translation in its odd-first kernel and calendar helpers with project-owned kernels and changes guided by recorded Excel answers.\n\n\n",
    "quirks": "\nBasis defaults to zero: 0 US 30/360, 1 actual/actual, 2 actual/360, 3 actual/365, 4 European 30/360. Dates and selectors are truncated under their documented rules. Use DATE values rather than locale-dependent date text. The required date order is `last_interest < settlement < maturity`. Frequency is one, two or four. Negative coupon rate, invalid selectors and invalid amount/domain cases produce errors. These schedules cannot be reduced to PRICE by changing one date.\n\n\n",
    "sources": "\n- [Microsoft: ODDLYIELD function](https://support.microsoft.com/en-us/excel/functions/oddlyield-function), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/odd_bond_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=ODDLYIELD(DATE(2027,8,1),DATE(2027,11,1),DATE(2027,4,1),0.06,101.5,100,2,0)` gives a yield near zero. The last coupon spans April to November, seven 30/360 months. Its coupon is 3.5 and accrued interest at August settlement is two. At zero yield the clean price is `100+3.5-2=101.5`.\n\n\n",
    "version-differences": "\nNo same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.\n\n\n",
    "what-it-does": "\n`ODDLYIELD` solves annual yield from price for a security with an irregular last coupon. Its dates are settlement, maturity and last_interest. They are followed by coupon rate, price, redemption, frequency and optional basis.\n\n\n"
  },
  "signature": {
    "display": "ODDLYIELD(settlement, maturity, last_interest, rate, pr, redemption, frequency, [basis])",
    "parameters": [
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "maturity",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "last_interest",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "pr",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "redemption",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "frequency",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 8,
        "min": 7
      },
      "category": "Financial functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "None",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Yield of a security whose last period is irregular",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the yield of a security with an odd last period",
        "microsoft_url": "https://support.microsoft.com/en-us/office/oddlyield-function-c873d088-cf40-435f-8d41-c8232fee9238"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "ODDLYIELD"
        },
        {
          "locale": "bg-BG",
          "name": "ODDLYIELD"
        },
        {
          "locale": "cs-CZ",
          "name": "ODDLYIELD"
        },
        {
          "locale": "da-DK",
          "name": "ULIGE.SIDSTE.AFKAST"
        },
        {
          "locale": "de-DE",
          "name": "ODDLYIELD"
        },
        {
          "locale": "el-GR",
          "name": "ODDLYIELD"
        },
        {
          "locale": "en-AU",
          "name": "ODDLYIELD"
        },
        {
          "locale": "en-GB",
          "name": "ODDLYIELD"
        },
        {
          "locale": "en-US",
          "name": "ODDLYIELD"
        },
        {
          "locale": "es-ES",
          "name": "RENDTO.PER.IRREGULAR.2"
        },
        {
          "locale": "et-EE",
          "name": "ODDLYIELD"
        },
        {
          "locale": "fi-FI",
          "name": "PARITON.VIIM.TUOTTO"
        },
        {
          "locale": "fr-FR",
          "name": "REND.DCOUPON.IRREG*"
        },
        {
          "locale": "he-IL",
          "name": "ODDLYIELD"
        },
        {
          "locale": "hr-HR",
          "name": "ODDLYIELD"
        },
        {
          "locale": "hu-HU",
          "name": "ELTÉRŐ.UHOZAM"
        },
        {
          "locale": "id-ID",
          "name": "ODDLYIELD"
        },
        {
          "locale": "it-IT",
          "name": "ODDLYIELD"
        },
        {
          "locale": "ja-JP",
          "name": "ODDLYIELD"
        },
        {
          "locale": "ko-KR",
          "name": "ODDLYIELD"
        },
        {
          "locale": "lt-LT",
          "name": "ODDLYIELD"
        },
        {
          "locale": "lv-LV",
          "name": "ODDLYIELD"
        },
        {
          "locale": "nb-NO",
          "name": "AVVIKSP.AVKASTNING"
        },
        {
          "locale": "nl-NL",
          "name": "AFW.LT.REND"
        },
        {
          "locale": "pl-PL",
          "name": "RENT.OST.OKR"
        },
        {
          "locale": "pt-BR",
          "name": "ODDLYIELD"
        },
        {
          "locale": "pt-PT",
          "name": "LUCROÚLTINC"
        },
        {
          "locale": "ro-RO",
          "name": "ODDLYIELD"
        },
        {
          "locale": "ru-RU",
          "name": "ДОХОДПОСЛНЕРЕГ"
        },
        {
          "locale": "sk-SK",
          "name": "ODDLYIELD"
        },
        {
          "locale": "sl-SI",
          "name": "ODDLYIELD"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "ODDLYIELD"
        },
        {
          "locale": "sv-SE",
          "name": "UDDASAVKASTNING"
        },
        {
          "locale": "th-TH",
          "name": "ODDLYIELD"
        },
        {
          "locale": "tr-TR",
          "name": "TEKSÖDEME işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "ODDLYIELD"
        },
        {
          "locale": "vi-VN",
          "name": "ODDLYIELD"
        },
        {
          "locale": "zh-CN",
          "name": "ODDLYIELD"
        },
        {
          "locale": "zh-HK",
          "name": "ODDLYIELD"
        },
        {
          "locale": "zh-TW",
          "name": "ODDLYIELD"
        }
      ],
      "signature": {
        "display": "ODDLYIELD(settlement, maturity, last_interest, rate, pr, redemption, frequency, [basis])",
        "parameters": [
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "maturity",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "last_interest",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "pr",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "redemption",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "frequency",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "ODDLYIELD",
      "version_marker": null,
      "xlcall": {
        "code": "461",
        "symbol": "xlfOddlyield"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/oddlyield-function-c873d088-cf40-435f-8d41-c8232fee9238"
  },
  "try_it": {
    "formula": "=ODDLYIELD(DATE(2027,8,1),DATE(2027,11,1),DATE(2027,4,1),0.06,101.5,100,2,0)"
  },
  "url": "https://handbook.dnacalc.com/functions/ODDLYIELD.html",
  "variants": [],
  "versions": []
}