1 Introduction

Option pricing is one of the most common problems in quantitative finance and a great number of researchers are involved in it Black and Scholes (1973). (see for example Fusai and Recchioni 2008; Heynen and Kat 1995). Barrier options are among the most applicable and popular types of exotic options which are desirable in financial markets. Barrier options are traded in different features. As a description, down-and-out barrier option is that option which terminate (knock-out) if the price of underlying asset descends and hits the pre determined barrier. In practice and with attention to academic literature, barrier options have been studied under two discrete and continuous monitoring assumption. In the first case, the price of underlying asset has been checked at fixed times and monitoring dates, (for instance, weekly or monthly).

Some pricing approaches, especially for discrete monitoring case, could be found in Mutenga and Staikouras (2004) and also its references. On the other hand, some other studies Geman and Yor (1996), Hui et al. (2000), Kunitomo and Ikeda (1992), Pelsser (2000) and Sü han et al. (2013) investigated pricing barrier option under continuous monitoring assumption. There are several drastic discrepancies between option prices under these two mentioned assumptions (see Fusai and Recchioni 2008). In the majority of the related studies, the price of underlying assets is modeled as geometric Brownian motion process where the model parameters are assumed constant. The assumption of time-dependent parameters provides a more flexible model to embed the possible events (politically or economically) that may be arisen.

In the present paper, we try to price a down-and-out discrete barrier option on an underlying asset (for instance, stock) which is modeled as geometric Brownian motion with time-dependent parameters. In this regard, a set of transformations are employed to correspond time-dependent partial differential equations (PDEs) for option price (see Marianito and Rogemar 2006) with time independent ones. Afterwards, the obtained time independent PDEs are simply converted to familiar heat equations whose answers are written as multiple integral forms. Finally, a new method is proposed to accurately computerize the mentioned multiple integral.

This article is organized as follows. In Sect. 2, the model structure for pricing discrete down-and-out barrier options is discussed and a recursive method is obtained. In Sect. 3, a numerical algorithm is proposed to evaluate the multiple integral in Sect. 2. In Sect. 4, a comparison of some available methods is given via some numerical results. And finally, remarks and conclusions are expressed in Sect. 5.

2 Discrete Barrier Options Model with Time-Dependent Parameters

In this article, we focus on pricing discrete down-and-out barrier call option on a stock in a financial market, i.e. a call option which expires valueless if the stock price goes down and touches lower barrier at predetermined monitoring dates.

With attention to this fact that the summation of in and out call option price (in each case down or up) is equal to the price of a simple European call option (see Wilmott and Brandimarte 1998; Wilmott et al. 1993), so it is enough to find just one of them. Other kinds of barrier options like put one, could be priced using the put-call parity given in Haug (1999). Suppose that the prices of underlying stocks that is denoted with stochastic process \(X_{t}\), follow the Geometric Brownian Motion (GBM) process, i.e.:

$$\begin{aligned} {\left\{ \begin{array}{ll}dX_{t} = \big (\rho (t)-D(t)\big )X_{t} dt + \sigma (t)X_{t} dW_{t}^{Q},\\ X(0)=x_{0}.\end{array}\right. } \end{aligned}$$
(1)

where the stochastic process \(W_{t}^{Q}\), is the standard Brownian motion under the risk-neutral measure Q and deterministic functions \(\rho (t)\), is the time-dependent risk-free rate, D(t) is dividend for per share unit up to certain time and \(\sigma (t)\) is the time-dependent instantaneous volatility. In special case, they could be assumed constants values and even D(t) will be vanished in non-dividend paying case. For more details about stochastic differential equations and its application especially in financial mathematics, see Arnold (1974), Evans (2004) and Oksendal (2003).

In all over our discussion, we consider the increasing sequence of monitoring dates \(\{t_{i}\}_{i=0}^{N}\) as follows:

$$\begin{aligned} 0 = t_{0} < t_{1} < \cdots < t_{n} < \cdots < t_{N} = T. \end{aligned}$$

Suppose L and E are the lower barrier and exercise price respectively. Also \(P_{b}= P_{b}(x,t,n)\) stand for the price of call option so that variable x denotes the stock price in time \(t\in [t_{n}~t_{n+1}]\). According to well-known Black–Scholes PDE, obtained from (1), the option price \( P_{b}\), verifies:

$$\begin{aligned} \frac{\partial P_{b}}{\partial t}+\big (\rho (t)-D(t)\big )x \frac{\partial P_{b}}{\partial x}+\tfrac{1}{2}\sigma ^{2}(t) x^2 \frac{\partial ^{2} P_{b}}{\partial ^{2} x}-\rho (t) P_{b}=0, \end{aligned}$$
(2)

with final condition:

$$\begin{aligned} {\left\{ \begin{array}{ll}P_{b}(x,T,0)=(x-E)\mathbf 1 _{(x\ge max(E,L))};\quad \,&{}n=N,\\ P_{b}(x,t_{N-n},N-n-1)=P_{b}(x,t_{N-n},N-n)\mathbf 1 _{(x\ge L)};\quad \,&{}n=1,2,\ldots ,N-1.\end{array}\right. }\nonumber \\ \end{aligned}$$
(3)

In this paper, the option price problem is investigated so that it is unknown at initial time \(t=0\). We must also solve the backward partial differential equations from the final condition, the option payoff at the maturity time T, and to find the option price at time zero. This backward problem could be changed to a forward one by a simple change of variable \(T-t\) in place of t. By applying Eq. (1) and Oksendal (2003), the option price \( P_{b}\), verifies the well-known Black–Scholes PDEs Merton (1973):

$$\begin{aligned} -\frac{\partial P_{b}}{\partial t}+\big (\rho (t)-D(t)\big )x \frac{\partial P_{b}}{\partial x}+\tfrac{1}{2}\sigma ^{2}(t) x^2 \frac{\partial ^{2} P_{b}}{\partial ^{2} x}-\rho (t) P_{b}=0. \end{aligned}$$
(4)

To find the price of discrete barrier option(based on the definition of down-and-out barrier option), we must have the following initial conditions at each of the monitoring dates:

$$\begin{aligned} {\left\{ \begin{array}{ll}P_{b}(x,t_{0},0)=(x-E)\mathbf 1 _{(x\ge max(E,L))};\quad \, &{}n=0,\\ P_{b}(x,t_{n},n)=P_{b}(x,t_{n},n-1)\mathbf 1 _{(x\ge L)};\quad \,&{}n=1,2,\ldots ,N-1.\end{array}\right. } \end{aligned}$$
(5)

where \(P_{b}(x,t_{n},n-1)\) is defined as \(P_{b}(x,t_{n},n-1):=lim_{t\rightarrow t_{n}^{-}} P_{b}(x,t,n-1)\) and \(\mathbf 1 _{(x\ge L)}\) is characteristic function, i.e.:

$$\begin{aligned} \mathbf 1 _{(x\ge L)}:={\left\{ \begin{array}{ll}1\,;\quad \,&{}x\ge L,\\ 0\,;\quad \,&{}x<L.\end{array}\right. } \end{aligned}$$

It should be noted that the coefficients in PDE (4) are not exactly ones are written in Eq. (1). The transformation \(T-t\) is done and the well-known PDE (4) is yielded with initial conditions instead of terminal conditions.

From now on, we convert the partial differential equations (4) with time-dependent parameters to a constant one. Hereupon, three change of variables for option price, stock price and time are respectively proposed in below (see Marianito and Rogemar 2006):

$$\begin{aligned} P_{b}(x,t,n)=h_{n}(t)\bar{P_{b}}(\bar{x},\bar{t},n),\quad \bar{x} =\varphi _{n}(t)x,\quad \bar{t}=\psi _{n}(t). \end{aligned}$$
(6)

The functions \(h_{n}\),\(\varphi _{n}\) and \(\psi _{n}\) are not known. These functions will be found so that the PDE(4) convert to PDEs with constant coefficient on each monitoring interval. By utilizing the chain rule, the below forms are given for \(\frac{\partial P_{b}}{\partial t}\), \(\frac{\partial P_{b}}{\partial x}\) and \(\frac{\partial ^{2}P_{b}}{\partial x^{2}}\).

$$\begin{aligned} \begin{array}{c} \displaystyle \frac{\partial P_{b}}{\partial t}=\frac{\partial h_{n}(t)\bar{P_{b}}}{\partial t}=h^{\prime }_{n}(t)\bar{P_{b}}+h_{n}(t)\left( \frac{\partial \bar{P_{b}}}{\partial \bar{t}}\psi ^{\prime }_{n}(t)+\frac{\partial \bar{P_{b}}}{\partial \bar{x}}\varphi ^{\prime }_{n}(t) x \right) ,\\ \displaystyle \frac{\partial P_{b}}{\partial x}=\frac{\partial \left( h_{n}(t)\bar{P_{b}}\right) }{\partial x}=h_{n}(t)\varphi _{n}(t)\frac{\partial \bar{P_{b}}}{\partial \bar{x}},\\ \displaystyle \frac{\partial ^{2}P_{b}}{\partial x^{2}}=\frac{\partial ^{2} \left( h_{n}(t)\bar{P_{b}}\right) }{\partial x^{2}}=h_{n}(t)\varphi _{n}(t)^{2}\frac{\partial ^{2}\bar{P_{b}}}{\partial \bar{x}^{2}}. \end{array} \end{aligned}$$

After rewriting the partial differential equations (4), respect to these variables, we get

$$\begin{aligned}&-h^{\prime }_{n}(t)\bar{P_{b}}-h_{n}(t)\left( \frac{\partial \bar{P_{b}}}{\partial \bar{t}}\psi ^{\prime }_{n}(t)+\frac{\partial \bar{P_{b}}}{\partial \bar{x}}\varphi ^{\prime }_{n}(t) x \right) +\frac{1}{2}\sigma ^{2}(t) x^{2}h_{n}(t)\varphi _{n}(t)^{2}\frac{\partial ^{2}\bar{P_{b}}}{\partial \bar{x}^{2}}\\&\quad +\big (\rho (t)-D(t)\big )h_{n}(t)\varphi _{n}(t)x\frac{\partial \bar{P_{b}}}{\partial \bar{x}}-\rho (t)h_{n}(t)\bar{P_{b}}=0. \end{aligned}$$

By arranging the above equations, we have:

$$\begin{aligned}&-\frac{\partial \bar{P_{b}}}{\partial \bar{t}}+\left( \frac{-\varphi ^{\prime }_{n}(t) +\big (\rho (t)-D(t)\big )\varphi _{n}(t)}{\psi ^{\prime }_{n}(t)}x \right) \frac{\partial \bar{P_{b}}}{\partial \bar{x}}+\frac{\sigma ^{2}(t) \varphi _{n}(t)^{2}}{2\psi ^{\prime }_{n}(t)}x^{2}\frac{\partial ^{2}\bar{P_{b}}}{\partial \bar{x}^{2}}\qquad \\ \nonumber&\quad \quad =\bar{P_{b}}\left( \frac{h ^{\prime }_{n}(t)}{h _{n}(t)\psi ^{\prime }_{n}(t)} +\frac{\rho (t)}{\psi ^{\prime }_{n}(t)} \right) . \end{aligned}$$
(7)

If we want to get the coefficients of the above equations constant, the three equations in below should hold for some arbitrary constants \(\rho _{n}\) and \(\sigma _{n}\):

$$\begin{aligned}&\displaystyle \rho _{n}\bar{x}=\frac{-\varphi ^{\prime }_{n}(t) +\big (\rho (t)-D(t)\big )\varphi _{n}(t)}{\psi ^{\prime }_{n}(t)} x ,\\&\displaystyle \frac{1}{2}\sigma ^{2}_{n}\bar{x^2} =\frac{1}{2} \frac{\sigma ^{2}(t) \varphi _{n}(t)^{2}}{\psi ^{'}_{n}(t)} x^{2},\\&\displaystyle \rho _{n}=\frac{h ^{\prime }_{n}(t)}{h _{n}(t)\psi ^{\prime }_{n}(t)} +\frac{\rho (t)}{\psi ^{\prime }_{n}(t)}. \end{aligned}$$

After some simplifications, we will have these equalities:

$$\begin{aligned}&\displaystyle \rho _{n}=\frac{-\varphi ^{\prime }_{n}(t) }{\psi ^{\prime }_{n}(t)\varphi _{n}(t)} +\frac{\big (\rho (t)-D(t)\big )}{\psi ^{\prime }_{n}(t)} , \end{aligned}$$
(8)
$$\begin{aligned}&\displaystyle \sigma ^{2}_{n} =\frac{\sigma ^{2}(t) }{\psi ^{\prime }_{n}(t)}, \end{aligned}$$
(9)
$$\begin{aligned}&\displaystyle \rho _{n}=\frac{h ^{\prime }_{n}(t)}{h _{n}(t)\psi ^{\prime }_{n}(t)} +\frac{\rho (t)}{\psi ^{\prime }_{n}(t)}. \end{aligned}$$
(10)

By using the solution of the corresponding ordinary differential equations, the forms of the transformations are as follows:

$$\begin{aligned}&\varphi _{n}(t)=B_{n} exp\left( \int _{t_{n}}^{t}(\big (\rho (u)-D(u)\big )-\rho _{n}\psi ^{\prime }_{n}(u))du\right) , \end{aligned}$$
(11)
$$\begin{aligned}&\psi _{n}(t)= \frac{1}{\sigma ^2_{n}}\int _{t_{n}}^{t}\sigma ^2(u)du)+A_{n}, \end{aligned}$$
(12)
$$\begin{aligned}&h_{n}(t)=C_{n}exp\left( \int _{t_{n}}^{t}(\rho _{n} \psi ^{\prime }_{n}(u)-\rho (u))du\right) . \end{aligned}$$
(13)

Hence, the general form of the functions \(h_{n}(t),\psi _{n}(t) ,\varphi _{n}(t) \), have been found in monitoring intervals \([t_{n},t_{n+1}]\). Under these transformations, the partial differential equations (4), is converted to the subsequent PDEs for arbitrary constants\(\rho _{n}\) and \(\sigma _{n}\) in each monitoring interval:

$$\begin{aligned} -\frac{\partial \bar{P_{b}}}{\partial \bar{t}}+\rho _{n}\bar{x}\frac{\partial \bar{P_{b}}}{\partial \bar{x}}+\frac{1}{2}\sigma ^{2}_{n} \bar{x}^{2}\frac{\partial ^{2}\bar{P_{b}}}{\partial \bar{x}^{2}}-\rho _{n}\bar{P_{b}}=0, \quad \, (n=0,1,2,\ldots ,N-1)\qquad \end{aligned}$$
(14)

From this point onwards, the new constant values \(A_{n}, B_{n}, C_{n} \) and \(\rho _{n},\sigma _{n}\) are chosen so that the initial conditions (5), haven’t been missed. In other words, the stated constants are chosen so that the transformed initial conditions remain similar to the initial conditions (5), that is:

$$\begin{aligned} \bar{P_{b}}(\bar{x},\bar{t}_{0},0)= & {} (\bar{x}-E)\mathbf 1 _{(\bar{x}\ge max(E,L))};\quad n=0, \end{aligned}$$
(15)
$$\begin{aligned} \bar{P_{b}}(\bar{x},\bar{t}_{n},n)= & {} P_{b}(\bar{x},\bar{t}_{n},n-1)\mathbf 1 _{(\bar{x}\ge L)}; \quad n=1,2,...,N-1, \end{aligned}$$
(16)

where \(\bar{P_{b}}(\bar{x},\bar{t}_{n},n-1)\) is defined as \(\bar{P_{b}}(\bar{x},\bar{t}_{n},n-1):=lim_{\bar{t}\rightarrow \bar{t}_{n}^{-}} \bar{P_{b}}(\bar{x},\bar{t},n-1).\)

At first, we try to determine constant values \(A_{0}, B_{0}\) and \(C_{0}\), so that the initial condition (5) leads to the corresponding initial condition (15). From definitions (11), if we consider \(B_{0}=1\), then it gets \(\varphi _{0}(t_{0})=1\), and consequently we have:

$$\begin{aligned} (\bar{x}-E)\mathbf 1 _{(\bar{x}\ge max(E,L))} =(\varphi _{n}(t_{0})x-E)\mathbf 1 _{(\varphi _{n}(t_{0})x\ge max(E,L))} =(x-E)\mathbf 1 _{(x\ge max(K,L))}.\nonumber \\ \end{aligned}$$
(17)

Again, form (11), if we put \(C_{0}= 1\), then it will obtain \( h_{0}(t_{0})=1\), and the following equality is resulted:

$$\begin{aligned} P_{b}(\bar{x},\bar{t}_{0},0)=\frac{P_{b}(x,t_{0},0)}{h_{0}(t_{0})}=P_{b}(x,t_{0},0). \end{aligned}$$

Also, by taking \(A_{0}=0\), we get \(\bar{t_{0}}=\psi _{0}(t_{0})=0\). In fact, the origin of \(\bar{t}\) is coincided with time variable t. Hence, equality of two initial conditions at the first time interval results. Afterwards, we intend to determine other constants \( A_{n}, B_{n}, C_{n}\), so that from the second conditions in (5), we get the conditions in (6). By rewriting left sides of Eq. (6), we have;

$$\begin{aligned} P_{b}(\bar{x},\bar{t}_{n},n)=\frac{P_{b}(x,t_{n},n)}{h_{n}(t_{n})}~,~\bar{x}=\varphi _{n}(t_{n})x.~,~\bar{t}_{n}=\psi _{n}(t_{n}). \end{aligned}$$

Rewriting the right side of the initial conditions(6), we get:

$$\begin{aligned} P_{b}(\bar{x},\bar{t}_{n},n-1)\mathbf 1 _{(\bar{x}\ge L)}= & {} \frac{P_{b}(x,t_{n},n-1)}{h_{n-1}(t_{n})}\mathbf 1 _{(\varphi _{n-1}(t_{n})x\ge L)}\\ \bar{x}= & {} \varphi _{n-1}(t_{n})x ~,~\bar{t}_{n}=\psi _{n-1}(t_{n}). \end{aligned}$$

Therefore, if we consider the following assumptions for \( h_{n}(.) ,\varphi _{n}(.)\) and \( \psi _{n}(.)\), then the desirable equivalency will be guaranteed .

$$\begin{aligned} \varphi _{n-1}(t_{n})=\varphi _{n}(t_{n})= 1~,~\psi _{n-1}(t_{n})= \psi _{n}(t_{n})~,~ h_{n}(t_{n})=h_{n-1}(t_{n}). \end{aligned}$$

By the subsequent lemmas, the appropriate values for constants \(A_{n}, B_{n}, C_{n} \) and \(\rho _{n},\sigma _{n}\), in each monitoring time interval will be chosen in a way to hold the above equations.

Lemma 1

If in each monitoring time interval we consider:

$$\begin{aligned} A_{n}= & {} t_{n};\quad n=1,2,\ldots ,N-1,\nonumber \\ \sigma ^2_{n}= & {} \frac{1}{t_{n+1}-t_{n}}\int _{t_{n}}^{t_{n+1}}\sigma ^2(u)du,\quad n=0,1,2,\ldots ,N-1 \end{aligned}$$
(18)

Then the equality \( \psi _{n-1}(t_{n}) = \psi _{n}(t_{n})\), will be guaranteed.

Proof

Applying the definition of \(\psi _{n}(.)\), and above relations we have:

$$\begin{aligned} \psi _{n-1}(t_{n})= & {} \frac{1}{\sigma ^2_{n-1}}\int _{t_{n-1}}^{t_{n}}\sigma ^2(u)du+A_{n-1}=\frac{\int _{t_{n-1}}^{t_{n}}\sigma ^2(u)du}{\frac{1}{t_{n}-t_{n-1}}\int _{t_{n-1}}^{t_{n}}\sigma ^2(u)du}+t_{n-1}\\= & {} t_{n}=\frac{1}{\sigma ^2_{n}}\int _{t_{n}}^{t_{n+1}}\sigma ^2(u)du+A_{n}=\psi _{n}(t_{n}) \end{aligned}$$

Therefore, the proof is finished. \(\square \)

Hence in each one of monitoring dates, the value \(\sigma ^2_{n}\), is considered as the mean value of volatility square in this interval. Also, it’s easy to show that by choosing \(A_{n}\), as above, the times \(\bar{t}_{n}\), will coincide on times \(t_{n}\).

Lemma 2

If in each monitoring time interval we consider :

$$\begin{aligned} B_{n}= & {} 1;\quad n=1,2,\ldots ,N-1 ,\nonumber \\ \rho _{n}= & {} \frac{1}{t_{n+1}-t_{n}}\int _{t_{n}}^{t_{n+1}}\big (\rho (u)-D(u)\big )du,\quad n=0,1,2,\ldots ,N-1 \end{aligned}$$
(19)

Then the equality \( \varphi _{n-1}(t_{n})=\varphi _{n}(t_{n})= 1\), will be guaranteed. In addition, for equality \(h_{n}(t_{n})=h_{n-1}(t_{n})\), it is just enough to reformulate for constants \(C_{n}\):

$$\begin{aligned} C_{n}=C_{n-1}exp\left( \int _{t_{n}}^{t_{n+1}}\left( \big (\rho (u)-D(u)\big )-\rho _{n}\psi ^{\prime }_{n}(u)\right) du\right) , \quad n=1,2,\ldots ,N-1\nonumber \\ \end{aligned}$$
(20)

Proof

Again, Applying the functions \(\psi _{n}(.)\) and \(\varphi _{n}(.)\), and above relations in each interval, we could write:

$$\begin{aligned} \varphi _{n-1}(t_{n})= & {} B_{n-1}exp\left( \int _{t_{n-1}}^{t_{n}}\left( \big (\rho (u)-D(u)\big )-\rho _{n-1}\psi ^{\prime }_{n-1}(u)\right) du\right) \\= & {} 1.exp\left( \int _{t_{n-1}}^{t_{n}}\left( \big (\rho (u)-D(u)\big )-\rho _{n-1}\psi ^{\prime }_{n-1}(u)\right) du\right) \\= & {} exp\left( \int _{t_{n-1}}^{t_{n}}\left( \big (\rho (u)-D(u)\big )du\right) -\rho _{n-1}\left( \psi _{n-1}(t_{n})-\psi _{n-1}(t_{n-1})\right) \right) \\= & {} exp\left( \int _{t_{n-1}}^{t_{n}}\big (\rho (u)-D(u)\big )du-\frac{\int _{t_{n-1}}^{t_{n}}\big (\rho (u)-D(u)\big )du}{t_{n}-t_{n-1}}(t_{n}-t_{n-1})\right) \\= & {} exp\left( \int _{t_{n-1}}^{t_{n}}\big (\rho (u)-D(u)\big )du-\int _{t_{n-1}}^{t_{n}}\big (\rho (u)-D(u)\big )du\right) =1. \end{aligned}$$

Similar to above equalities, we get:

$$\begin{aligned} \varphi _{n}(t_{n})=B_{n}exp\left( \left( \int _{t_{n}}^{t_{n+1}}\left( \big (\rho (u)-D(u)\big )-\rho _{n}\psi ^{\prime }_{n}(u)\right) du\right) du\right) =1. \end{aligned}$$

According to definition of \(h_{n}(t)\), the second part will be proved trivially. \(\square \)

As before, the constants \(\rho _{n}\), are choosen as the mean value of \(\rho (t)-D(t)\), on the \(n-\)th monitoring time interval \([t_{n},t_{n+1}]\). Hitherto, the PDEs (4) and initial conditions (5), have been converted to PDEs (14) with initial conditions (15). It is noteworthy that the monitoring dates, stock price and option prices are remained unchanged under the applied transformations. As mentioned before, we must solve progressively the partial differential equation (14) with initial conditions (15) to find \(\bar{P_{b}}(\bar{x},T,N-1)\). For this purpose, the following routine transformations are done in each monitoring time interval.

$$\begin{aligned} \bar{P_{b}}(\bar{x},\bar{t},n) =W(z,\bar{t},n),\quad z=ln\left( \frac{\bar{x}}{L}\right) ,\quad k=ln\left( \frac{E}{L}\right) . \end{aligned}$$
(21)

After rewriting PDE (14), based on \(W(z,\bar{t},n)\), we have the new PDE:

$$\begin{aligned} -\frac{\partial W}{\partial \bar{t}}+m_{n}\frac{\partial W}{\partial z}+\tfrac{\sigma ^2_{n}}{2}\frac{\partial ^2 W}{\partial z^2}-\rho _{n} W=0. \end{aligned}$$
(22)

so that \( m_{n}=\rho _{n} -\frac{\sigma ^2_{n}}{2}\), and according to the last conversion, initial conditions (15), convert to below new conditions:

$$\begin{aligned} W(z,\bar{t}_{0},0)= & {} L\left( e^z-e^k\right) \mathbf 1 _{(z\ge \delta )},\quad \delta =max{\{k,0}\} \end{aligned}$$
(23)
$$\begin{aligned} W(z,\bar{t}_{n},n)= & {} W(z,\bar{t}_{n},n-1)\mathbf 1 _{(z\ge 0)}, \quad n=1,2,\ldots ,N-1 \end{aligned}$$
(24)

Another conversion as follows is done in each monitoring interval:

$$\begin{aligned} W(z,\bar{t}, n)=e^{\alpha _{n}z+\beta _{n}\bar{t}}g(z,\bar{t}, n), \quad n=0,1,2,\ldots ,N-1 . \end{aligned}$$
(25)

so that constants \(\alpha _{n},~\beta _{n}\), are defined as below:

$$\begin{aligned} \alpha _{n}=-\frac{m_{n}}{\sigma ^2_{n}},\quad \beta _{n}=\alpha _{n}m_{n}+\alpha ^2_{n} \frac{\sigma ^2_{n}}{2}-\rho _{n}. \end{aligned}$$
(26)

After rewriting PDE (22), respect to \(g(z,\bar{t}, n)\), the Heat equations are obtained, i.e.:

$$\begin{aligned} -\frac{\partial g}{\partial \bar{t}}+\hat{C}^2_{n}\frac{\partial ^2 g}{\partial z^2}=0~~ ,~~\hat{C}^2_{n}= \frac{\sigma ^2_{n}}{2},\quad n=0,1,2,\ldots ,N-1. \end{aligned}$$
(27)

And also, the initial conditions (15), are converted to the following initial conditions:

$$\begin{aligned} g(z,\bar{t}_{0},0)= & {} Le^{-\alpha _{0}z}(e^z-e^k)\mathbf 1 _{(z\ge \delta )},\quad \delta =max{\{k,0}\},\nonumber \\ g(z,\bar{t}_{n},n)= & {} g(z,\bar{t}_{n},n-1)exp\{z(\alpha _{n-1}-\alpha _{n})+(\beta _{n-1}-\beta _{n})\bar{t}_{n}\}\mathbf 1 _{(z\ge 0)}, \end{aligned}$$
(28)

where, \(1\le n \le N-1\). These PDEs with initial conditions in monitoring dates \(\bar{t_{n}}=t_{n}\) have unique analytical solution in each time interval \(\bar{t}=[\bar{t}_{n}, \bar{t}_{n+1}]\) for \(n=0,1,2,\ldots ,N-1\) (see for example page 47 of Strauss 1992).

$$\begin{aligned} g(z,\bar{t},n)={\left\{ \begin{array}{ll}L\int ^{\infty }_{0}S_{n}(z-\xi ,\bar{t}-\bar{t}_{n})e^{-\alpha \xi }(e^{\xi }-e^k)\mathbf 1 _{(\xi \ge \delta )}d\xi ~,\quad n=0,\qquad (1-27) \\ \int ^{\infty }_{0}S_{n}(z-\xi ,\bar{t}-\bar{t}_{n})g(\xi ,\bar{t}_{n},n-1)e^{\{\xi \Delta \alpha _{n}+\Delta \beta _{n}\bar{t}_{n}\}}\mathbf 1 _{(\xi \ge 0)}d\xi .(2-27)\end{array}\right. }\nonumber \\ \end{aligned}$$
(29)

where \(\Delta \alpha _{n}=\alpha _{n-1}-\alpha _{n},\quad \Delta \beta _{n}=\beta _{n-1}-\beta _{n}\), and each kernel \(S_{n}(z,\bar{t})\), is the Gaussian distribution function (\(N(0,\sqrt{4\hat{C}_{n}^2\bar{t}})\)):

$$\begin{aligned} S_{n}(z,\bar{t})=\frac{1}{\sqrt{4\pi \hat{C}_{n}^2\bar{t}}}exp\left( \frac{-z^2}{4\hat{C}_{n}^2\bar{t}}\right) , \quad n=0,1,2,\ldots ,N-1. \end{aligned}$$

In summary, according to the obtained results, the price of the discrete barrier option at monitoring dates, is given in a theorem:

Theorem 1

The pricing of down-and-out barrier call option at discrete monitoring dates \(t=t_{n+1}\); with stock price x, strike price E and barrier level L; is evaluated as follows \((n=0,1,2,\ldots ,N-1)\):

$$\begin{aligned} P_{b}(x,t_{n+1},n)= g(ln(\frac{x}{L}),t_{n+1},n)exp\left\{ \alpha _{n}ln(\frac{x}{L})+\beta _{n}{t}_{n+1}\right\} , \end{aligned}$$
(30)

where the constants \(\alpha _{n}\) and \(\beta _{n}\), are defined in (26) and \(g(.,t_{n+1},n)\), was evaluated by Eq.(29), recursively.

In the next section, some examples are given at which the price of down-and-out discrete barrier call option for the different time-dependent functions \(\sigma (t)\) and \(\rho (t)\), are evaluated numerically. In addition, the above formula could be applied for the Greeks calculation as sensitivity measures, i.e., the derivatives of the option price based on a single underlying asset with price process \(x_{t}=x\) like underlying stock price. In fact, we want to get a suitable measure of our risk exposure. In other words, we intend to obtain how the value of our portfolio (consisting of stock and various derivatives) will change with given a certain change in the underlying price. Finding the Greek Delta, we should compute \(\frac{\partial P_{b}(x,t,n,1)}{\partial x},\) and also in a similar way, \(\frac{\partial ^{2} P_{b}(x,t,n,1)}{\partial ^{2} x}\) which is defined as Gamma, is identified for each one of determined values of stock price.

3 Description of Numerical Algorithm

In this section, we explain the back-ward procedure to compute \(g(z_{0},\bar{t}_{N+1},N)\) for \((N\ge 1)\) as the final pricing of discrete barrier option after N monitoring dates. Since all of integrands In (29) have the Gaussian functions \(S_{n}(z-\xi ,\tau )\) with exponential decay property, with suitable choice of \(l_{n}\), the improper integrals in semi-infinite interval are approximated as proper integrals in intervals \( [max(\delta ,z-l_{n}),z+l_{n}]\) for \(n=0\) and \( [max(0,z-l_{n}),z+l_{n}]\) for \(0<n<N\) (see Fig. 1). Thus, it is sufficient to compute the below approximation with defined new integral bounds in (29):

$$\begin{aligned} g(z,\bar{t},n)\cong {\left\{ \begin{array}{ll}L\int _{max(\delta ,z-l_{n})}^{z+l_{n}}S_{n}(z-\xi ,\bar{t}-\bar{t}_{n})e^{-\alpha \xi }(e^{\xi }-e^k)d\xi ~,~n=0,\\ \int ^{z+l_{n}}_{max(0,z-l_{n})}S_{n}(z-\xi ,\bar{t}-\bar{t}_{n})g(\xi ,\bar{t}_{n},n-1)e^{\{\xi \Delta \alpha _{n}+\Delta \beta _{n}\bar{t}_{n}\}}d\xi .\end{array}\right. } \end{aligned}$$
(31)

In general, several numerical integration methods could be applied for computing above integrals. But to decrease the number of functions computing (NFC) and consequently for increasing the speed of computing, the Romberg method is applied in appropriate way.

Fig. 1
figure 1

a The graphs of integrands is illustrated which are related to a discrete barrier option in a determined monitor time for some Z points. With increasing values Z, the maximum values of these Gaussian graphs growth drastically. b The graphs of integrand domains which emphasize exponential decay in a limited vicinity of Z points

For computing these integrals, we should notice the following process:

  1. (1)

    to compute \(g(z_{0},\bar{t}_{N},N-1)\), it is necessary to have \(g(\xi ,\bar{t}_{N-1},N-2)\), where \(\xi \in I_{N-1}=[max(0,z_{0}-l_{N-1}),z_{0}+l_{N-1}]\).

  2. (2)

    to compute the values \(g(z,\bar{t}_{N-1},N-2)\), for \(z \in I_{N-1}\), similarly as above, we must have \(g(\xi ,\bar{t}_{N-2},N-3)\), where \(\xi \in I_{N-2}=[max(0,z-l_{N-2}),z+l_{N-2}]\). Hence, the values \(g(\xi ,\bar{t}_{N-2},N-3)\) should be evaluated in

    $$\begin{aligned} I_{N-2}=[max(0,z_{0}-l_{N-1}-l_{N-2}),z_{0}+l_{N-1}+l_{N-2}]. \end{aligned}$$
  3. (3)

    Ultimately, with pursuing this process, to compute \(g(z,\bar{t}_{2},1)\) for \(z \in I_{2}\), it is enough to calculate \(g(\zeta ,\bar{t}_{1},0)=L\int ^{\infty }_{0}S_{1}(\zeta -\xi ,\tau )e^{-\alpha \xi }(e^{\xi }-e^k)\mathbf 1 _{(\xi \ge \delta )}d\xi \) in interval

    $$\begin{aligned} \zeta \in I_{1}=\left[ max\left( 0,z_{0}-\sum _{i=1}^{N-1}l_{i}\right) ,z_{0}+\sum _{i=1}^{N-1}l_{i}\right] . \end{aligned}$$

In (31) the integrals are calculated with respect to variables \(\xi =ln(\frac{\bar{x}}{L})\). This equality means the stock price and lower bound of barrier option apply in equity \(\frac{\bar{x}}{L}=e^{\xi }\) that from financial point of view, this relation can not be extremely large. Even the corresponding numerical computations confirm it so that they remain unchangeable for upper bounds greater than U as a large enough positive number (in this algorithm, \(U=10\) and \(l_{i}=2.5\) have been considered). Consequently, in n-th step the evaluating of \(g(z,\bar{t}_{n},n-1)\) should be considered in the following intervals with suitable choice of U as an upper bound.

$$\begin{aligned} I_{n}={\left\{ \begin{array}{ll}\left[ max(\delta ,z_{0}-\sum _{i=1}^{N-1}l_{i}),max(z_{0}+\sum _{i=1}^{N-1}l_{i},U)\right] \quad n=0,\\ \left[ max(0,z_{0}-\sum _{i=n}^{N-1}l_{i}),max(z_{0}+\sum _{i=n}^{N-1}l_{i},U)\right] \quad n\ne 0.\end{array}\right. } \end{aligned}$$

Therefore, the relevant algorithm could be expressed as below semi-code:

figure a

4 Numerical Results

Example 1

Consider the problem of pricing discrete barrier call option for down-and-out position with various amounts of L, and equal monitoring dates for each maturity time mentioned in Fusai et al. (2006) (Table 1). The constant parameters which are used in this example are stock price \(=100\), exercise price \(= 100\), \(\rho = 0.10, \sigma = 0.30\), and maturity time \(T = 0.2\). The different comparative techniques in this sample are the method of recursive integration (RI) reformulate in AitSahlia and Lai (1997) with 2000 nodes; the continuous monitoring formula (CC) which has been represented with the barrier bound shifting in Broadie et al. (1999); the method of trinomial tree (TT) shown in Broadie et al. (1997); the recursive method of Simpson quadrature (SQ) given in Fusai and Recchioni (2008); a kind of Monte Carlo (MC) with 110 simulations in Bertoldi and Bianchetti (2003); and finally the analytical solution (AS) represented in Fusai et al. (2006).

Table 1 Barrier option contract pricing of Example 1: \(\rho =0.1 ,\sigma =0.3\) and \(T=0.2\)

Example 2

The discrete barrier option pricing with its Delta and Gamma Greeks for a similar example with stock price \(=100\), strike price \(=100\), \(\rho = 0.10, \sigma = 0.2\), and \(T = 0.50\) is represented in Tables  2, 3 and 4. The competing numerical conclusions are Monte Carlo (MC) about 110 simulations in Bertoldi and Bianchetti (2003); Markov chain method with thousand nodes in Duan et al. (2003); the modified method of explicit finite difference (EFD) in Boyle and Tian (1998) and finally computing the derivations of the analytical formula represented in Fusai et al. (2006). In addition, in order to indicate the ability of proposed numerical method, in high monitoring dates and long times, the barrier option pricing of Example 2 has been demonstrated in Table 5 for 1 and 2-year expiry with computing elapsed time.

Table 2 Barrier option contract pricing of Example 2: \(\rho =0.1 ,\sigma =0.2\) and \(T=0.5\)
Table 3 Option Delta for Barrier option contract pricing of Example  2: \(\rho =0.1 ,\sigma =0.2\) and \(T=0.5\)
Table 4 Option Gamma for Barrier option contract pricing of Example  2: \(\rho =0.1 ,\sigma =0.2\) and \(T=0.5\)
Table 5 Barrier option contract pricing of Example 2 with 1 and 2-year expiry and computing elapsed time (ET):\(\rho =0.1 ,\sigma =0.2\)

Example 3

Consider the problem of time-dependent pricing down-and-out discrete barrier call option on stock for different amounts of L, maturity time \(T=0.2\) and \(T=0.4 \) and monitoring dates (see Lo et al. 2003). Utilized parameters are Stock price = 100, Strike = 100, neutral asset price rate \(\rho (t) = 0.2\) and volatility time-dependent function \(\sigma ^{2}(t)= 0.1+ 0.05 exp(-t)\). Results are summarized in Table 6.

Table 6 Discrete barrier option contract pricing of Example 3

Example 4

Consider the problem of time-dependent pricing down-and-out discrete barrier call option on underlying stock for different levels of L, maturity time \(T=0.4\), and various monitoring dates. Parameters used are Stock price \(=\) 100, Strike price \(=\) 100, neutral asset price rate \(\rho (t)=0.075 + 0.05t\), and \(\sigma ^{2}(t)=0.03 + 0.02t\) (see for example Lo et al. 2003). Results are summarized in Table 7.

Table 7 Delta, Gamma and discrete barrier option contract pricing of Example 4

5 Conclusions and Remarks

In this article, the researchers have studied the problem of discrete barrier option pricing under the Black- Scholes framework for which the parameters risk free rate, dividend and instantaneous volatility where assumed to be the deterministic functions of time variable. Using an analytical approach, the discussed problem has been converted to a corresponding model with non-dividend-paying equity and constant coefficients. Afterwards, with an innovative and low computational cost procedure, we have obtained the pricing of discrete barrier options. In addition, we computed Greeks like Delta and Gamma, which are some criteria for sensitivity analysis in different monitoring dates with various time parameters. Finally, the obtained numerical results were compared with other methods and the exact solutions emphasized the high accuracy of the present method.