# The Adjoint Method for the Inverse Problem of Option Pricing

Authors: Shou-Lei Wang; Yu-Fei Yang; Yu-Hua Zeng
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The estimation of implied volatility is a typical PDE inverse problem. In this paper, we propose theTV-L1 model for identifying the implied volatility. The optimal volatility function is found by minimizing the cost functional measuring the discrepancy. The gradient is computed via the adjoint method which provides us with an exact value of the gradient needed for the minimization procedure. We use the limited memory quasi-Newton algorithm (L-BFGS) to find the optimal and numerical examples shows the effectiveness of the presented method.


---

## Body

## 1. Introduction

An option is classified as either a call option or a put option. A call (or put) option is a contract which gives its holder the right to buy (or sell) a prescribed asset, known as the underlying asset, by a certain date (expiration date) for predetermined price (commonly called the strike price or exercise price). The revolution in trading and pricing derivative securities began in the early 1970s. In 1973, Black and Scholes [1] published their seminal papers on the theory of option pricing and obtained the partial differential equation depicting the option prices: (1)∂V∂t+12σ2S2∂2V∂S2+(r-q)S∂V∂S-rV=0,
where (S,t)∈(0,∞)×(0,T), and V(S,t) is the value of option price. The asset price S is modeled to satisfy the Geometric Brownian motion, σ is the volatility, r is the riskless interest rate, and T is the maturity.The payoff function at maturity and boundary conditions are given by(2)V(S,t)|t=T=(S-K)+=max⁡(0,S-K),calloption,V(0,t)=0,(S,t)∈(0,∞)×(0,T),lim⁡S→∞V(S,t)S=1,
where K is the strike price. The analytical solution of the European call option is
(3)V(S,t)=SN(d1)-Ke-r(T-t)N(d2),
where
(4)N(x)=12π∫-∞x‍e-ω2/2dω,d1=ln⁡⁡(S/K)+(r-q+(σ2/2))(T-t)σ(T-t),d2=d1-σ(T-t).The option pricesV(S,t) are functions of five parameters: S, K, r, T, and σ. Except for the volatility, the other four parameters S, K, r, and T are assumed or can be directly observed in the market. If the volatility is a constant, (1) becomes the classical Black-Scholes model. However, in the actual market volatility is changing [2, 3]. Volatility is a measure of the amount of flaction in the asset prices, that is, a measure of the randomness. It is necessary to measure it accurately in portfolio, asset pricing, risk management, and monetary policy. The estimation of volatility has been an important research topic of modern financial markets.The volatility value implied by an observed option price is called the implied volatility. In market, empirical studies have revealed that no constant or merely time dependent local volatility function is consistent with most sets of market quotes; such phenomena are commonly called the volatility smile by market practitioners. In this paper, we are interested in the inverse problem of option pricing (IPOP). One possibility to explain the volatility smiles in Black-Scholes model is to use a deterministic function of underlying asset priceS and time t; that is, σ=σ(S,t). We only discuss the case of σ(S,t)=σ(S) on European call options.The inverse problem of option pricing was first considered by Dupire [4]. He obtained a local volatility formula for all strike prices and maturities; however it is instable. Bharadia et al. [5] derived a simple volatility formula that does not require the option to be exactly at-the-money. Quasi-iterative technique for computing the implied volatility was proposed by Chance [6]. Chambers and Nawalkha [7] restricted Chance’s Taylor expansion to be only in volatility, improving its accuracy. Utilizing the third-order Taylor series expansion, Li [8] developed a new close formula of implied volatility. Ballestra and Cecere [9] proposed a highly efficient approach to compute the volatility of the Fractional Brownian Motion implied by American options. Research results concerning inverse problem of option pricing with Tikhonov regularization [10] strategies have been intensively published in recent years; see, for example, Chiarella et al. [11], Crépey [12], Deng et al. [13], Egger and Engl [14], Isakov [15], Jiang and Tao [16], Leland [17], Lagnado and Osher [18], Ngnepieba [19], and references therein. However, the classical Tikhonov regularization may oversmooth the solution of the origin problem. If the exact solution is nonsmooth or even has some singularities, the regularized solution cannot approximate effectively. These shortcomings will blur the edge of the restored image in image processing. Based on the advantage that the total variation (TV) regularization can preserve the edge of the image, Rudin et al. [20] proposed the TV-L2 model (also called the ROF model):
(5)min⁡u∈Ωλ2∥u-f∥L2(Ω)2+|∇u|L1(Ω).Considering the jump, overnight, and weekend effect [21, 22] of volatility, the total variation regularization might be able to depict the properties of volatility better. So whether the TV regularization strategy could be applied to identify the implied volatility is a question worth pondering.L
1 fidelity-based model has many desirable and unexpected consequences in applications, such as data-driven parameter selection and multiscale image decomposition. Since the TV regularization should be used in the second step in order to reconstruct jump discontinuities in inverse problem, the reasonable choice of fidelity in the first step is the L1 fidelity. In this paper, we consider the minimization of TV regularization under L1 fidelity. The adjoint method provides us with an exact value of the gradient needed for the minimization procedure.This paper is organized as follows. In the next section, we put forward theTV-L1 model for determining the implied volatility. In Section 3, we deduce the semidiscrete form of the Black-Scholes equation and introduce the adjoint model. Time discretization and the L-BFGS algorithm [23] are given in Section 4. In Section 5, we present a selection of numerical examples. In the last section, we give some remarks to conclude the paper.


