Using numerical integration, we price convertible bonds, straight bonds, equity options and various other derivatives consistently using a jump-diffusion model in which default intensity can vary with equity price in a user-specified deterministic manner.

We apply the stochastic model

*dS/S=(r+h-q) dt + σ dZ - dJ*

where *r* and *q* play their usual roles, *h* is a
deterministic function of stock price and time, and *J*
is a Poisson jump process adapted to the *default intensity*
or *hazard rate* *h*. This model is a *jump-diffusion*
extension of Black-Scholes, with the jump process *J* representing
default, compensated by extra drift in the equity at rate *h*.

Volatilities, default intensities and risk-free rates may all be represented with arbitrary term structures. Default intensity term structures may also take the underlying equity price into account.

Pricing in the standard Black-Scholes model is a special case with default
intensity set to zero. Therefore this package *also* serves to price securities
in the standard Black-Scholes model, while still allowing risk-free rates and volatilites
have nontrivial term structures.

*Black-Scholes*: The standard model is automatically supported as a special case, but also has optimized routines*Term Structures*: The package allows for any kind of instrument to be priced with time-varying rates, volatility and default intensity*Dividends*: Allows for discrete dividends in an arbitrary combination of fixed and proportional amounts. The difference between fixed and proprtional can be up to 10 percent in implied volatility terms.*Calibration*: Model calibration routines are included*Bankruptcy Realism*: A parsimonious deterministic model of default intensity gives rich behavior and conforms reasonably well to observed market data*Algorithm Parameters*: Default parameters for the algorithm work well for a very wide variety of pricing and implied volatility scenarios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | ```
## Vanilla European exercise
blackscholes(callput=-1, S0=100, K=90, r=0.03, time=1, vola=0.5)
blackscholes(PUT, S0=100, K=90, r=0.03, time=1, vola=0.5,
default_intensity=0.07, borrow_cost=0.005)
## With a term structure of volatility
## Not run:
black_scholes_on_term_structures(callput=-1, S0=100, K=90, time=1,
const_short_rate=0.025,
variance_cumulation_fcn = function(T, t) {
0.45 ^ 2 * (T - t) + 0.15^2 * max(0, T-0.25)
})
## End(Not run)
## Vanilla American exercise
## Not run:
american(PUT, S0=100, K=110, time=0.77, const_short_rate = 0.06,
const_volatility=0.20, num_time_steps=200)
## End(Not run)
## With a term structure of volatility
## Not run:
american(callput=-1, S0=100, K=90, time=1, const_short_rate=0.025,
variance_cumulation_fcn = function(T, t) {
0.45 ^ 2 * (T - t) + 0.15^2 * max(0, T-0.25)
})
## End(Not run)
## With discrete dividends, combined fixed and proportional
divs = data.frame(time=seq(from=0.11, to=2, by=0.25),
fixed=seq(1.5, 1, length.out=8),
proportional = seq(1, 1.5, length.out=8))
## Not run:
american(callput=-1, S0=100, K=90, time=1, const_short_rate=0.025,
const_volatility=0.20, dividends=divs)
## End(Not run)
## American Exercise Implied Volatility
american_implied_volatility(25,CALL,S0=100,K=100,time=2.2, const_short_rate=0.03)
df250 = function(t) ( exp(-0.02*t)*exp(-0.03*max(0,t-1.0))) # Simple term structure
df25 = function(T,t){df250(T)/df250(t)} # Relative discount factors
## Not run:
american_implied_volatility(25,-1,100,100,2.2,discount_factor_fcn=df25)
## End(Not run)
## Convertible Bond
## Not Run
pct4 = function(T,t=0) { exp(-0.04*(T-t)) }
cb = ConvertibleBond(conversion_ratio=3.5, maturity=1.5, notional=100,
discount_factor_fcn=pct4, name='Convertible')
S0 = 10; p = 6.0; h = 0.10
h_fcn = function(t, S, ...){0.9 * h + 0.1 * h * (S0/S)^p } # Intensity linked to equity price
## Not run:
find_present_value(S0=S0, instruments=list(Convertible=cb), num_time_steps=250,
default_intensity_fcn=h_fcn,
const_volatility = 0.4, discount_factor_fcn=pct4,
std_devs_width=5)
## End(Not run)
## Fitting Term Structure of Volatility
## Not Run
opts = list(m1=AmericanOption(callput=-1, strike=9.9, maturity=1/12, name="m1"),
m2=AmericanOption(callput=-1, strike=9.8, maturity=1/6, name="m2"))
## Not run:
vfit = fit_variance_cumulation(S0, opts, c(0.6, 0.8), default_intensity_fcn=h_fcn)
print(vfit$volatilities)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.