You are on page 1of 16

WHITE PAPER

Oracle Treasury
Deal Calculations

Prepared by Global Financial Applications Development


Contents
1. Introduction......................................................................................................3

2. Negotiable Instruments....................................................................................4

2.1 Coupon Bonds (BOND)....................................................................................................4


2.1.1 Price given Yield: annuity-type formula (Total Price)..........................................4
2.1.2 Yield given Price (Yield Rate)...............................................................................4
2.1.3 Accrued Interest (Accrued Price)...........................................................................4
2.1.4 Revaluation – Fair Value........................................................................................5
2.1.5 Accrual – Coupon (CPMADJ)................................................................................5
2.1.6 Accrual – Discount or Premium (SLDISC, SLPREM)..........................................5
2.2 Zero Coupon Bonds (BOND)...........................................................................................6
2.2.1 Price given Yield: annuity-type formula (Total Price)..........................................6
2.2.2 Yield given Price (Yield Rate)...............................................................................6
2.2.3 Accrued Interest (Accrued Price)...........................................................................6
2.2.4 Revaluation – Fair Value........................................................................................6
2.2.5 Accrual – Discount (SLDISC)................................................................................7
2.3 Discounted Securities (NI)................................................................................................8
2.3.1 Consideration and Interest given Discount Rate....................................................8
2.3.2 Consideration and Interest given Yield Rate.........................................................8
2.3.3 Revaluation – Fair Value........................................................................................8
2.3.4 Accrual – Interest (INTADJ) – Straight-Line Method...........................................8
2.3.5 Accrual – Interest (EFFINT) – Effective Interest Method.....................................9
3. Term Money....................................................................................................10

3.1 Wholesale Term Money (TMM)....................................................................................10


3.1.1 Revaluation – Fair Value......................................................................................10
3.1.2 Accrual – Coupon (INTADJ)................................................................................10
4. Money Market Derivatives............................................................................11

4.1 Interest Rate Swap (IRS).................................................................................................11


4.1.1 Revaluation – Fair Value......................................................................................11
4.1.2 Accrual – Coupon (INTADJ)................................................................................11
5. Other Calculations.........................................................................................12

5.1 Yield Curve calculations.................................................................................................12


5.1.1 Discount Factors....................................................................................................12
5.1.2 Linear Interpolation/Extrapolation.......................................................................12
5.1.3 Exponential Interpolation/Extrapolation on Discount Factors............................13
5.1.4 Cubic Spline..........................................................................................................13
6. Definitions.......................................................................................................15

7. References.......................................................................................................16

Page 2 of 16
1. Introduction
The purpose of this document is to describe the calculations performed on financial instruments in
Oracle Treasury.

Page 3 of 16
2. Negotiable Instruments

2.1 Coupon Bonds (BOND)

2.1.1 Price given


Yield: annuity-type formula (Total Price)

The formula used is an annuity-type formula that calculates the dirty Price given the Yield
(Reference: Robert Steiner, p88.).

where:
P = dirty price of bond
n = number of payments per year
i = yield per annum based on n payments per year (Yield, or YTM Yield To Maturity)
R = the annual coupon rate paid n times per year
W = the fraction of a coupon period between purchase/sale and the next coupon payment
N = the number of coupons not yet paid

2.1.2 Yield given


Price (Yield Rate)

An approximation (bisection) algorithm is used based on the previous formula to obtain a Price
given the Yield.

The approximation makes a guess about the Yield and then calculates the Price using the “Price
given Yield” formula. That price is compared to the known price and if it is not close enough, a
new guess is made for the Yield. Again, the price is calculated using the new Yield and so on the
algorithm continues until it reaches a close enough value of price.

2.1.3 Accrued Interest


(Accrued Price)

The calculation of Accrued Interest (or Accrued Price) is based on the ISMA (International
Securities Market Association) formula:

where:
AccrualDays = number of days to be accrued i.e. number of days from previous coupon to
settlement.
CouponDays = number of days in the Coupon period.
Coupon Amount = amount of the coupon

Page 4 of 16
2.1.4 Revaluation –
Fair Value

Fair Value of a bond is calculated based on the Clean Price (Revaluation Rate) of the bond in the
revaluation batch. The Clean Price is captured from the current system rates and can be
overwritten in the revaluation batch. The Fair Value is the Capital Price (i.e. excluding accrued
interest):

Fair Value = Revaluation Rate * Face Value Balance

