Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members

# FinMath.h File Reference

## Detailed Description

Standalone methods to compute functions or solve eqations useful in basic financial mathematics.

Author:
Michael J. Meyer

Definition in file FinMath.h.

`#include "TypedefsMacros.h"`

Go to the source code of this file.

## Functions

Real multiNormalDensity (int dim, Real *z)
Real N (Real x)
Real d_plus (Real Q, Real k, Real Sigma)
Real d_minus (Real Q, Real k, Real Sigma)
Real blackScholesFunction (Real Q, Real k, Real Sigma)
Real dBSF (Real Q, Real k, Real Sigma)
Real bsDiscountedCallPrice (Real S, Real K, Real tau, Real sigma, Real B)
Real bsDiscountedPutPrice (Real S, Real K, Real tau, Real sigma, Real B)
Real blackImpliedAggregateCallVolatility (Real Q, Real k, Real y)

## Function Documentation

 Real multiNormalDensity ( int dim, Real * z )
 The density of the standard multinormal distribution N(0,I).

 Real N ( Real x )

The cumulative distribution function N(x)=Prob(X<=x) of a standard normal variable X derived from the error function

Parameters:
 x Any real number.

 Real d_plus ( Real Q, Real k, Real Sigma )

The quantity in Margrabe's formula for the option to exchange assets S_1, S_2 (receive S_1 for kS_2). In this context:

where and is the aggregate volatility of log(Q) from current time t to the horizon T. If Q has constant annual volatility this becomes

In the case of the European call on S_1 with strike k the asset S_2 is the zero coupon bond maturing at call expiration.

Parameters:
 Q The quotient S_1(t)/S_2(t) k Ratio of exchange between assets (receive S_1 for kS_2). Sigma aggregate volatility of Q on [t,T].

 Real d_minus ( Real Q, Real k, Real Sigma )

The quantity in Margrabe's formula for the option to exchange assets S_1, S_2 (receive S_1 for kS_2). In this context:

where and is the aggregate volatility of log(Q) from current time t to the horizon T. If Q has constant annual volatility this becomes

In the case of the European call on S_1 with strike k the asset S_2 is the zero coupon bond maturing at call expiration.

Parameters:
 Q The quotient S_1(t)/S_2(t) k Ratio of exchange between assets (receive S_1 for kS_2). Sigma aggregate volatility of Q on [t,T].

 Real blackScholesFunction ( Real Q, Real k, Real Sigma )

Computes the function with as in d_plus, d_minus.

Useful in application of the Black-Scholes formula or Margrabe's formula to price calls or options to exchange assets. For the option to exchange assets S_1,S_2 we have Q=S_1(t)/S_2(t) and

In the special case of a call on S we have S_1=S, S_2=B is the zero coupon bond maturing at call expiry and the forward price of the call can be written as

where Q=S/B is the forward price of S at expiry.

Parameters:
 Q The quotient S_1(t)/S_2(t) k Ratio of exchange between assets (receive S_1 for kS_2). Sigma aggregate volatility of Q on [t,T].

 Real dBSF ( Real Q, Real k, Real Sigma )

Derivative of the Black-Scholes function Q*N(d_+)-k*N(d_-) with respect to Sigma.

Parameters:
 Q The quotient S_1(t)/S_2(t) k Ratio of exchange between assets (receive S_1 for kS_2). Sigma aggregate volatility of Q on [t,T].

 Real bsDiscountedCallPrice ( Real S, Real K, Real tau, Real sigma, Real B )

Discounted Black-Scholes call price (note that current time may not be zero). Both the current time `t` and the time `T` to expiry (from time zero) are needed since the formula will be applied at time other than time zero and `S`

Parameters:
 S the forward asset price at expiry `T`. K strike price tau time to expiration sigma annual asset volatility B risk free bond B_T at expiry

 Real bsDiscountedPutPrice ( Real S, Real K, Real tau, Real sigma, Real B )

Discounted Black-Scholes put price (note that current time may not be zero). Here we need the interest rate, the current time `t` and the time `T` of expiration explicitly. The formula will be applied at times other than time zero.

Parameters:
 S the forward asset price at expiry `T`. K strike price tau time to expiry sigma annual asset volatility B risk free bond B_T at expiry

 Real blackImpliedAggregateCallVolatility ( Real Q, Real k, Real y )
 Given solves the equation for using continued bisection. A solution exists if and only if . Used to compute implied volatilities from call forward prices y. Note that the solution is not the implied annual volatility , indeed these are related as , where is time to expiry.

Generated on Mon Sep 22 02:16:32 2003 for Libor-Library by 1.3-rc3