SigmaField

Practice Fixed income

Convert quoted rates for a treasury desk

Easy+10 pointsAbout 15 minutesFixed income

The brief

A company treasurer has cash to place for one year. Five banks have sent offers, each quoted in its own convention: once a year, twice a year, quarterly, monthly and continuously.

Headline rates cannot be compared across conventions. The treasurer needs every offer on one footing before choosing.

Your task

  1. Write effective_annual(rate, per_year): the effective annual rate of a quoted rate. per_year is the number of compounding periods in a year, and None means continuous compounding.
  2. Write continuous_equivalent(rate, per_year): the continuously compounded rate with the same growth over a year. Risk systems store rates in this form.
  3. Write rank_offers(offers): the offer names, best first.

The data

OFFERS in the code lists the five offers, each with a name, a quoted rate and its convention.

Hint: Where to start

Growth over one year is (1+rm)m\left(1 + \tfrac{r}{m}\right)^{m} with mm periods, and ere^{r} when compounding is continuous. Lesson 1.4.6 works through both.

Hint: Going the other way

To find the continuous rate cc, set ece^{c} equal to the growth of the quoted rate and take logs of both sides.