{"id":"bond-cashflow-schedule","version":"1.0.0","description":"Coupon dates, coupons remaining, accrued days and accrued interest for a regular fixed-coupon bond (Excel COUP* rules).","supported_operations":["bond coupon dates schedule","accrued interest on a bond","previous and next coupon date","number of coupons remaining until maturity","days since last coupon payment","bond accrued days 30/360 or actual/actual","coupon payment amount per period","list bond coupon payments from settlement to maturity","ריבית צוברת ולוח קופונים של אגרת חוב"],"unsupported_operations":["bond price or yield (use bond-price-from-yield or bond-yield-from-price)","odd first or last coupon periods and issue-date accrual (Excel ACCRINT with issue date)","business-day or holiday adjustment of coupon dates","floating-rate, inflation-linked, callable or putable bonds"],"semantics":["Dates are strict ISO YYYY-MM-DD real calendar dates in years 1900 to 2200; settlement must be strictly before maturity. frequency is the JSON integer 1, 2, 4 or 12 (coupon step 12/frequency months). basis is 30-360-us (Excel 0), act-act (1), act-360 (2), act-365f (3) or 30e-360 (4); default 30-360-us.","Coupon dates D(j) are maturity shifted back j*step months for j = 0, 1, 2, ..., each computed from maturity (never chained). When maturity is the last day of its month every D(j) is a month end; otherwise the day is maturity's day clamped to the month length (30 August gives 29 or 28 February and 30 August again).","previous_coupon_date is D(j) for the smallest j >= 1 with D(j) <= settlement (a settlement on a coupon date makes it the previous date with accrued_days 0); next_coupon_date is D(j-1); coupons_remaining N = j (Excel COUPNUM). N above 1200 is limit_exceeded, computed by month arithmetic before any schedule is built.","accrued_days A (COUPDAYBS), days_to_next_coupon DSC (COUPDAYSNC) and period_days E (COUPDAYS): 30-360-us and 30e-360: A is the 30/360 day count (US with SIA February rules, or European) from the previous coupon date to settlement, E = 360/frequency, DSC = E - A. act-act: actual days for A and DSC, E = actual days between the coupon dates. act-360 and act-365f: actual days for A and DSC, E = 360/frequency or 365/frequency (exact). DSC can be negative and A can exceed E, as in Excel; nothing is clamped.","coupon_amount = face*coupon_rate/frequency and accrued_interest = face*coupon_rate/frequency*A/E, each rounded once from the exact value to scale; period_days is E rounded to exactly 6 fractional digits with rounding. coupons lists every coupon date d with settlement < d <= maturity in ascending order, each with coupon_amount; the redemption of face is not included.","face is a decimal string with 0 < face <= 1e15 (default \"100\"); coupon_rate is a decimal fraction from 0 to 1 (\"0.05\" is 5 percent). scale is an integer 0 to 12 (default 6); rounding is half-up (default, half away from zero), half-even, half-down, up, down, ceiling or floor. Outputs never contain -0.","Any string input over 64 UTF-8 bytes is limit_exceeded, checked before parsing; a lone surrogate is invalid_input. Exact BigInt arithmetic only.","Disclaimer: arithmetic calculation only; not financial, tax, legal, or investment advice."],"limits":{"max_string_bytes":64,"max_coupons":1200},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["settlement","maturity","coupon_rate","frequency"],"properties":{"settlement":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","maxLength":10},"maturity":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","maxLength":10},"coupon_rate":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})(\\.[0-9]{1,20})?$","maxLength":64},"frequency":{"type":"integer","enum":[1,2,4,12]},"basis":{"type":"string","enum":["30-360-us","act-act","act-360","act-365f","30e-360"]},"face":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})(\\.[0-9]{1,20})?$","maxLength":64},"scale":{"type":"integer","minimum":0,"maximum":12},"rounding":{"type":"string","enum":["half-up","half-even","half-down","up","down","ceiling","floor"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["previous_coupon_date","next_coupon_date","coupons_remaining","accrued_days","days_to_next_coupon","period_days","accrued_interest","coupon_amount","coupons"],"properties":{"previous_coupon_date":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"next_coupon_date":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"coupons_remaining":{"type":"integer","minimum":1,"maximum":1200},"accrued_days":{"type":"integer","minimum":0},"days_to_next_coupon":{"type":"integer"},"period_days":{"type":"string","pattern":"^(0|[1-9][0-9]*)\\.[0-9]{6}$"},"accrued_interest":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"coupon_amount":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"coupons":{"type":"array","minItems":1,"maxItems":1200,"items":{"type":"object","additionalProperties":false,"required":["date","amount"],"properties":{"date":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"amount":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"}}}}}},"examples":[{"input":{"settlement":"2011-01-25","maturity":"2011-11-15","coupon_rate":"0.05","frequency":2,"basis":"act-act"},"output":{"previous_coupon_date":"2010-11-15","next_coupon_date":"2011-05-15","coupons_remaining":2,"accrued_days":71,"days_to_next_coupon":110,"period_days":"181.000000","accrued_interest":"0.980663","coupon_amount":"2.500000","coupons":[{"date":"2011-05-15","amount":"2.500000"},{"date":"2011-11-15","amount":"2.500000"}]}},{"input":{"settlement":"2020-05-16","maturity":"2022-11-15","coupon_rate":"0.06","frequency":2,"face":"1000","scale":2},"output":{"previous_coupon_date":"2020-05-15","next_coupon_date":"2020-11-15","coupons_remaining":5,"accrued_days":1,"days_to_next_coupon":179,"period_days":"180.000000","accrued_interest":"0.17","coupon_amount":"30.00","coupons":[{"date":"2020-11-15","amount":"30.00"},{"date":"2021-05-15","amount":"30.00"},{"date":"2021-11-15","amount":"30.00"},{"date":"2022-05-15","amount":"30.00"},{"date":"2022-11-15","amount":"30.00"}]}},{"input":{"settlement":"2022-08-01","maturity":"2022-11-15","coupon_rate":"0.06","frequency":4,"basis":"act-365f"},"output":{"previous_coupon_date":"2022-05-15","next_coupon_date":"2022-08-15","coupons_remaining":2,"accrued_days":78,"days_to_next_coupon":14,"period_days":"91.250000","accrued_interest":"1.282192","coupon_amount":"1.500000","coupons":[{"date":"2022-08-15","amount":"1.500000"},{"date":"2022-11-15","amount":"1.500000"}]}}],"execute_url":"/v1/tools/bond-cashflow-schedule/versions/1.0.0/execute"}