Learn R Programming

fExpressCertificates (version 1.3)

getRedemptionTime: Redemption times

Description

Return redemption index

Usage

getRedemptionTime(S, n, X)
getRedemptionTimesForMatrix(S, n, X)

Arguments

S

A (n x 1) vector of prices at valuation dates or a (N x n) matrix.

n

number of valuation dates; integer value.

X

A vector of call levels (length (n - 1)).

Value

getRedemptionTime returns a scalar; getRedemptionTimesForMatrix returns a \(N \times 1\) vector.

Details

For a price vector of \(n\) prices at valuation dates \((S(t_1),\ldots,S(t_n))'\), determine the first redemption index \(i\) such as \(S(t_i) \ge X(t_i), \forall_{j < i} S(t_j) \le X(t_j)\) (\(i=1,\ldots,(n-1)\) or \(i=n\) if \(S(t_1) \le X(t_1), \ldots, S(t_{n-1}) \le X(t_{n-1})\))

See Also

calcRedemptionProbabilities and simRedemptionProbabilities

Examples

Run this code
# NOT RUN {
 S <- c(90, 95, 110, 120)
 X <- c(100, 100, 100)
 getRedemptionTime(S, n=4, X)
 # 3
# }

Run the code above in your browser using DataLab