This page describes how JSON risk generates interest rate schedules, fixing schedules and repayment schedules.
Schedules are more or less regular streams of dates, typically beginning with the issue or effective date of a financial instrument and ending with its maturity.
JSON risk generates the three schedules independently from each other and merges the schedules for cash flow generation. While merging the schedules, JSON risk takes care of split interest accrual periods which arise whenever fixings or repayments occur between two dates of the interest rate schedule.
The fields below are relevant for schedule generation.
| Interest | Fixing | Repayment | |
|---|---|---|---|
| Beginning | effective_date |
||
| End | maturity |
||
| Frequency | tenor | fixing_tenor | repay_tenor |
| Explicit initial stub | first_date | fixing_first_date | repay_first_date |
| Explicit final stub | next_to_last_date | fixing_next_to_last_date | repay_next_to_last_date |
| Implicit stub and rollout direction | stub_end | fixing_stub_end | repay_stub_end |
| Implicit stub long | stub_long | fixing_stub_long | repay_stub_long |
The sections below describe interest rate schedule generation logic in different constallations. For fixing and repayment schedule generation, the same logic is used.
Per default, that is, when only effective_date, maturity and term are provided, JSON risk rolls out backward from maturity in regular monthly periods the length of which is determined by term until effective_date is reached or preceded. In the special case when term is zero, the schedule consists of effective_date and maturity only.

When stub_long is true, the generated date just after effective_date is removed from the schedule, resulting in a long initial period.

When stub_end is true, JSON risk rolls out forward from effective_date in regular monthly periods the length of which is determined by term until maturity is reached or exceded.

When stub_end is true and stub_long is true, the generated date just before maturity is removed from the schedule, resulting in a long final period.

when next_to_last_date is set, JSON risk rolls out backward from next_to_last_date in regular monthly periods the length of which is determined by term until effective_date is reached or preceded.
Like in the case without next_to_last_date set, the field stub_long determines the length of the initial period.

When first_date is set, JSON risk rolls out forward from first_date in regular monthly periods the length of which is determined by term until maturity is reached or preceded.
Like in the standard forward rollout case, that is, when stub_end is true, but first_date is unset, the field stub_long determines the length of the final period.

When both first_date and next_to_last_date are set, JSON risk rolls out backward from next_to_last_date in regular monthly periods the length of which is determined by term until first_date is reached or preceded. In this case, next_to_last_date and first_date are expected to regularly align with the monthly periods. If they do not, there will be an additional irregular period after first_date. The field stub_long determines the length of this period.

effective_date setEven if effective_date is unset, JSON risk rolls out a decent schedule for fixed income instruments in many cases. This makes sense in analyses where past payments are not of interest and works under the following conditions:
library.valuation_date must be setfirst_date must be unsetstub_end must be false or unset unless next_to_last_date is setIf any of these conditions are violated, JSON risk will throw an error. Otherwise, JSON risk first rolls out the interest rate schedule backward from maturity or next_to_last_date in regular monthly periods the length of which is determined by term until the valuation date is reached or preceded. This yields a schedule with a regular first period starting in the past or at valuation date.
In the special case where tenor is zero, the resulting schedule consists of the valuation date and maturity only.
If fixing or repayment schedules are required, these are rolled out with effective_date substituted by the first date in the interest rate schedule. Consequently, all three schedules start and end at the same dates.
JSON risk is published under the MIT License.
Library
Minified Library
App (.tar.gz)
App (.tar.bz2)
App (.zip)
This project is maintained by