accrued | R Documentation |
Derive the accrued interest of a contract per specific time(s)
accrued(object, by, model, ...) ## S4 method for signature 'ContractType,timeDate,missing' accrued(object, by, model) ## S4 method for signature 'ContractType,character,missing' accrued(object, by, model) ## S4 method for signature 'ContractType,timeDate,RiskFactorConnector' accrued(object, by, model) ## S4 method for signature 'ContractType,character,RiskFactorConnector' accrued(object, by, model)
object |
object The |
by |
time as per which to compute accrued interest (can be a vector) |
model |
(optional) The |
A numeric
object representing the accrued interest per time
ContractType, EventSeries, RiskFactorConnector
# define contract pam = Pam(what=list( ContractID = "001", Currency = "USD", ContractDealDate = "2012-12-31T00", InitialExchangeDate = "2013-01-01T00", MaturityDate = "2017-12-31T00", StatusDate = "2012-12-31T00", NotionalPrincipal = 1000, NominalInterestRate = 0.04, CycleOfInterestPayment = "1Y-", ContractRole = "RPA", DayCountConvention = "30E/360" )) # time-vector by=timeSequence(from=substring(get(pam, "InitialExchangeDate"), 1, 10), to=substring(get(pam,"MaturityDate"), 1, 10), by="1 months") # compute accrued interest for time-vector accrued(pam, by)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.