## 2. Total Variation Regularization Model

Let𝕏 and 𝕐 be Hilbert spaces. The standard form of an inverse problem is as follows. Give y∈𝕐 and F:D(F)⊂𝕏→𝕐; find a∈D(F) such that F(a)=y, where F is a nonlinear operator between 𝕏 and 𝕐. Recall that an inverse problem is well posed if and only if the three conditions of Hadamard are satisfied: the existence, uniqueness, and continuous dependence of the solutions. Most inverse problems are ill posed.We assume that only noisy datayδ of the exact data y is available. To obtain a well-posed problem, the classical Tikhonov regularization strategy is minimizing
(6)Jαδ(a)=∥F(a)-yδ∥2+α∥a-a0∥2,a∈D(F).In this section we consider the problem of inferring a local volatility functionσ(S) from the observed option prices (take call option for example). Equation (1) is described in an infinite domain ℝ+×(0,T) which makes it difficult to obtain numerical solutions. We replace the region ℝ+×(0,T) with the finite rectangle Ω:=[0,Smax⁡]×[0,T], where Smax⁡ is the suitable chosen positive number representing the final value of the asset price; then we have
(7)∂V∂t+12σ2(S)S2∂2V∂S2+(r-q)S∂V∂S-rV=0,(S,t)∈Ω,V(0,t)=0,t∈[0,T],V(S,T)=(S-K)+,S∈[0,Smax⁡],V(Smax⁡,t)=(Smax⁡-K)+,t∈[0,T].
In the current work, we assume that the market prices Vij for a series of options are known, where Vij is the observed market prices of the options with exercise dates Ti (T1,T2,…TN) and strike prices Kij (Ki1,Ki2,…KiMi). We would like to estimate the volatility function σ(S) that satisfies the Black-Scholes model (7) using this set of the observations.In [18] Lagnado and Osher determined this inverse problem by using Tikhonov regularization strategy, that is, attempting to minimise
(8)G~(σ)=12∑i=1N‍∑j=1Mi‍(V(S0,0,Kij,Ti,σ)-Vij)2+∥∇σ∥22,
where ∇=(∂/∂S,∂/∂t) denotes the gradient operator. This regularization strategy proposed by Lagnado and Osher was just for one fixed value of underlying asset S0, at one fixed point in time t=0. There is no guarantee that the value of σ calculated by this approach will be correct either for other underlying assets or at future times; there is also no guarantee that volatility will be positive everywhere.Based on their work, Chiarella et al. [11] modified the objective functional as follows:
(9)G^(σ)=12∑i=1N‍∑j=1Mi‍∫0∞‍∫0Tcur‍[V(S,t,Kij,Ti,σ)-Vij]2dSdtw+∥∇σ∥22,
where Tcur is the current time.As we know, Tiknonov regularization may oversmooth the solution, so it cannot preserve the singularities of the solution well. In image processing this shortcoming will blur the edge of the restored image. To over this defect, Rudin et al. [20] proposed the total variation regularization strategy. Considering the jump, overnight, and weekend effect of the volatility, we introduce the following optimal control problem (TV-L1 model):
(10)min⁡σJ(σ)=12∫0T‍∥V-Vij∥dt+α∫0Smax⁡‍|∇σ|dS,
where α denotes the regularization parameter, Vij is the corresponding observations, V is the related vector of prices in the Black-Scholes model with volatility function σ(S), and ∇ denotes the gradient, in this paper, |∇σ|=|σ′(S)|.To avoid the case|∇σ|≈0 in the flat area, as is done in image processing, the problem (10) is usually approximated by using the problem
(11)min⁡σJ(σ)=12∫0T‍∥V-Vij∥2+ε12dtw+α∫0Smax⁡‍|σ′(S)|2+ε22dS,
where ε1 and ε2 are two positive parameters which should usually be taken as a constant, for example, ε1=ε2=10-6.