2.1.5 Accrual –
Coupon (CPMADJ)

Bond coupons are accrued using straight-line accrual method.

where:
Days[CpnStart:BatchEnd] = number of days from Coupon Start date to Batch End date, using
deal day count basis to count days.
Days[CpnStart:CpnEnd] = number of days from Coupon Start date to Coupon End date,
using deal day count basis to count days.
CpnAmt = Coupon Amount
AccrBal = Accrual Balance: total accrual in previous accruals

Notice that when an accrual is calculated for the first time for a coupon, the AccrualBalance for
that coupon will be zero, and the accrual calculated will cover the period from the Coupon Start
Date to the Batch End Date. This can result in an accrual amount that is larger than the accrual
amount covering the period of the accrual batch.

2.1.6 Accrual –
Discount or Premium (SLDISC, SLPREM)

When a bond is bought or issued at a premium (clean price > 100) or a discount (clean price <
100), the premium or discount is accrued over the assumed holding period (settlement date to bond
maturity date) using a straight-line accrual method.

where:
Days[Settlement:BatchEnd] = number of days from Deal Settlement to the Batch End date,
using deal day count basis to count days.
Days[Settlement:Maturity] = number of days from Deal Settlement to Deal Maturity, using
deal day count basis to count days. This reflects the assumed
holding period.
Prem_Disc = Premium or Discount Amount of the Deal
AccrBal = Accrual Balance: total accrual in previous accruals

Notice that when an accrual is calculated for the first time for a deal, the AccrualBalance will be
zero, and the accrual calculated will cover the period from the Deal Settlement Date to the Batch
End Date. This can result in an accrual amount that is larger than the accrual amount covering the
period of the accrual batch.

Page 5 of 16
2.2 Zero Coupon Bonds (BOND)

2.2.1 Price given


Yield: annuity-type formula (Total Price)

The formula used is an annuity-type formula is similar to the one used for coupon bonds. Since
there are no coupons, only the principal at maturity needs to be discounted to the present date. The
calculation of the fraction of coupon between settlement and next coupon (W) and the calculation
of the number of coupons outstanding (N) are based on quasi-coupon concept. Quasi-coupon
fequency and quasi-coupon periods are used as if a coupon would be paid on the bond.

where:
P = dirty price of bond
n = number of quasi-coupons per year
i = yield per annum based on n quasi-coupons per year (Yield, or YTM Yield To Maturity)
W = the fraction of a quasi-coupon period between settlement and the next quasi-coupon
N = the number of quasi-coupons outstanding

2.2.2 Yield given


Price (Yield Rate)

Yield can be directly calculated rewriting the formula for Price given Yield.

where:
P = dirty price of bond
n = number of quasi-coupons per year
i = yield per annum based on n quasi-coupons per year (Yield, or YTM Yield To Maturity)
W = the fraction of a quasi-coupon period between settlement and the next quasi-coupon
N = the number of quasi-coupons outstanding

2.2.3 Accrued Interest


(Accrued Price)

Since there are no coupons in a zero coupon bond, there also is no accrued interest.

2.2.4 Revaluation –
Fair Value

Fair Value of a bond is calculated based on the Clean Price (Revaluation Rate) of the bond in the
revaluation batch. The Clean Price is captured from the current system rates and can be
overwritten in the revaluation batch. Noticte that for zero coupon bonds, there is no difference
between clean price and dirty price since there is no accured interest.

Fair Value = Revaluation Rate * Face Value Balance

Page 6 of 16
2.2.5 Accrual –
Discount (SLDISC)

Notice that there is no coupon accrual (CMPADJ) for zero coupon bonds since there are no
coupons.

Zero coupon bonds are alsways issued at a discount. The discount is accrued over the assumed
holding period (settlement date to bond maturity date) using a straight-line accrual method.

where:
Days[Settlement:BatchEnd] = number of days from Deal Settlement to the Batch End date,
using deal day count basis to count days.
Days[Settlement:Maturity] = number of days from Deal Settlement to Deal Maturity, using
deal day count basis to count days. This reflects the assumed
holding period.
Discount = Discount Amount of the Deal
AccrBal = Accrual Balance: total accrual in previous accruals

Notice that when an accrual is calculated for the first time for a deal, the AccrualBalance will be
zero, and the accrual calculated will cover the period from the Deal Settlement Date to the Batch
End Date. This can result in an accrual amount that is larger than the accrual amount covering the
period of the accrual batch.

