UnRisk

A Package for the Valuation of Financial Derivatives

Andreas Binder, MathConsult GmbH, Linz, Austria

www.unriskderivatives.com

What is the UnRisk PRICING ENGINE?

An Application Package for the NUMERICAL Valuation of Financial Derivatives

For most of the actively traded financial instruments, closed form solutions are not available and numerical schemes have to be applied. 
In the UnRisk PRICING ENGINE, Adaptive Integration is implemented, a method developed by MathConsult, which combines analytic (local Green functions) and numeric components. Adaptive Integration typically needs drastically fewer time steps than, say, binomial trees.

Computational Engine Realized in C++

The computational engine of UnRisk is realized in C++ and the linked to Mathematica via MathLink.

Different User Interfaces

The UnRisk PRICING ENGINE can be used
- from the Mathematica Front End
- from Excel (via Mathematica Link for Excel)
- from a JAVA based point and click interface (UnRisk Calculator coming with version 1.5.).
Experiments for WebUnRisk have been successful

Platforms, Version

Windows only.
Current Version: 1.1, Version 1.5 coming in late autumn 2001. 
License Management by FLEXLM

The UnRisk Developers

MathConsult GmbH, Linz, Austria.
A Spin-Off Company of the Industrial Mathematics Institute, University of Linz.

Main Fields of Expertise:
- Mathematical Modelling and Numerical Simulation 
- Parameter Identification
- Computational Finance

FeO concentration in a COREX reduction shaft. 
A system of 50 coupled nonlinear partial differential equations in 3D.

The UnRisk Innovation

Architecture

Combine a numerically optimized pricing library with the supreme software architecture of Mathematica. 
Exploit the manipulation and visualization capabilities of Mathematica.
Be ready for future requirements (Web, Java, ODBC)

The Math Behind

The modelling of the problem of option pricing leads to partial differential equations (of parabolic type). Typically, analytic solutions (i.e option prices expressible in closed forms) cannot be obtained (even not by Mathematica). 
Hence, numerical schemes have to be applied. Widely used in the finance world are:
MonteCarlo Methods: easy to implement; not feasible if early exercise is allowed.
Binomial trees: severe problems with discrete dividends or with random walks which lead to non-recombining trees.

In UnRisk

Adaptive Integration: Combines analytic and numerical methods: Numerical Integration of the representation of the solution by (local) Green´s functions. Adaptive choice of the discretization of time and of the underlying which can be chosen independently.

Random Walk for Underlying

dS (t) = μ S (t) dt + σ S (t) dW,

Black Scholes Differential Equation

∂ (V/∂) t+(1/2)(σ^2) (S^2)(∂^2) (V/∂) (S^2)+r S∂(V/∂) S-rV=0

Green - Function:

G (S,  S1,  t,  T)=((E^(-r(T - t)))/(σS1 (Sqrt[ 2  π(T - t)])))(E^(((-(((log(S/S1) + (r - (1/2) (σ^2)) (T - t)))^2))/(2  (σ^2)(T - t)))))

Option value,  
    if nothing "happens" between t[j] and t[j + 1][
        exercise of the option, dividends,  ... ]

V (S,  t[j])=(∫_0^∞) G(S,  S1,  t [j] ,  
                t [j + 1] ) V(S1,  
                t [j + 1] ) \[DifferentialD]S1

Adaptive Integration uses this analytic representation of the solution and calculates the values by numerical integration of very high order  in combination with sophisticated interpolation techniques.

Accuracy

The UnRisk Coverage

Financial Instruments

Equity and Foreign Currency:
Vanilla Option on Equity
Barrier Option on Equity 
FX Option
FX Barrier Option

Interest Rate Instruments
Bonds
Floater (money market, constant maturity)
Cap/Floor
Floater with caps/ floors
Options on these
Swap / Swaption
Callable / Putable Bond

Convertible Bonds

Interest Rate Models

Ho-Lee:     					dr = a(t) dt + σ dW
Vasicek:   					dr = (a- b r) dt + σ dW
Hull-White:  					dr = (a(t) - b r) dt + σ dW
Cox-Ingersoll-Ross:				dr = (a- b r) dt + σ Sqrt[r] dW
In Version 1.5: Generalized Hull-White:	dr = (a(t) - b(t) r) dt + σ(t) dW

Valuation and Visualization Example

We valuate a convertible bond which is also callable and putable at certain dates and we visualize its value and its derivative with respect to the volatility.

Needs["UnRisk`UnRiskFrontEnd`"]
<< Graphics`MultipleListPlot`
<< Graphics`Animation`
MaturityDate = {2003, 10, 10};
MyBond = 
        MakeFixedRateBond[0.05, MaturityDate, {1999, 10, 10}, 
          FaceAmount -> 100];
