SERVING THE QUANTITATIVE FINANCE COMMUNITY

tw
Topic Author
Posts: 875
Joined: May 10th, 2002, 3:30 pm

### analytical form for average of BS option over maturities?

Hi

For a model I am working on, it would be handy to have a value for

$\int_{t}^{T} C(F,X, T-t^{\prime}) dt^{\prime}$

where  $C$ is the standard Black76  (pref without interest rates).

The ATM (F=X) version is analytic by virtue of the existence of $\int y^{\alpha} \mathrm{erf}(y)$ .

The OTM version looks a deal more taxing, even for getting a simple approximation as an expansion in moneyness.

Any ideas is this is going come out in a usable form?

Muchas gracias.

bearish
Posts: 3580
Joined: February 3rd, 2011, 2:19 pm

### Re: analytical form for average of BS option over maturities?

I would suggest looking into the chebfun framework. Admittedly, it works best in Matlab, but some work has been done in Python if Matlab is not on the menu. It replaces the functions of interest with highly accurate Chebyshev polynomial approximations, and then perform analytical operations (like integration).

Alan
Posts: 9512
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: analytical form for average of BS option over maturities?

To me, it's perfectly usable as written, and immediate in, say, Mathematica. Ditto for derivatives of it, as you can just differentiate the integrand. I'd say just declare victory and code it up. You'll have numbers that way in an hour, rather than futilely browsing through tables of integrals or waiting on some smarty pants from this forum.

p.s. The 'hour', of course, is coding time; the numbers themselves will be generated essentially instantaneously.

tw
Topic Author
Posts: 875
Joined: May 10th, 2002, 3:30 pm

### Re: analytical form for average of BS option over maturities?

Alan wrote:
To me, it's perfectly usable as written, and immediate in, say, Mathematica. Ditto for derivatives of it, as you can just differentiate the integrand. I'd say just declare victory and code it up. You'll have numbers that way in an hour, rather than futilely browsing through tables of integrals or waiting on some smarty pants from this forum.

p.s. The 'hour', of course, is coding time; the numbers themselves will be generated essentially instantaneously.

Thanks for the input!  As the resident smarty pants, if you think using the integrals as written, in a Mathematica programmed solution then  clearly that is
something I should  take a good look at. I invested in a copy, but even in the user friendly "Wolfram Language" version, there is a time overhead
in getting up to speed in using it as a programming environment as opposed to a tool for assisting mathematics.

Generally my world is one of decomposing complex energy derivatives, (whose full solution typically needs a large stochastic dynamic programming strategies)
into "vanillas" (spread options and fixed strike options). A big deal for me is sanity checking valuations and more importantly hedges (particularly vega hedges) coming from more complex models. Such integrals are a way of aggregating very large portfolios of spread options and getting some notion of the scaling
properties of the portfolio. Getting intuition is everything when you can't trust the full solution.

As a question of personal taste, (and probably flying in the completely the opposite direction to the cool kids in the ML crowd), I love calculus but find programming a humdrum chore.

Alan
Posts: 9512
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: analytical form for average of BS option over maturities?

You're welcome.

Since you're a Mathematica novice, here's a simple version to get you started.

Examples:
cblack[100, 105, 0.05, 0.40, 0.25]
5.83223
Timing[cblackavg[100, 105, 0.05, 0.40, 0.25]]
{0., 0.839571}

As advertised, the timing is essentially instantaneous.
With slightly more complex code, you can find cblackavg with an arbitrary number of accurate digits, although the timing will increase under high precision. You can also display more digits in the answer under Machine precision, which is the precision of my code here.

=====================================================
Finally, you can ask Mathematica to try to do it symbolically (analytically). Trying
Integrate[cblack[F, F, 0, sig, t], {t, 0, T}]
will return the analytic ATM case you've already done in terms of Erf[..].
But with Integrate[cblack[F, K, 0, sig, t], {t, 0, T}] or even
Integrate[Erf[Sqrt[t] + a/Sqrt[t]], {t, 0, T}], Mathematica trys, but gives up after a few minutes, returning essentially the unevaluated integral. The fail on that last one suggests a general analytic expression (in terms of special functions with no infinite sums or integrations) may be very difficult to find, if at all.

Cumnormal[x_] := (1 + Erf[x/Sqrt[2]])/2  CN = Cumnormal;d1[S_, K_, r_, sig_, T_] := (Log[S/K] + (r + sig^2/2) T)/(sig Sqrt[T])d2[S_, K_, r_, sig_, T_] := (Log[S/K] + (r - sig^2/2) T)/(sig Sqrt[T])cblack[F_, K_, r_, sig_, T_] := E^(-r T)   (F CN[d1[F, K, 0, sig, T]] - K CN[d2[F, K, 0, sig, T]])cblackavg[F_, K_, r_, sig_, T_] :=   NIntegrate[cblack[F, K, r, sig, t], {t, 0, T}]