Page 7 of 16
2.3 Discounted Securities (NI)

2.3.1 Consideration
and Interest given Discount Rate

When discounted paper is quoted on a Discount basis, the following formula is used to calculate
the Consideration.

This formula can be found in Comotto’s Foreign Exchange and Money Markets, vol.2, The Money
Market, p.68:

where:
Face Value = the maturity amount
Day Count = number of days from Start Date to Maturity date (using deal Day Count
Basis)
Year Basis = number of days in year of deal Day Count Basis

Interest = Face Value – Consideration

2.3.2 Consideration
and Interest given Yield Rate

This formula can be found in Richard Comotto’s Foreign Exchange and Money Markets, vol.2, The
Money Market, p.32:

where:
Face Value = the maturity amount
Day Count = number of days from Start Date to Maturity date (using deal Day Count
Basis)
Year Basis = number of days in year of deal Day Count Basis

Interest = Face Value - Consideration

2.3.3 Revaluation –
Fair Value

Fair Value of a Discounted Security can be calculated using the same formulas as for calculating
the Consideration, by using the Revaluation Rate where in the original formula, a Yield/Discount
Rate is seen. Also the Day Count needs to be the number of days from revaluation (batch end) to
deal maturity.

2.3.4 Accrual –
Interest (INTADJ) – Straight-Line Method

The Interest (which corresponds to the Discount) is accrued over the assumed holding period (start
date to maturity date) using a straight-line accrual method.

Page 8 of 16
where:
Days[Start:BatchEnd] = number of days from Deal Start to the Batch End date, using deal day
count basis to count days.
Days [Start:Maturity] = number of days from Deal Start to Deal Maturity, using deal day
count basis to count days. This reflects the assumed holding period.
Interest = Interest Amount (Discount) of the Deal
Accr Bal = Accrual Balance: total accrual in previous accruals

Notice that when an accrual is calculated for the first time for a deal, the Accrual Balance will be
zero, and the accrual calculated will cover the period from the Deal Start Date to the Batch End
Date. This can result in an accrual amount that is larger than the accrual amount covering the
period of the accrual batch.

2.3.5 Accrual –
Interest (EFFINT) – Effective Interest Method

where:
DealYield = Yield of the deal, eventually – if deal rate is discount rate – the
equivalent yield rate.
Days[BatchEnd:Maturity] = number of days from the Batch End date to Deal Maturity, using
deal day count basis to count days.
Year Basis = number of days in year of deal Day Count Basis
AccrBal = Accrual Balance: total accrual in previous accruals
Consideration = Consideration of deal

Notice that when an accrual is calculated for the first time for a deal, the AccrualBalance will be
zero, and the accrual calculated will cover the period from the Deal Settlement Date to the Batch
End Date. This can result in an accrual amount that is larger than the accrual amount covering the
period of the accrual batch.

Page 9 of 16
3. Term Money

3.1 Wholesale Term Money (TMM)

Wholesale Term Money Deals can be based on a fixed interest rate or a floating interest rate or
mixed starting with a fixed interest and switching to floating interest during the life of the deal.
The interest amount of a coupon period can be settled on the maturity date of that coupon, in which
case there is a cash flow on that date. The interest amount can also be accumulated and settled
later: there is no interest on Accumulated interest.

Principal of the Deal can be increased or decreased during the life of the deal on coupon dates.

Each coupon as well as the final redemption is stored in Transactions.

3.1.1 Revaluation –
Fair Value

Fair Value of a TMM is calculated by summing up the present values of all the future cash flows
and subtracting accrued interest of the current coupon. For each coupon, a Discount Factor is
derived from the Yield Curve, which is used to calculate the Present Value of that coupon.

where:
CFk = the kth cashflow
DFk = the Discount Factor for Ck
for DF calculation see chapter on “Yield Curve calculations”
Accrued = the accrued interest from the current coupon start date to the revaluation date
(batch end), see Bond Accrued Interest formula.

3.1.2 Accrual –
Coupon (INTADJ)

TMM coupons are accrued using straight-line accrual method.

where:
Days[CpnStart:BatchEnd] = number of days from Coupon Start date to Batch End date, using
deal day count basis to count days.
Days[CpnStart:CpnEnd] = number of days from Coupon Start date to Coupon End or
Maturity date, using deal day count basis to count days.
CpnAmt = Coupon Amount: Gross Interest
AccrBal = Accrual Balance: total accrual in previous accruals