MyEquity = MakeEquity[S];
MyCall = MakeCallPutSchedule[{{{2002, 10, 10}, 1.2}}];
MyPut = MakeCallPutSchedule[{{{2002, 4, 10}, 1.35}}];
MyConvert = 
        MakeConvertibleBond[MyBond, MyEquity, 1, CallSchedule -> MyCall, 
          PutSchedule -> MyPut, 
          ConversionDates -> {{2000, 05, 10}, {2003, 4, 
                10}}];
MyVolC = MakeVolatilityCurve[vol];
MyYieldC = MakeYieldCurve[0.05];
ValuationDate = {2001, 10, 13};
SettlementDate  =  {2001, 10, 16};

S = 100;  vol = 0.25;
Valuate[MyConvert, ValuationDate, SettlementDate, MyVolC, MyYieldC, 
      CalculateVega -> True]

Use the Help Browser

ccc = 
      Table[Show[
          GraphicsArray[
{Plot3D[Valuate[MyConvert, 
                    ShiftDate[MaturityDate, -ti], 
                    ShiftDate[MaturityDate, -ti], MyVolC, MyYieldC, 
                    CalculateVega -> False, 
                    NumericalParameters -> {30, 150}][[4]], {S, 
                  60, 140}, {ti, 0, 720}, PlotPoints -> {30, 30}, 
                PlotRange -> {90, 150}, 
                AxesLabel -> {"S", "t", "Value"}, 
                DisplayFunction -> 
                  Identity], 
Plot3D[Valuate[MyConvert, 
                    ShiftDate[MaturityDate, -ti], 
                    ShiftDate[MaturityDate, -ti], MyVolC, MyYieldC, 
                    CalculateVega -> True, 
                    NumericalParameters -> {30, 150}][[10]], {S, 
                  60, 140}, {ti, 0, 720}, PlotPoints -> {30, 30}, 
                PlotRange -> {0, 0.5}, 
                AxesLabel -> {"S", "t", "Vega"}, 
                DisplayFunction -> Identity]}, 
            ImageSize -> 800]], {vol, 0.10, 0.30, 0.02}]

UnRisk, Java, J/Link

Point and Click Interface Realized with Java and J/Link

Experiment: WebUnRisk

<HTML>
<HEAD>
<TITLE>European Call Option</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff"> 
<H1>European Call Options</H1>

<FORM ACTION="EuropeanCallPlot" METHOD="POST">

<%Mathlet <<UnRisk`UnRiskFrontEnd` %>

Enter a dividend:
<INPUT TYPE="TEXT" NAME="div" ALIGN="LEFT" SIZE="10" VALUE="<%Mathlet MSPValue[$$div,"10"] %>" >

Enter a strike price:
<INPUT TYPE="TEXT" NAME="strike" ALIGN="LEFT" SIZE="10" VALUE="<%Mathlet MSPValue[$$strike,"100"] %>" >

Enter a volatility:
<INPUT TYPE="TEXT" NAME="vola" ALIGN="LEFT" SIZE="10" VALUE="<%Mathlet MSPValue[$$vola,"0.25"] %>" >

Enter an interest rate:
<INPUT TYPE="TEXT" NAME="r" ALIGN="LEFT" SIZE="10" VALUE="<%Mathlet MSPValue[$$r,"0.05"] %>" >

<br>
<%Mathlet $$divsched=MakeDividendSchedule[{{250,MSPValueToExpression[$$div]}}]; %>
<%Mathlet $$a=MakeEquity[S,DividendSchedule->$$divsched]; %>
<%Mathlet $$b=MakeVanillaEquityOption[$$a,MSPValueToExpression[$$strike],365]; %>
<%Mathlet $$c=MakeYieldCurve[MSPValueToExpression[$$r]]; %>
<%Mathlet $$d=MakeVolatilityCurve[MSPValueToExpression[$$vola]]; %>
<br>
<INPUT TYPE="Submit" NAME="submitButton" VALUE="Valuate">
<br>
<%Mathlet 
	MSPBlock[{$$div},
		MSPShow[Plot3D[Valuate[$$b,t,t,$$d,$$c,NumericalParameters->{100,100}][[1]],{S,60,140},{t,0,365}]]] %>
<%Mathlet 
	MSPBlock[{$$div},
		MSPShow[Plot3D[Valuate[$$b,t,t,$$d,$$c,Method->"Analytic"][[1]],{S,60,140},{t,0,365}]]] %>
<%Mathlet 
	MSPBlock[{$$div},
		MSPShow[Plot3D[Valuate[$$b,t,t,$$d,$$c,NumericalParameters->{100,100}][[1]]-Valuate[$$b,t,t,$$d,$$c,Method->"Analytic"][[1]],{S,60,140},{t,0,365}]]] %>

<%Mathlet Uninstall[UnRiskML]; %>

</FORM>

</BODY>
</HTML>

Resume

UnRisk combines
- sophisticated numerical methods implemented in C++
- supreme architecture of Mathematica

and is therefore ready to meet the gorwing demands of the finance community.