Usage: |
y = BondCoupon(Z,C,D,T,r,lambda,parlambda,distr,params,Tmax,N)
|
Input: |
| Z | scalar, payment at maturity
|
| C | scalar, coupon payments (cease at the threshold time or Tmax)
|
| D | n1 x 1 vector, threshold level
|
| T | n2 x 1 vector, time to expiry
|
| r | scalar, continuously-compounded discount rate
|
| lambda | scalar, intensity function, if lambda=0, a sine function, if lambda=1, a linear function, if lambda=2, a sine square function
|
| parlambda | n x 1 vector, parameters of the intensity function lambda (n=2 for lambda=1, n=3 otherwise)
|
| distrib | string, claim size distribution
|
| params | n x 1 vector, parameters of the claim size distribution, n=1 (exponential), n=2 (gamma, lognormal, Pareto, Weibull),
n=3 (Burr, mixofexps)
|
| Tmax | scalar, time horizon
|
| N | scalar, number of trajectories
|
Output: |
| y | m x 3 matrix, the first column are times to bond's expiration,
the second threshold levels and the third corresponding prices of the bond |