## 3. Semidiscretization and Adjoint Model

The vega∂V/∂σ will appear in the optimal necessary condition if we compute the gradient of cost function ∇σJ(σ) directly. The vega (sometimes called kappa) of derivatives is the rate of change of its value with respect to the volatility of the underlying asset. Chiarella et al. [11] determined the vega by using the Black-Scholes formula as an approximation:
(12)∂V∂σ=SN′(d1)∂d1∂σ-Ke-r(T-t)N′(d2)∂d2∂σ=ST-te-d12/22π;
however, it is not an exact value. In this paper, we introduce the adjoint method [19] which provides us with an exact value of the gradient needed for the minimization procedure.We apply a uniform grid for the computational domain[0,Smax⁡]×[0,T]; let
(13)ΔT=TNT,ΔS=Smax⁡NS.
Moreover, we use the notation
(14)Vin=V(Si,tn),
where
(15)Si=iΔS,tn=nΔT,i=0,1,2,…,NS,n=0,1,2,…,NT.
The first-order and second-order finite differences are used to approximate the space partial derivative ∂V/∂S and ∂2V/∂S2 in Black-Scholes equation:
(16)∂V∂S(Si,t)≈Vi+1(t)-Vi(t)ΔS,∂2V∂S2(Si,t)≈Vi+1(t)-2Vi(t)+Vi-1(t)ΔS2.
Then, we have (we replace σ(Si) by σi for convenience sake)
(17)∂V∂t+12σi2(iΔS)2(Vi+1(t)-2Vi(t)+Vi-1(t)ΔS2)hhh+(r-q)iΔSVi+1(t)-Vi(t)ΔS-rVi=0;
this leads to the following semidiscrete equation:
(18)∂V∂t+12[σii]2Vi-1(t)-[σii+(r-q)i+r]Vihhh+[12[σii]2+(r-q)i]Vi+1=0.A
σ
=
[
a
i
j
σ
] is a tridiagonal matrix with nonzero elements defined as follows:
(19)ai,i-1σ=-12(σii)2,i=1,2,3,…,NS,ai,iσ=(σii)2+(r-q)i+r,i=1,2,3,…,NS,ai,i+1σ=-(12(σii)2+(r-q)i),i=1,2,3,…,NS.
Indeed ai,jσ≤0 for i≠j; this property guarantees that the space discretization does not cause undesired oscillations into the numerical solution. Equation (18) can be written as
(20)∂V∂t=AσV.The directional derivative of option priceV, also called the sensitivity in financial theory context, is
(21)V^(σ,h)=lim⁡β→0V(σ+βh)-V(σ)β,
where h is the perturbation on σ. This combined with (20) implies
(22)∂V^∂t=Aσ·V^+[∂Aσ∂σ]·Vh,V^|t=0=0.Similarly, the directional derivative of the cost functionJ(σ) is
(23)J^(σ,h)=lim⁡β→0J(σ+βh)-J(σ)β=〈h,∇σJ〉=12∫0T‍〈V-Vij∥V-Vij∥2+ε12,V^〉dtwwwwwwwww+α〈-σ′′((σ′)2+ε22)-(σ′)2((σ′)2+ε22)3/2,h〉.Introducing the adjoint variableP, we have
(24)P·∂V^∂t=P·Aσ·V^+P·[∂Aσ∂σ]·Vh;
by using integration by parts, the above equation is integrated between 0 and T:
(25)∫0T‍P·dV^=∫0T‍(P·Aσ·V^+P·[∂Aσ∂σ]·Vh)dt,⟹〈P(t),V^(t)〉|0T-∫0T‍V^dP=∫0T‍[P·Aσ·V^+P·[∂Aσ∂σ]·Vh]dt,⟹〈P(t),V^(t)〉|0T-∫0T‍〈dPdt,V^〉dt=∫0T‍〈[Aσ]TP,V^〉dtwwi+〈h,∫0T‍VT[∂Aσ∂σ]TPdt〉,⟹〈P(T),V^(T)〉-∫0T‍〈dPdt,V^〉dtwwii-∫0T‍〈[Aσ]TP,V^〉dt=〈h,∫0T‍VT[∂Aσ∂σ]TPdt〉,⟹-〈P(T),V^(T)〉wwi+∫0T‍〈dPdt+[Aσ]TP,V^〉dt=〈h,-∫0T‍VT[∂Aσ∂σ]TPdt〉.
If we define P, the adjoint variable is the solution of the equation
(26)dPdt+[Aσ]TP=12V-Vij∥V-Vij∥2+ε12;P(T)=0,
then we have
(27)12∫0T‍〈V-Vij∥V-Vij∥2+ε12,V^〉dt=〈h,-∫0T‍VT[∂Aσ∂σ]TPdt〉.So the directional derivative of the cost function can be written as follows:(28)J^(σ,h)=〈h,∇σJ〉=〈h,-∫0T‍VT[∂Aσ∂σ]TPdt〉w+α〈-σ′′((σ′)2+ε22)-(σ′)2((σ′)2+ε22)3/2,h〉;
thus, the gradient of the cost function J(σ) with respect to the control variable σ is
(29)∇σJ(σ)=-ασ′′((σ′)2+ε22)-(σ′)2((σ′)2+ε22)3/2-∫0T‍VT[∂Aσ∂σ]TPdt.


