income | R Documentation |
ContractType
Income of a contract is computed over a (number of) specific time
interval(s) defined by argument by
. Within such a time interval,
income is composed of two components: (1) nominal income as the
net payments from interest and fees, and (2) income from re-valuation
of the contract at beginning and end of the time interval. If at the
begining of the time interval the contract's 'mark-to-model" value is
higher than at the end a re-valuation gain results and vice versa.
Thereby, the valuation model may be defined for each contract prior
to calling this function or specified using the function parameter
'method'.
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeDate,missing,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeBuckets,missing,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeDate,character,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeBuckets,character,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeDate,missing,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeBuckets,missing,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeDate,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'ContractType,timeBuckets,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'ContractType,timeDate,missing,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'ContractType,timeBuckets,missing,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'ContractType,timeDate,character,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'ContractType,timeBuckets,character,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Portfolio,timeDate,missing,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Portfolio,timeBuckets,missing,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Portfolio,timeDate,missing,missing,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'Portfolio,timeBuckets,missing,missing,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Portfolio,timeDate,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Portfolio,timeBuckets,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'Portfolio,timeDate,character,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'Portfolio,timeBuckets,character,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeDate,missing,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeBuckets,missing,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeDate,character,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeBuckets,character,missing,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeDate,missing,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeBuckets,missing,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeDate,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'EventSeries,timeBuckets,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'EventSeries,timeDate,missing,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'EventSeries,timeBuckets,missing,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'EventSeries,timeDate,character,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature
## 'EventSeries,timeBuckets,character,logical,ValuationEngine'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'eventList,timeDate,missing,ANY,ANY'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'eventList,timeDate,character,ANY,ANY'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'eventList,timeDate,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'data.frame,timeDate,character,ANY,ANY'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'data.frame,timeDate,character,logical,missing'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Node,timeBuckets,ANY,ANY,ANY'
income(object, by, type, revaluation.gains, method, scale = 1, digits = 2)
## S4 method for signature 'Operations,timeDate,missing,ANY,ANY'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Operations,timeBuckets,missing,ANY,ANY'
income(object, by, type, revaluation.gains, method, ...)
## S4 method for signature 'Operations,timeBuckets,character,ANY,ANY'
income(object, by, type, revaluation.gains, method, ...)
object |
The |
by |
A sequence of 'timeDate's providing the target time-axis for the income-vector |
type |
A character representing the type of income (either 'marginal' or 'cumulative') |
method |
A 'ValuationEngine' (or list thereof) giving the valuation methods used when computing the re-valuation gains as part of income |
... |
(optional) Use parameter 'revaluation.gains=FALSE' in order to return income solely from interest/fee payments |
Different income-concepts can be derived for a financial instrument or the resulting EventSeries, respectively. Currentently, these are Marginal income and Cumulative income.
Marginal income-vector represents the aggregate income from interest and fee payments within a set of user-defined time-intervals. The time-intervals are defined as a sequence of timeDate-dates. Thereby, the marginal income-vector gives the net interest+fee cash flows within the specified time-intervals.
Cumulative income-vector is the cumulative sum over time (-intervals) of the marginal income-vector.
A numeric
object representing the income-vector on the target time-axis
ContractType
and EventSeries
pam <- Pam()
set(pam, what=list(
ContractID = "001",
Currency = "CHF",
Calendar = "Weekday",
ContractRole = "RPA",
StatusDate = "2016-05-30T00",
ContractDealDate = "2016-05-30T00",
InitialExchangeDate = "2016-05-30T00",
MaturityDate = "2020-06-01T00",
NotionalPrincipal = 1000,
NominalInterestRate = 0.05,
CycleOfInterestPayment = "1Y-",
PremiumDiscountAtIED = 0.0,
DayCountConvention = "30E/360",
BusinessDayConvention = "SCF"))
ad <- "2016-06-01T00"
# generate event series
evs=events(pam, ad)
# define target income time axis
by=timeSequence(substring(ad, 1, 10), "2020-06-01", by="1 year")
# derive marginal income from interest and fee payments for defined time axis
income(pam, by, "marginal", revaluation.gains=FALSE)
# derive cumulative income
income(pam, by, "cumulative", revaluation.gains=FALSE)
# now include revaluation gains
# therefore, define market environment and valuation method
yc=YieldCurve()
set(yc, what=list(Nodes=list(ReferenceDate=ad,
Tenors=c("1M", "10Y"),
Rates=c(0.005, 0.02)),
MarketObjectCode = "RiskFreeCurve"))
rf=RFConn()
add(rf, yc)
dcEngine <- DcEngine()
set(dcEngine, list(RiskFactorObjectLink="RiskFreeCurve",
dc.spread=0.0))
set(dcEngine, rf)
# now compute income with revaluation gains for defined time axis
income(pam, by, "marginal", dcEngine, revaluation.gains=TRUE)
income(pam, by, "cumulative", dcEngine, revaluation.gains=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.