Learn R Programming

xVA (version 0.8)

IRSwap-class: IR Swap Class

Description

Creates an IR Swap Object with the relevant info needed to calculate the Exposure-at-Default (EAD)

Arguments

Notional
The notional amount of the trade
MTM
The mark-to-market valuation of the trade
Currency
The currency set that the trade belongs to
Si
The number of years that the trade will take to start (zero if already started)
Ei
The number of years that the trade will expire
BuySell
Takes the values of either 'Buy' or 'Sell'
swap_rate
The rate of the fixed leg of the swap

Value

An object of type IRSwap

Examples

Run this code
# the IR Swap trade given in the Basel regulation IR example
tr1 = IRSwap(Notional=10000,MtM=30,Currency="USD",Si=0,Ei=10,BuySell='Buy')

Run the code above in your browser using DataLab