## 4. Time Discretization and Algorithm

Considering the stability and high accuracy of the Crank-Nicolson time discretization scheme which can be interpreted as the average of the explicit and implicit Euler schemes, the time discretization of the semidiscrete equation (20) can be written as
(30)Vn+1-VnΔT=Aσ(Vn+1+Vn2);
then we have
(31)(I+ΔT2Aσ)Vn=(I-ΔT2)Vn+1.
The above discrete scheme is second-order accurate and unconditionally stable. Let the boundary condition P0n=0, PNSn=0, n=0,1,…,NT; we also use this scheme for the discrete of adjoint equation (26):
(32)Pn-pn-1dt+[Aσ]TPn+Pn-12=12Vn-Vij∥Vn-Vij∥2+ε12,PNT+1=0;
thus
(33)(I+ΔT2[Aσ]T)Pn-ΔT12Vn-Vij∥Vn-Vij∥2+ε12=(I-ΔT2[Aσ]T)Pn-1;PNT+1=0,LetBσ=(ΔT/2)[Aσ]T; (33) can be written as
(34)(I-Bσ)Pn-1=(I+Bσ)Pn-ΔT2Vn-Vij∥Vn-Vij∥2+ε12,PNT+1=0;Bσ=[bijσ] is a tridiagonal matrix with nonzero elements:
(35)bi,i-1σ=-ΔT2(12σi-12(i-1)2+(r-q)(i-1)),bi,iσ=ΔT2[(σii)2+(r-q)i+r],bi,i+1σ=-ΔT2[12σi+12(i+1)2],i=1,2,3,…,NS.The discrete form of the gradient∇σJ(σ) is given by
(36)∇σkJ(σ)=-ασ′′((σ′)2+ε22)-(σ′)2((σ′)2+ε22)3/2-∫0T‍VT[∂Aσ∂σ]TPdt=ΔT∑n=1NT‍∑i=1NS‍[Vi-1n+Vi-1n+1-2(Vin+Vin+1)hhhhhhhhhhh+Vi+1n+Vi+1n+1]σii2Pin×(2)-1ww-α(σk+1-2σk+σk-1ΔS2[(σk+1-σkΔS)2+ε22]hhhhhh-(σk+1-σkΔS)2)ww×(((σk+1-σkΔS)2+ε22)3/2)-1,
where ∇σJ(σ)=(∇σ1J(σ),∇σ2J(σ),…,∇σNSJ(σ)).The solution of the minimization problem (11) could be computed by Newton’s method:
(37)σ(k+1)=σ(k)-[∇σ2J(σ(k))]-1·∇σJ(σ(k)),
where the inverse Hessian [∇σ2J(σ(n))]-1 is approximated by L-BFGS formula.We first need to introduce some notations. The iterates will be denoted byσk and we define sk=σk+1-σk, gk=∇σkJ(σ), yk=gk+1-gk. The method uses the inverse BFGS formula in the form
(38)Hk+1=vkTHkvk+ρkskskT,
where ρk=1/ykTsk and vk=1-ρkykskT.Algorithm 1 (TV-L1 model for solving the implied volatility).
Step  1. Choose a function σ0(S). This will be the initial approximation to the true volatility σex(S).
Step  2. Give the initialization value α, T, NS, NT, K, Smax⁡, ε1=ε2=10-6, 0<β′<1/2<β′′<1, and H0=I.
Step  3. Determine ViNT=(iΔS-K)+ and Vij by the Black-Scholes formula using σ=σex(S):
(39)V(S,t)=SN(d1)-Ke-r(T-t)N(d2).
Step  4. Let σ=σk; P is the solution of the following linear equation:
(40)(I-Bσ)Pn-1=(I+Bσ)Pn-ΔT2Vn-Vij∥Vn-Vij∥2+ε12,PNT+1=0,
and Vn(n=NT,NT-1,…,2,1) is computed by
(41)(I+ΔT2Aσ)Vn=(I-ΔT2)Vn+1,
where Aσ and Bσ are defined in (19) and (35).
Step  5. Compute gk=∇σJ(σk), dk=-Hkgk; then
(42)σk+1=σk+αkdk,
where αk satisfies the Wolfe condition:
(43)J(σk+αkdk)≤J(σk)+β′αkgkTdk,(44)g(σk+αkdk)≥βgkTdk.
We always try the step length αk=1 first.
Step  6. If ∥σk+1-σex∥∞≤τ, end; else go to next step.
Step  7. Let m^=min⁡{k,m-1}; update H0m^+1 times using the pairs {yj,sj}j=k-m^k; that is, let
(45)Hk+1=(VkT⋯Vk-m^T)H0(Vk-m^⋯Vk)+ρk-m^(VkT⋯Vk-m^+1T)sk-m^·sk-m^T(Vk-m^+1⋯Vk)+ρk-m^+1(VkT⋯Vk-m^+2T)sk-m^+1·sk-m^+1T(Vk-m^+2⋯Vk)⋮+ρkskskT.
Step  8. Set k=k+1 and go to Step 4.In this paper, we only discuss the estimation of implied volatility on European call options. TheTV-L1 model and adjoint method are still valid in the case of put options.