Notice that when an accrual is calculated for the first time for a coupon, the AccrualBalance for
that coupon will be zero, and the accrual calculated will cover the period from the Coupon Start
Date to the Batch End Date. This can result in an accrual amount that is larger than the accrual
amount covering the period of the accrual batch.

Page 10 of 16
4. Money Market Derivatives

4.1 Interest Rate Swap (IRS)

In Oracle Treasury, Interest Rate Swaps are represented as two separate deals that are linked under
a Swap reference. Each Swap Leg is represented by a deal that will be found in the revaluations
and accruals. The calculations performed for the swap legs are the same as performed for TMM
deals.

4.1.1 Revaluation –
Fair Value

Fair Value of a Swap Leg is calculated by summing up the present values of all the future cash
flows and subtracting accrued interest of the current coupon. For each coupon, a Discount Factor
is derived from the Yield Curve, which is used to calculate the Present Value of that coupon.

where:
CFk = the kth cashflow
DFk = the Discount Factor for Ck
for DF calculation see chapter on “Yield Curve calculations”
Accrued = the accrued interest from the current coupon start date to the revaluation date
(batch end date), see Bond Accrued Interest formula.

4.1.2 Accrual –
Coupon (INTADJ)

Coupons of a Swap Leg are accrued using straight-line accrual method.

where:
Days[CpnStart:BatchEnd] = number of days from Coupon Start date to Batch End date, using
deal day count basis to count days.
Days[CpnStart:CpnEnd] = number of days from Coupon Start date to Coupon End or
Maturity date, using deal day count basis to count days.
CpnAmt = Coupon Amount: Gross Interest
AccrBal = Accrual Balance: total accrual in previous accruals

Notice that when an accrual is calculated for the first time for a coupon, the AccrualBalance for
that coupon will be zero, and the accrual calculated will cover the period from the Coupon Start
Date to the Batch End Date. This can result in an accrual amount that is larger than the accrual
amount covering the period of the accrual batch.

Page 11 of 16
5. Other Calculations

5.1 Yield Curve calculations

Sources for formulas:

 Lawrence Galitz: Financial Engineering, Financial Times/ Pitman Publishing


Chapter 9.8: Swaps - Discount Factors and the Discount Function

 Satyajit Das: Risk Management and Financial Derivatives, Irwin/McGraw Hill


Chapter 3: Interest Rate and Yield Curve Modelling

5.1.1 Discount Factors

From the market rates of the yield curve, we determine discount factors that can be used to present
value future amounts.

We assume that the rates for less than or equal to one year are simple interest rates and the
following formula can be used to calculate the Discount Factor:

Where
DF = Discount factor for time t1 at rate R t1
Rt1 = interest rate for time t1
t = number of days (or t1 - t0) according to day count basis of R t1
N = Number of days in a year according to day count basis of R t1

Rates for longer periods are supposed to be Zero-coupon rates quoted on an annualized basis and
the following equation is used:

5.1.2 Linear
Interpolation/Extrapolation

Linear interpolation uses a straight line between two grid points 1 of a yield curve in order to
estimate a rate between these two points.

If we need a rate for a date between 2 grid points, we can calculate that rate using linear
interpolation on the rates:

Where
RT = the interpolated rate for time T
T = broken date: number of days from t0
t1 = number of days from t0 to closest rate before broken date
1
Note that the two rates should be quoted on the same day count convention. Where necessary, the system will perform
the rate conversion.
Page 12 of 16
r1 = rate for t1
t2 = number of days from t0 to closest rate after broken date
r2 = rate for t2
If T is before the first rate on the curve, use this first rate.

If T is after the last rate of the curve, use the last rate.

5.1.3 Exponential
Interpolation/Extrapolation on Discount Factors

Given any two known points DF1 and DF2 on the discount function, an intermediate point DF can be
interpolated using the following equation:

Where
DFT = the interpolated discount factor for time T
T = broken date: number of days from t0
t1 = number of days from t0 to closest rate before broken date
DF1 = discount factor for t1
t2 = number of days from t0 to closest rate after broken date
DF2 = discount factor for t2
When extrapolating before the first known discount factor or beyond the last known discount factor,
the following equation is used:

Where
tn = number of days from t0 to first/last rate of curve
DFn = discount factor for tn

5.1.4 Cubic Spline

