{
  "category": "Financial functions",
  "display_name": "ODDFYIELD",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.ODDFYIELD",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Of 92 recorded answers (92 workbook cells), 44 do not match: 30 differ by more than 16 ULP, 14 differ in kind or value.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 44 of 92 recorded answers",
    "workbook_corpus": {
      "cells": 92,
      "larger_numeric": 30,
      "matched": 48,
      "other_mismatch": 14
    }
  },
  "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#L223-L229",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/odd_bond_family.rs#L586-L636",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/odd_bond_family.rs#L638-L662"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::basis",
        "catalogue/bonds::yield_date",
        "catalogue/bonds::odd_out",
        "catalogue/financial::required_number",
        "catalogue/financial::required_num",
        "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::days360_us",
        "ported/odd_bond_family::days360_eu",
        "ported/odd_bond_family::day_count",
        "ported/odd_bond_family::day_count_non_negative",
        "ported/odd_bond_family::ymd",
        "ported/odd_bond_family::last_day_of_month",
        "ported/odd_bond_family::change_month",
        "ported/odd_bond_family::find_pcd_ncd",
        "ported/odd_bond_family::find_coupon_dates",
        "ported/odd_bond_family::previous_coupon_date",
        "ported/odd_bond_family::next_coupon_date",
        "ported/odd_bond_family::number_of_coupons",
        "ported/odd_bond_family::coup_days",
        "ported/odd_bond_family::whole_coupon_count",
        "ported/odd_bond_family::aggr_indices",
        "ported/odd_bond_family::validate_positive_inputs",
        "ported/odd_bond_family::excel_bond_pow",
        "ported/odd_bond_family::oddfprice_kernel",
        "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#L223-L229",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 44 of 92 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.ODDFYIELD.json",
  "name": "ODDFYIELD",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[ODDFPRICE](FUNC.ODDFPRICE.md) prices the same first-coupon schedule at a supplied yield. [ODDLYIELD](FUNC.ODDLYIELD.md) handles an irregular final coupon; [YIELD](FUNC.YIELD.md) handles regular coupons.\n\n\n",
    "how-to-implement": "\nBuild the odd-first pricing function over a quasi-coupon calendar, then bracket a yield that reprices the target clean price. The current helper uses bisection, while Microsoft’s page describes a Newton method. Their stopping and boundary results are separate compatibility questions. 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 `issue < settlement < first_coupon < 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: ODDFYIELD function](https://support.microsoft.com/en-us/excel/functions/oddfyield-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`=ODDFYIELD(DATE(2027,2,1),DATE(2027,10,1),DATE(2027,1,1),DATE(2027,4,1),0.06,104,100,2,0)` gives a yield near zero. The first coupon spans January to April, a short half-year coupon. Under 30/360 its payment is 1.5; the regular maturity coupon is three; accrued interest at February settlement is 0.5. At zero yield the clean price is `100+1.5+3-0.5=104`.\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`ODDFYIELD` solves annual yield from price for a security with an irregular first coupon. Its dates are settlement, maturity, issue and first_coupon. They are followed by coupon rate, price, redemption, frequency and optional basis.\n\n\n"
  },
  "signature": {
    "display": "ODDFYIELD(settlement, maturity, issue, first_coupon, 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": "issue",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "first_coupon",
        "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": 9,
        "min": 8
      },
      "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 first period is irregular",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the yield of a security with an odd first period",
        "microsoft_url": "https://support.microsoft.com/en-us/office/oddfyield-function-66bc8b7b-6501-4c93-9ce3-2fd16220fe37"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "ODDFYIELD"
        },
        {
          "locale": "bg-BG",
          "name": "ODDFYIELD"
        },
        {
          "locale": "cs-CZ",
          "name": "ODDFYIELD"
        },
        {
          "locale": "da-DK",
          "name": "ULIGE.FØRSTE.AFKAST"
        },
        {
          "locale": "de-DE",
          "name": "ODDFYIELD"
        },
        {
          "locale": "el-GR",
          "name": "ODDFYIELD"
        },
        {
          "locale": "en-AU",
          "name": "ODDFYIELD"
        },
        {
          "locale": "en-GB",
          "name": "ODDFYIELD"
        },
        {
          "locale": "en-US",
          "name": "ODDFYIELD"
        },
        {
          "locale": "es-ES",
          "name": "RENDTO.PER.IRREGULAR.1"
        },
        {
          "locale": "et-EE",
          "name": "ODDFYIELD"
        },
        {
          "locale": "fi-FI",
          "name": "PARITON.ENS.TUOTTO"
        },
        {
          "locale": "fr-FR",
          "name": "REND.PCOUPON.IRREG*"
        },
        {
          "locale": "he-IL",
          "name": "ODDFYIELD"
        },
        {
          "locale": "hr-HR",
          "name": "ODDFYIELD"
        },
        {
          "locale": "hu-HU",
          "name": "ELTÉRŐ.EHOZAM"
        },
        {
          "locale": "id-ID",
          "name": "ODDFYIELD"
        },
        {
          "locale": "it-IT",
          "name": "ODDFYIELD"
        },
        {
          "locale": "ja-JP",
          "name": "ODDFYIELD"
        },
        {
          "locale": "ko-KR",
          "name": "ODDFYIELD"
        },
        {
          "locale": "lt-LT",
          "name": "ODDFYIELD"
        },
        {
          "locale": "lv-LV",
          "name": "ODDFYIELD"
        },
        {
          "locale": "nb-NO",
          "name": "AVVIKFP.AVKASTNING"
        },
        {
          "locale": "nl-NL",
          "name": "AFW.ET.REND"
        },
        {
          "locale": "pl-PL",
          "name": "RENT.PIERW.OKR"
        },
        {
          "locale": "pt-BR",
          "name": "ODDFYIELD"
        },
        {
          "locale": "pt-PT",
          "name": "LUCROPRIMINC"
        },
        {
          "locale": "ro-RO",
          "name": "ODDFYIELD"
        },
        {
          "locale": "ru-RU",
          "name": "ДОХОДПЕРВНЕРЕГ"
        },
        {
          "locale": "sk-SK",
          "name": "ODDFYIELD"
        },
        {
          "locale": "sl-SI",
          "name": "ODDFYIELD"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "ODDFYIELD"
        },
        {
          "locale": "sv-SE",
          "name": "UDDAFAVKASTNING"
        },
        {
          "locale": "th-TH",
          "name": "ODDFYIELD"
        },
        {
          "locale": "tr-TR",
          "name": "TEKYÖDEME işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "ODDFYIELD"
        },
        {
          "locale": "vi-VN",
          "name": "ODDFYIELD"
        },
        {
          "locale": "zh-CN",
          "name": "ODDFYIELD"
        },
        {
          "locale": "zh-HK",
          "name": "ODDFYIELD"
        },
        {
          "locale": "zh-TW",
          "name": "ODDFYIELD"
        }
      ],
      "signature": {
        "display": "ODDFYIELD(settlement, maturity, issue, first_coupon, 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": "issue",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "first_coupon",
            "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": "ODDFYIELD",
      "version_marker": null,
      "xlcall": {
        "code": "463",
        "symbol": "xlfOddfyield"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/oddfyield-function-66bc8b7b-6501-4c93-9ce3-2fd16220fe37"
  },
  "try_it": {
    "formula": "=ODDFYIELD(DATE(2027,2,1),DATE(2027,10,1),DATE(2027,1,1),DATE(2027,4,1),0.06,104,100,2,0)"
  },
  "url": "https://handbook.dnacalc.com/functions/ODDFYIELD.html",
  "variants": [],
  "versions": []
}