Class FeynmanKacEx4
Evaluates the price of a convertible bond.
This example evaluates the price of a convertible bond. Here, convertibility means that the bond may, at any time of the bond holder's choosing, be converted to a multiple of the specified asset. Thus a convertible bond with price \(x\) returns an amount \(K\) at time \(T\) \(unless\) the owner has converted the bond to \(\nu x,\, \nu \ge 1\) units of the asset at some time prior to \(T\). This definition, the differential equation and boundary conditions are given in Chapter 18 of Wilmott et al. (1996). Using a constant interest rate and volatility factor, the parameters and boundary conditions are:
- Bond face value \(K = {1}\) , conversion factor \( \nu = 1.125\)
- Volatility \( \sigma = {0.25}\)
- Times until expiration = {1/2, 1}
- Interest rate \(r\) = 0.1, dividend \(D\) = 0.02
- \(x_{\min} = 0,\, x_{\max} = 4\)
- \(nx = 61,\, n = 3 \times nx = 183\)
- Boundary conditions \(f(0,t) = K \exp(r-(T-t)),\, f(x_{\max},t)=\nu x_{\max}\)
- Terminal data \(f(x,T)=\max(K,\nu x)\)
- Constraint for bond holder \(f(x,t) \ge \nu x \)
Note that the error tolerance is set to a pure absolute error of value
\(10^{-3}\). The free boundary constraint \(f(x,t) \ge \nu x\) is achieved by
use of a non-linear forcing term in interface ForcingTerm. The
coefficient values of the Hermite quintic spline representing the approximate
solution of the differential equation at the initial time point are provided
with the interface InitialData.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FeynmanKacEx4
public FeynmanKacEx4()
-
-
Method Details
-
main
- Throws:
Exception
-