Cubic spline is a curve fitting model which uses polynomial functions to model a yield curve. A
cubic spline is a series of third degree polynomials that have the form:

These polynomials are used to connect the grid points of the curve producing a curve that does not
oscillate a lot and is smooth (see figure below).

Page 13 of 16
Figure 1 Cubic Spline vs. Linear Interpolation

We do not produce any formulas or algorithms here The description of the model and algorithms
can be found in :

 Satyajit Das: Risk Management and Financial Derivatives, Irwin/McGraw Hill


Chapter 3: Interest Rate and Yield Curve Modelling

 Bernt Arne Odegaard: Financial Numerical Recipes


Chapter 15.3.3: Term Structure algorithms - Cubic Spline

 Press, Teukolsky, Vetterling, Flannery: Numerical Recipes in C, Cambridge University Press


Chapter 3.3: Cubic Spline Interpolation

Some choices worth mentioning in this document were made when implementing the cubic spline:

 There are two methods available for cubic spline interpolation at the short and long end of the
curve. The first method sets the first derivative to zero (assuming a flat curve), and the second
method sets the second derivative to zero (assuming a straight curve). For the purposes of
market data, we have decided to use the first method with the first derivative set to zero.

 In cubic spline interpolation, it is possible to interpolate a negative value even if the input rates
are all positive. In this case, the system will then switch to linear interpolation. No error or
warning messages will be issued.

It is also possible to arrive at an unsolvable matrix for cubic spline interpolation In this case, as in
the above scenario, the system will switch to linear interpolation. No error or warning messages
will be issued.

Page 14 of 16
6. Definitions
Accrual
The process whereby revenue and expenses are recorded in the period in which they are earned or
incurred regardless of whether cash is received or disbursed in that period. This is the accounting
basis that generally is required to be used in order to conform to generally accepted accounting
principles (GAAP) in preparing financial statements for external users.

Accrual: Accretion of Discount


Accrual process for a discount received. This recognizes that as you get closer to the maturity date
of the deal, you have “earned” a portion of the discount between original cost and face value even
if you have not “received” the actual payment in the form of cash settlement.

Accrual: Amortization of Premium


Accrual process for a premium paid. This recognizes that as you get closer to the maturity date of
the deal, you have “expensed” a portion of the premium between face value and original cost even
if you “paid” the entire premium in the form of cash settlement at the time you entered the deal.

Note: The terms Amortization and Accretion are somewhat interchangeable in practice.
Amortization tends to be the more generic that is used frequently to describe accruals of both
premiums and discounts.

Discount
The difference between the Face Value and Consideration paid when the Consideration is less than
the Face Value. This is always the case with a Discounted Securities or Zero Coupon Bond deal
since this discount is essentially the interest that you earn by holding the investment.

Effective Interest Method (a.k.a. Constant Yield Method)


Accrual method where the premium or discount is recognized such that the implied interest rate
during each accounting period stays constant. In simplistic terms, the implied interest rate is the
recognized revenue or expense divided by the carrying cost and adjusted for the time period. Each
period’s accrual adjusts the carrying cost – increasing or decreasing in the case of discounts or
premiums, respectively. The period accrual amounts must likewise increase or decrease in order to
maintain a constant implied interest rate.

Premium
The difference between the Face Value and Consideration paid when the Consideration is greater
than the Face Value. Premiums apply to Bond deals.

In the case of a bond, you would be willing to pay a premium when the stated coupon rate was
greater than the prevailing interest rates in the market for instruments of similar characteristics.

Straight Line Method


Accrual method where the premium or discount is recognized evenly over the term of the total
premium. Take the following example: You purchase a 3 month discounted security and you
received a discount of $300. If you have monthly accounting, then you would accrue $100 each
month. If you perform accounting twice a month, then you would accrue $50 each accounting
period.

Page 15 of 16
7. References

Robert Steiner: Mastering Financial Calculations, Financial Times/Prentice Hall, market editions,
1998

Lawrence Galitz: Financial Engineering, Financial Times/ Pitman Publishing


Chapter 9.8: Swaps - Discount Factors and the Discount Function

Satyajit Das: Risk Management and Financial Derivatives, Irwin/McGraw Hill


Chapter 3: Interest Rate and Yield Curve Modelling

Richard Comotto: Foreign Exchange and Money Markets, vol.2, The Money Market, p.68

Page 16 of 16

You might also like