## 5. Numerical Experiments

In this section, we present numerical experiments to illustrate theTV-L1 model and adjoint method presented in the previous sections. First, we assume that the true volatility function σex(S) is defined as
(46)σex(S)={σ=0.1e-0.01S+0.02,S∈[0,50];σ=0.1e-0.01S-0.02,S∈(50,100].In numerical experiments, the interest rater=0.25, Smax⁡=100; we consider only one time to option maturity T=5. We take ΔS=1,ΔT=0.01, NS=100, NT=500, and K=50. Figure 1 displays the true volatility function.Figure 1
Volatility functionσex(S,t).The observed market pricesVij are obtained by solving the Black-Scholes equation with the true volatility. Figure 2 displays Vij.Figure 2
The observed market pricesVij.We solve the optimal volatility by Algorithm1; Figure 3 shows the comparison between the true volatility σex(S) and the optimal estimated σ(S),.Figure 3
Volatility estimation.Our total variation regularization strategy has three advantages: the first one is it contains no terms involving the Dirac delta function [24] compared with Lagnado and Osher’s model [18]; the second is that the total variation regularization can maintain the singularities of the solution better (S=50); the third is that the gradient is computed via the adjoint method which provides us with an exact value of the gradient needed for the minimization.


## 6. Conclusion

A lot of research works have been made to determine the implied volatility by regularization strategies. Based on the advantages and great success of the total variation regularization strategy in image processing, in this paper, we propose theTV-L1 model for solving the implied volatility under the framework of the Black-Scholes model. We estimate implied volatility by solving an optimal control problem and the gradient is computed via the adjoint method. We use the limited memory quasi-Newton algorithm (L-BFGS) to find the optimal solution. Furthermore, the results of numerical experiments are presented.



---

*Source: 314104-2014-03-26.xml*