1 Introduction

In theory and practice of financial markets, option selection and utilization is one of the most widely used derivative financial instrument, thus it is quite imperative to deeply understand the methods in which one ought to take the task of price options. When pricing option happens, a model for describing the approximate behaviour of the underlying asset was introduced in 1973 by Black and Scholes (1973) and Merton (1973) called as the Black–Scholes (B–S) model. This model has been extensively used by options traders and consequently, leads to a considerable growth in options trading due to model accuracy and effectiveness in predicting prices of options. In recent times, several methods have been suggested to solve the Black–Scholes model numerically such as Farnoosh et al. (2015, 2016, 2017), Golbabai et al. (2012, 2014), Golbabai and Mohebianfar (2017a, b), Rashidinia and Jamalzadeh (2017a, b) and Sobhani and Milev (2018). With the discovery of the fractal assembly for the stochastic process and financial field, fractional calculus and fractional partial differential equations have been familiarized into financial theory by replacing the standard Brownian motion involved in the classical model with fractional Brownian motion. Since fractional Brownian motion is not a semi-martingale, the Itô theory of stochastic integrals cannot be directly applied to it. One can try to replace the Itô integral by a version of the pathwise Riemann–Stieltjes integral, but then, as has been shown in Rogers (1997), the resulting model of option values admits arbitrage. So, the arbitrage opportunities exist in the fractional Black–Scholes model under a complete and frictionless setting. Lately, based on the fact that fractional-order derivatives and integrals provide a powerful tool for the description of memory and hereditary properties of different substances, a growing number of researchers have generalized the B–S equation to a fractional order (Björk and Hult 2005; Meerschaert and Sikorskii 2012). Consequently, one manner to take account of large volatility in stock exchange market is to use a modeling by processes of fractional order. For instance, as mentioned in Wyss (2017), European call option by a time fractional B–S model was priced. The time-fractional B–S equation is a special case of the bi-fractional B–S equation lately introduced by Liang et al. (2010). Results obtained by researchers of Cartea (2013) indicate that, the value of European style derivatives can be assumed to be a sufficient partial-integro-differential equation with a non-local operator in time-to-maturity. In addition, the authors of Leonenko et al. (2013) well-thought-out the elucidations for fractional Pearson diffusions governed by a time-fractional diffusion equation which had been successfully implemented to develop the Black–Scholes formalism.

With fractional order models, being extensively utilized in the financial field, a lot of researchers have been recently attracted to the field of solving them. Due to the memory property of fractional derivatives, to determine an exact solution of this problems is extremely difficult thus many researchers are attempting procedures to approxmate these problems. The methods that was used to consider the analytical solution of the fractional B–S models are usually takes the advantage of integral transform approaches (Chen et al. 2014, 2015a; Jumarie 2010; Kumar et al. 2012), such as homotopy perturbation methods and homotopy analysis methods (Elbeleze et al. 2013; Kumar et al. 2016), Fourier–Laplace transform (Duan et al. 2018), wavelet based hybrid methods (Hariharan et al. 2013), or via the method of separation of variables (Chen 2014). Consequently, studying the numerical approximate definition of such models seems to be a very effective and significant research goal. Now, we review some of them. Authors of Cartea and del Castillo-Negrete (2007), solved the finite moment log stable model numerically and applied the projected numerical procedures to price exotic options, in particular barrier options by using the shifted Grünwald–Letnik methodology and backward difference method. Numerical investigations and comparisons referred in Marom and Momoniat (2009) have been discussed for three space fractional B–S models and well-analyzed the related involved circumstances of the convergence for each of these models. The authors of Song and Wang (2013); Zhang et al. (2014) solved the option pricing under a time fractional B–S model by using an implicit finite difference scheme with first order accurate and a \(\theta \) finite difference arrangement second order accurate, respectively. In Koleva and Vulkov (2017), the time-fractional B–S equation was derived by using a weighted finite difference scheme. In Bhowmik (2014), the partial integro-differential equation that leads to option pricing hypothesis was approximated by a finite difference technique which is an explicit–implicit numerical scheme with a low order of convergence. Also, it has been demonstrated that mentioned method is conditionally stable. In Chen et al. (2015b), American options pricing under the finite moment log-stable model approach was considered by using a predictor–corrector. The authors of Zhang et al. (2016) gave a discrete implicit numerical approach for this option with a temporally \(2-\alpha \) order accuracy and a spatially second-order accuracy. Authors of De Staelen and Hendy (2017) improved the potential and capability of suggested scheme of fourth-order in space while preserving \(2-\alpha \) in time. The authors of Golbabai et al. (2019) presented the RBF meshless methods to determine the numerical solution of time fractional B–S equation. Let V(St) be the time-t price of a European double barrier option with underlying S. More specific we consider with the following boundary (barrier) and final conditions for \(0<\alpha \le 1\)

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{{\partial }^ \alpha V({S},t)}{{\partial t}^\alpha }+\frac{1}{2} {\sigma }^{2}{S^2}\frac{{\partial }^2 V({S},t)}{{\partial S}^2 }+(r-D)S\frac{{\partial } V({S},t)}{\partial S}-rV(s,t)=0,&{}\quad (s,t) \in (B_d,B_u)\times (0,T),\\ V(B_d,t)=p(t),\qquad V(B_u,t)=q(t),&{}\\ V({S},T)=v(S), \end{array}\right. } \end{aligned}$$
(1)

where \( 0 < \alpha \le 1\), T is the expiry time, r is the risk-free rate, D the dividend rate and \(\sigma (\ge 0)\) is the volatility of the returns from the holding stock price S. Here, we assume that the underlying still follows the geometric Brownian motion as in the B–S model, but consider the change in the option price as a fractal transmission system. For instance, a European double barrier knock-out call option has \(p = q= 0\) and \(v(S) = (S - K)_{+}\) where K is the strike and \((.)_{+} =\max \lbrace .,0 \rbrace \). The fractional derivative operator in Eq. (1) is a modified right Riemann–Liouville derivative (Podlubny 1999) called as follows:

$$\begin{aligned} \frac{{\partial }^\alpha V({S},t)}{{\partial t}^\alpha }= {\left\{ \begin{array}{ll} \frac{1}{\varGamma \left( 1-\alpha \right) }\frac{d}{dt}\int \limits ^{t}_{0}\dfrac{V(S,\eta )-V(S,T)}{(\eta -t)^\alpha }d\eta , &{} \quad 0<\alpha <1, \\ \\ \frac{\partial {V(S,t)}}{{\partial t}},&{}\quad \alpha =1. \end{array}\right. } \end{aligned}$$
(2)

One could clearly observe that when \(\alpha = 1\), the model (1) corresponds to the classical B–S model. Suppose \(t = T-\uptau \), for \(0<\alpha < 1\) one gets

$$\begin{aligned} \begin{aligned} \frac{\partial ^\alpha V({S},t)}{\partial t^\alpha }&=\frac{1}{\varGamma \left( 1-\alpha \right) }\frac{-d}{d\uptau }\int \limits ^{T}_{t}\dfrac{V(S,\eta )-V(S,T)}{(\eta -(T - \uptau ))^\alpha }d\eta \\&=\frac{1}{\varGamma \left( 1-\alpha \right) }\frac{-d}{d\uptau }\int \limits ^{T}_{T - \uptau }\frac{V(S,\eta )-V(S,T)}{(\eta -(T - \uptau ))^\alpha }d\eta \\&=\frac{-1}{\varGamma \left( 1-\alpha \right) }\frac{d}{d\uptau }\int \limits ^{\uptau }_{0}\frac{V(S,T - \xi )-V(S,T)}{{(\eta -\xi )}^\alpha }d\xi . \end{aligned} \end{aligned}$$

In addition, assuming \(x = \ln S\) and defining \(U(x,\uptau )=V(e^x,T-\uptau )\), then model (1) can be restated according to below expression:

$$\begin{aligned} \left\{ \begin{array}{lll} \frac{{\partial }^\alpha U({x},\uptau )}{{\partial \uptau }^\alpha }=\frac{1}{2} {\sigma }^{2}{}\frac{{\partial }^2 U({x},\uptau )}{{\partial x}^2 }+(r-\frac{1}{2}\sigma ^2-D)\frac{{\partial } U({x},\uptau )}{\partial x} -rU(x,\uptau ), &{}\\ U(B_d, \uptau )=p(\uptau ), U(B_u,\uptau ) = q(\uptau ),\\ U(x, 0) = u(x), \end{array} \right. \end{aligned}$$
(3)

where the fractional derivative is

$$\begin{aligned} {}_{0}D_{\uptau }^\alpha U(x,\uptau )=\frac{1}{\varGamma \left( 1-\alpha \right) }\frac{d}{d\uptau }\int \limits ^{\uptau }_{0}\dfrac{U(x,\eta )-U(x,0)}{(\uptau -\eta )^\alpha }d\eta ,\qquad (0<\alpha <1). \end{aligned}$$
(4)

In order to well estimate the approximation solution of the aforesaid model, it is necessary to work in a bounded domain. Accordingly, we truncate the domain of variable x in Eq. (1) to a finite interval \((B_d, B_u)\). Thus, we will extend a numerical approach for the more general problem

$$\begin{aligned} \left\{ \begin{array}{lll} {}_{0}D_{\uptau }^\alpha U(x,\uptau )=a\frac{{\partial }^2 U({x},\uptau )}{{\partial x}^2 }+b\frac{{\partial } U(x,\uptau )}{\partial x}-cU(x,\uptau )+f(x,\uptau ),\\ U(B_d, \uptau )=p(\uptau ), U(B_u,\uptau ) = q(\uptau ),\\ U(x, 0) = u(x), \end{array} \right. \end{aligned}$$
(5)

where \(a=\frac{1}{2}\sigma ^2>0, b = r - D-a, c = r > 0 \). Here a source term \(f(x,\uptau )\) is selected for the aims of validation in Sect. 5.

1.1 Paper Outline

The main motivation of the current research is to constitute a numerical approach based on MLS method to determine appropriate semi-discrete solutions of the time fractional B–S model (TFBSM). Since the newly developed method is a meshless scheme, it does not require any background mesh structure to achieve semi-discrete solutions of the problem under consideration, and the approximation solutions are constructed entirely based on a set of scattered nodes. The remainder of this paper is organized in the following manner: Sect. 2 has an overview of some necessary definitions and properties of the MLS approximation scheme. In Sect. 3, firstly, we discretize the time fractional derivative of the aforementioned equation by a scheme of order \(2-\alpha \) and afterward we will use the MLS scheme to approximate the spatial derivatives. In Sect. 4, stability and convergence of the proposed approximate approach are proven. We report the numerical experiments of solving the mentioned equation in Sect. 5. Section 6 is drawn to a concise conclusion. Finally some references are given at the end.

2 Approximation Based on MLS Method

2.1 MLS Methodology

Over the last decade, several meshless methods have been introduced for approximating different kinds of ordinary and partial differential equations. These methods have been proposed as alternative numerical approaches to tackle difficulty and weaknesses of traditional finite element methods, such as element free Galerkin method, reproducing kernel particle method, local Petrov–Galerkin method, etc. For more details see Liu and Gu (2004) and references therein. The MLS method which was first introduced by Shepard (1968) and then developed by some researchers, has been used for construction surface and interpolation of scattered data (Franke and Nielson 1980; Lancaster and Salkauskas 1981; McLain 1976) and also widely used in the approximation theory. In Zhuang et al. (2011), an implicit meshless approach is described which is based on the MLS approximation using spline weight functions for the numerical simulation of fractional advection–diffusion equation. Tayebi et al. (2017) solved two-dimensional variable-order time fractional advection–diffusion equation by using a meshless method based on the MLS approximation. Also, Mardani et al. (2017) proposed the MLS approximation in combination with the finite difference method for solving the time fractional advection–diffusion equation with variable coefficients.

2.2 The Moving Least Squares (MLS) Approximation

The MLS approximation is one of the widely utilized meshless methods due to its attractive properties of accuracy, robustness, and higher order of continuity. Assume that the nodes \((x_i, u_i), i =1,\ldots , N\) in the domain \(\varOmega \) are defined. The MLS approximation for u(x) can be expressed at x by:

$$\begin{aligned} u^{h}(x)=\sum \limits _{i=1}^{m}p_{i}(x){\mathbf{a}}_{i}(x) ={{\mathbf {p}}}^{T}(x){\mathbf{a}}(x), \end{aligned}$$
(6)

where \({\mathbf{p}}^{T}(x)=[p_{1}(x),\ldots ,p_{m}(x)]\) is a complete monomials basis of order m and \({\mathbf{a}}(x)\) is a column vector comprising coefficients \({\mathbf{a}}_{i}(x), i = 1, 2,\ldots , m,\) which are functions of x and need to be achieved. For instance, the linear basis is \({\mathbf{p}}^{T}(x)= [1~x]\) and the quadratic basis is \({\mathbf{p}}^{T}(x)=[1~ x ~x^2].\) The unknown coefficients \({{\mathbf {a}}}_{i}(x)\) are obtained by minimizing the following weighted discrete \(L_{2}\) norm as:

$$\begin{aligned} {\mathbb {J}}=\sum \limits _{i=1}^{N}w_{i}(x))(u^{h}(x_{i},x) -u_{i})^{2}=\sum \limits _{i=1}^{N}w_{i}(x))({\mathbf{p}}^{T}(x){\mathbf {a}}(x)-u_{i})^{2}, \end{aligned}$$
(7)

where \(w_i(x) \) is the weight function associated with the node i and N represents the number of nodes in the neighborhood of x, where the weight function \(w_i(x)>0\).

The stationarity of \({\mathbb {J}}\) in Eq. (7) with respect to \({\mathbf{a}}(x)\), i.e. \(\frac{\partial {\mathbb {J}}}{\partial \mathbf{a}}=0\) results in the following equations:

$$\begin{aligned}&\sum \limits _{i=1}^{N}w_{i}(x)2p_{1}(x_{i})({\mathbf{p}}^{T}(x_{i}){\mathbf{a}}(x_{})-u_{i})=0,\\&\sum \limits _{i=1}^{N}w_{i}(x)2p_{2}(x_{i})({\mathbf{p}}^{T}(x_{i}){\mathbf{a}}(x_{})-u_{i})=0,\\&~~\vdots \\&\sum \limits _{i=1}^{N}w_{i}(x)2p_{m}(x_{i})({\mathbf{p}}^{T}(x_{i}){\mathbf{a}}(x_{})-u_{i})=0. \end{aligned}$$

After simplification, we can write the aforementioned equations in the following form:

$$\begin{aligned} \sum \limits _{i=1}^{N} w_{i}(x){\mathbf{p}}(x_{i}){\mathbf{p}}^{T}(x_{i}){\mathbf{a}}(x)=\sum \limits _{i=1}^{N}w_{i}(x){\mathbf{p}}(x_{i})u_{i}. \end{aligned}$$
(8)

Denote the matrices \(\mathbf{A}(x)\), \(\mathbf{B}(x)\) and column vector \(\mathbf{u}\) as follows:

$$\begin{aligned} {\mathbf{A}}(x)&=\sum \limits _{i=1}^{N}w_{i}(x){\mathbf{p}}(x_{i}) {\mathbf{p}}^T(x_{i}),\\ {\mathbf{B}}(x)&=[w_{1}{\mathbf{p}}(x_{1})~ w_{2}{\mathbf{p}}(x_{2}) \ldots w_{N}{\mathbf{p}}(x_{N})],\\ {\mathbf{u}}&=[u_{1}~u_{2}\ldots u_{N}], \end{aligned}$$

Then, we can rewrite Eq. (8) in the following compact form:

$$\begin{aligned} {\mathbf{A}}(x){\mathbf{a}}(x)={\mathbf{B}}(x){\mathbf{u}}. \end{aligned}$$
(9)

After calculating \({\mathbf{a}}(x)\) from Eq. (9) and substituting into Eq. (7), the MLS approximation can be expressed as follows:

$$\begin{aligned} u^{h}(x)=\varPhi ^{T}(x)\cdot {\mathbf{u}}=\sum \limits _{j=1}^{N} \phi _{j}(x)u_{j}, \end{aligned}$$
(10)

where

$$\begin{aligned} \varPhi ^{T}(x)=[\phi _{1}(x)\ldots \phi _{n}(x)] ={\mathbf{p}}^{T}(x){\mathbf{A}}^{-1}(x){\mathbf{B}}(x), \end{aligned}$$
(11)

or

$$\begin{aligned} \phi _{j}(x)={\mathbf{p}}^{T}(x)[{\mathbf{A}}(x)]^{-1}w_{j}{\mathbf{p}}(x_{j}). \end{aligned}$$

In the MLS approximation, the function \(\phi _{j}(x)\) is usually said the shape function relating to the nodal \(x_{j}\). The first derivative of \(\varPhi ^{T}(x)\) with respect to x is achieved in Belytschko et al. (1994) as:

$$\begin{aligned} \varPhi ^{T}_{x}(x)={\mathbf{p}}_{x}^{T}(x){\mathbf{A}}_{x}^{-1}(x) {\mathbf{B}}(x)+{\mathbf{p}}_{x}^{T}(x){\mathbf{A}}_{x}^{-1}(x) {\mathbf{B}}(x)+{\mathbf{p}}_{}^{T}(x){\mathbf{A}}_{}^{-1}(x) {\mathbf{B}}_{x}(x), \end{aligned}$$
(12)

where \({\mathbf{A}}_{x}^{-1}(x)=({\mathbf{A}}_{}^{-1}(x))_{x}\) represents the first derivative of \({\mathbf{A}}^{-1}(x)\) with respect to x which is defined by:

$$\begin{aligned} {\mathbf{A}}_{x}^{-1}(x)=-({\mathbf{A}}_{}^{-1}(x)){\mathbf{A}}_{x}(x) ({\mathbf{A}}_{}^{-1}(x)), \end{aligned}$$
(13)

where \(()_{x}\) represents d() / dx.

Also, the second derivative of \(\varPhi ^{T}(x)\) with respect to x is achieved in Fries and Matthies (2004) as:

$$\begin{aligned} \varPhi ^{T}_{xx}(x)&={\mathbf{p}}_{xx}^{T}(x){\mathbf{A}}_{}^{-1}(x) {\mathbf{B}}(x)+{\mathbf{p}}_{x}^{T}(x){\mathbf{A}}_{xx}^{-1}(x) {\mathbf{B}}(x)+{\mathbf{p}}_{}^{T}(x){\mathbf{A}}_{}^{-1}(x) {\mathbf{B}}_{xx}(x)\nonumber \\&\quad +2{\mathbf{p}}_{x}^{T}(x){\mathbf{A}}_{x}^{-1}(x) {\mathbf{B}}(x)+2{\mathbf{p}}_{x}^{T}(x){\mathbf{A}}_{}^{-1}(x) {\mathbf{B}}_{x}(x)+2{\mathbf{p}}_{}^{T}(x){\mathbf{A}}_{x}^{-1}(x) {\mathbf{B}}_{x}(x), \end{aligned}$$
(14)

where \({\mathbf{A}}^{-1}_{xx}(x) = ({\mathbf{A}}^{-1}(x))_{xx}\) represents the second derivative of Eq. (13) with respect to x which is appointed by:

$$\begin{aligned} {\mathbf{A}}^{-1}_{xx} (x) = -({\mathbf{A}}_{x}(x){\mathbf{A}}_{x}(x){\mathbf{A}}^{-1}(x) \,{+}\, {\mathbf{A}}^{-1}(x){\mathbf{A}}_{xx}(x){\mathbf{A}}^{-1}(x) \,{+}\, {\mathbf{A}}^{-1}(x){\mathbf{A}}_{x}(x){\mathbf{A}}_{x}^{-1}(x)), \end{aligned}$$

where \(()_{xx}\) represents \(d^2()/dx^2\).

It is worthy of mention that different weight functions can be utilized to construct shape functions. In this research, we employ the Gaussian weight functions to construct shape functions. The Gaussian weight function relating to the node i is usually given by:

$$\begin{aligned} w_{i}(x)={\left\{ \begin{array}{ll} \dfrac{\exp \left[ -\left( \frac{d_i}{\mu }\right) ^2\right] - \exp \left[ -\left( \frac{h_{i}}{\mu }\right) ^2\right] }{1- \exp \left[ -\left( \frac{h_{i}}{\mu }\right) ^2\right] },&{}\quad 0\le d_{i}<h,\\ 0,&{} \quad d_{i}\ge h_{i}, \end{array}\right. } \end{aligned}$$
(15)

where \(d_i = |x - x_i|\), \(\mu \) is a constant controlling the shape of the weight function and \(h_{i}\) is the radius of influence domain or radius of the support domain of the node \(x_{i}\). The value of \(\mu \) is usually selected experimentally but the typical value of \(\mu \) is between \(\frac{h_{i}}{2}\) and \(\frac{h_{i}}{3}\) (Li et al. 2005).

In order to simplify the computations, we utilize the following equivalent form of the Gaussian weight functions:

$$\begin{aligned} w_{i}(x)={\left\{ \begin{array}{ll} \dfrac{\exp (-s^2r^2)-\exp (-s^2)}{1-\exp (-s^2)},&{} \quad 0\le r<1,\\ 0,&{} \quad r\ge 0, \end{array}\right. } \end{aligned}$$
(16)

where \(r =\frac{ |x-x_i|}{h_{i}}\) and \(s = \frac{h_{i}}{\mu }\).

3 Implementation Method: Semidiscretization in Time and Scheme Construction in Space

In this section, we explain the approximation method for the solution of Eq. (1). The domain interval [ab] has been partitioned into N elements by having uniform step size h with knots \(x_i, i=0,1,2,\ldots ,N;\) such that \(B_{d }= x_0< x_1< x_2<\cdots < x_N = B_{u}, h = x_i - x_{i-1} = (B_u-B_d)/N, i=1,2,\ldots , N\) where \({x}_1, {x}_N\) are the boundary points, and the other are inner points. Let \(\uptau _n = n\delta t, n = 0,1,2,3,\ldots , M\), where \(\delta t = T/M\) is the temporal step size and T is the final time. Suppose that \(U(x, \uptau )\in C^{(1) }\) be in the time sense \(\uptau \), for \(0\le \alpha <1\), the modified Riemann–Liouville derivative

$$\begin{aligned} \begin{aligned} {}_{0}D_{\uptau }^\alpha U(x,\uptau )&=\frac{1}{\varGamma (1-\alpha )}\frac{d}{d\uptau } \int \limits ^{\uptau }_{0}\frac{U(x,\eta )-U(x,0)}{(\uptau -\eta )^\alpha } {d\eta }\\&=\frac{1}{\varGamma (1-\alpha )}\frac{d}{d\uptau } \int \limits ^{\uptau }_{0}\frac{U(x,\eta )}{(\uptau -\eta )^\alpha }{d\eta } -\dfrac{1}{\varGamma (1-\alpha )}\dfrac{d}{d\uptau } \int \limits ^{\uptau }_{0}\dfrac{U(x,0)}{(\uptau -\eta )^\alpha }{d\eta }\\&=\frac{1}{\varGamma (1-\alpha )}\frac{d}{d\uptau }\int \limits ^{\uptau }_{0}\dfrac{U(x,\eta )}{(\uptau -\eta )^\alpha }{d\eta } -{U(x,0)}\frac{\uptau ^{-\alpha }}{\varGamma (1-\alpha )}\\&=\dfrac{1}{\varGamma (1-\alpha )}\int \limits ^{\uptau }_{0} \dfrac{\partial U(x,\eta )}{\partial {\eta }}(\uptau -\eta )^{-\alpha } d{\eta }={}^C_{0}D_{\uptau }^\alpha U(x,\uptau ). \end{aligned} \end{aligned}$$

Here the operator \({}^C_{0}D_{\uptau }^\alpha U(x,\uptau )\) is the Caputo derivative (Podlubny 1999). Now, we use the finite difference scheme to analogize the time fractional derivative term

$$\begin{aligned} \frac{\partial ^\alpha U({x},\uptau _{n+1})}{\partial t^\alpha }&=\frac{1}{\varGamma (1-\alpha )}\int _0 ^{\uptau _{n+1}}{\frac{{\partial }u({x},\xi )}{{\partial \xi }}\frac{1}{(\uptau _{n+1}-\xi )^{\alpha }}}d\xi \nonumber \\&=\frac{1}{\varGamma (1-\alpha )}\sum \limits _{k=0}^n\int _{k\delta t}^{(k+1)\delta t}{\frac{{\partial }u({x},\xi )}{{\partial \xi }}}\frac{1}{(\uptau _{n+1}-\xi )^{\alpha }}d\xi \nonumber \\&\approx \frac{1}{\varGamma (1-\alpha )}\sum \limits _{k=0}^n\int _{k\delta t}^{(k+1)\delta t}{\frac{{\partial }U({x},\xi _k)}{{\partial \xi }}\frac{1}{(\uptau _{n+1}-\xi )^{\alpha }}}d\xi . \end{aligned}$$
(17)

Now, the first order time derivative taking into account the forward difference formula can be approximated:

$$\begin{aligned} \frac{{\partial }U({x},\xi _{k})}{{\partial \xi }}=\frac{U({x},{\uptau _{k+1})}-U({x},\uptau _k)}{\delta t}+R^{k+1}_{1}(x), \end{aligned}$$

where \(\xi _{k} \in [\uptau _{k},\uptau _{k+1}].\) In view of Taylor’s Theorem, the truncation error can be calculated as:

$$\begin{aligned} |R^{k+1}_{1}(x)|\le C_{1}\delta t, \quad or \quad R^{k+1}_{1}={\mathcal {O}}(\delta t). \end{aligned}$$

Now, we obtain the following implicit discrete scheme for Eq. (17)

$$\begin{aligned}&\frac{{\partial }^\alpha U({x},\uptau _{n+1})}{{\partial t}^\alpha }\nonumber \\&\quad =\frac{1}{\varGamma (1-\alpha )}\sum \limits _{k=0}^n\biggl (\frac{U({x},{\uptau _{k+1})}-U({x},\uptau _k)}{ \delta t}+{\mathcal {O}}( \delta t )\bigg )\int _{k\delta t}^{(k+1)\delta t}{\frac{1}{(\uptau _{n+1}-\xi )^{\alpha }}}d\xi \nonumber \\&\quad ={\dfrac{1}{\varGamma (1-\alpha )}}\sum \limits _{k=0}^n\bigg (\frac{U({x},{\uptau _{k+1})}-U({x},\uptau _k)}{ \delta t}+{\mathcal {O}}( \delta t )\bigg )\int _{k\delta t}^{(k+1)\delta t}{\frac{dr}{r^{\alpha }}}\nonumber \\&\quad ={\left\{ \begin{array}{ll} \frac{\delta t^{-\alpha }}{\varGamma (2-\alpha )}(U^{n+1}-U^{n})+\frac{\delta t^{-\alpha }}{\varGamma (2-\alpha )}{\sum \limits _{k=1}^{n}\bigg [(k+1)^{1-\alpha } - k^{1-\alpha }\bigg ](U^{n+1-k}-U^{n-k})}&{}\quad n\ge 1\nonumber \\ \frac{\delta t^{-\alpha }}{\varGamma (2-\alpha )}{(U^1-U^0)}&{}\quad n=0 \end{array}\right. }\nonumber \\&\quad = {\left\{ \begin{array}{ll} a_0\bigg [(U^{n+1}-U^{n})+{\sum \limits _{k=1}^n b_k(U^{n+1-k}-U^{n-k})}\bigg ],&{} n\ge 1,\\ \\ a_0{(U^1-U^0)},&{}n=0, \end{array}\right. }+{\mathcal {O}}(\delta t^{2-\alpha }), \end{aligned}$$
(18)

where \(a_0=\frac{\delta t^{-\alpha }}{\varGamma (2-\alpha )}\), \(b_k=(k+1)^{1-\alpha } - k^{1-\alpha },(k=0,1,\ldots ,n)\), \(U^{0}=u({x},\uptau =0)=u({x})\).

By replacing Eq. (18) into Eq. (1), we discretize time derivative of time fractional B–S equation using a classic finite difference formula and space derivatives between successive two time levels n and \(n+1\) as below:

$$\begin{aligned} \begin{aligned}&a_\alpha U^{n+1}-a{\nabla }^2 U^{n+1}-b{\nabla } U^{n+1}+ c U^{n+1}\\&\quad = {\left\{ \begin{array}{ll} a_\alpha \left[ U^{n}-{\sum \limits _{k=1}^n b_k(U^{n+1-k}-U^{n-k})}\right] +f^{n+1},&{} \quad n\ge 1,\\ \\ a_\alpha {U^0}+f^{1},&{}\quad n=0, \end{array}\right. } +R_{}^{k+1}, \end{aligned} \end{aligned}$$

where \(\nabla \) is the gradient differential operator and \(f^{n+1}=f(x,\uptau _{n+1});~n=0,1,\ldots ,M\). Also, there exists a constant \({\tilde{C}}\) such that

$$\begin{aligned} R_{}^{k+1}(x)\le {\tilde{C}}\delta t^{2-\alpha }. \end{aligned}$$

Now, defining \(u^{k}\) as the approximation of \(U^{k}\) and eliminating error the small term \( R_{}^{k+1}\), then a semi-discrete scheme is obtained as follows:

$$\begin{aligned}&a_\alpha u^{n+1}-a{\nabla }^2 u^{n+1}-b{\nabla } u^{n+1}+ c u^{n+1} \nonumber \\&\quad = {\left\{ \begin{array}{ll} a_\alpha \left[ u^{n}-{\sum \limits _{k=1}^n b_k(u^{n+1-k}-u^{n-k})}\right] +f^{n+1},&{} n\ge 1,\\ \\ a_\alpha {u^0}+f^{1},&{}n=0. \end{array}\right. } \end{aligned}$$
(19)

In order to use MLS approximation scheme, we collocate N different points \(\lbrace { {x}}_j |j=1,\ldots ,N\rbrace \) where \({x}_1\) and \( {x}_N \) are boundary points and the other \((N-2)\) points are inner points \(\lbrace {x}_j |j=2,\ldots ,N-1\rbrace \). The numerical solution of \(u({x}_i,\uptau _{n+1}) \) at a point of interest \({ {x}}_i\) is expanded as follows:

$$\begin{aligned} u_{i}^{n+1}=u({x}_{i},\uptau _{n+1}) = \sum \limits _{j = 1}^ {N} \lambda _j^{n+1} \phi _{j}(x_{i}), \end{aligned}$$
(20)

where \(\phi _{j}, ~j = 1, 2,\ldots , N\) are the shape functions of the MLS approximation and \( \lambda _{1}^{n}, \lambda _{2}^{n},\ldots , \lambda _{2}^{N}\) are unknown coefficients which require to be obtained. After that, Eq. (20) can be rewritten according to below matrix format:

$$\begin{aligned}{}[{\mathbf{u}}]={\mathbf{M}}[{{\lambda }}]^n, \end{aligned}$$
(21)

where \([{\mathbf{u}}]^n=[u^{n}_{1},u^{n}_{2},\ldots ,u^{n}_{N}]^{T},\)\([{{\lambda }}]^n=[\lambda ^{n}_{1},\lambda ^{n}_{2},\ldots ,\lambda ^{n}_{N}]^{T},\) and A is an \(N\times N\) matrix as below:

$$\begin{aligned} {\mathbf{M}}=\begin{bmatrix} \phi _{11}&\quad \cdots&\quad \phi _{N1}\\ \vdots&\quad \ddots&\quad \vdots \\ \phi _{1N}&\quad \cdots&\quad \phi _{NN}\\ \end{bmatrix}, \end{aligned}$$
(22)

where \(\phi _{ji} = \phi _j(x_i)\). Assume that there are \(N-2\) internal nodes and 2 boundary nodes. Then, the matrix \({\mathbf{M}}\) can be split into \({\mathbf{M}} = {\mathbf{M}}_{b} + {\mathbf{M}}_{d}\) where the elements of \({\mathbf{M}}_{d} \) (matrix-associated internal) and \({\mathbf{M}}_{b}\)(matrix-associated boundary) are as follows:

$$\begin{aligned} {\mathbf{M}}_d&=[\phi _{ij}: 2 \le i \le N-1,1 \le j \le N ~\texttt {and }~0 \,\texttt { elsewhere}],\nonumber \\ {\mathbf{M}}_b&=[\phi _{ij}: i=1,N, 1 \le j \le N ~\texttt {and }~0 \, \texttt { elsewhere}] \end{aligned}$$
(23)

Also, we discrete \(u_{x}\) and \(u_{xx}\) as follows:

$$\begin{aligned} u_{x}^{n}(x_{i})= & {} \sum \limits _{j=1}^{N} \lambda _{j}^{n}\frac{d\phi _{j}(x)}{dx}=\sum \limits _{j=1}^{N} \lambda _{j}^{n}\phi _{j}^{'}(x_{i}), \end{aligned}$$
(24)
$$\begin{aligned} u_{xx}^{n}(x_{i})= & {} \sum \limits _{j=1}^{N} \lambda _{j}^{n}\frac{d^{2}\phi _{j}(x)}{dx^2}=\sum \limits _{j=1}^{N} \lambda _{j}^{n}\phi _{j}^{''}(x_{i}), \end{aligned}$$
(25)

where \(\phi _{j}^{'}(x_{})\) and \(\phi _{j}^{''}(x_{}),\) for \(j=1,2,\ldots ,N\) are determined from Eqs. (12) and (14), respectively. By substituting the collocation nodes into Eqs. (24) and (25), it concludes that:

$$\begin{aligned} u_{x}^{n}(x_{i})= & {} \sum \limits _{j=1}^{N} \lambda _{j}^{n}\phi _{j}^{'}(x_{i}),\qquad i=2,\ldots ,N-1, \end{aligned}$$
(26)
$$\begin{aligned} u_{xx}^{n}(x_{i})= & {} \sum \limits _{j=1}^{N} \lambda _{j}^{n}\phi _{j}^{''}(x_{i}),\qquad i=2,\ldots ,N-1, \end{aligned}$$
(27)

Rewriting of above equations in the matrix form can be illustrated as follows:

$$\begin{aligned}{}[{\mathbf{u}}_x]^n={\mathbf{C}}[\lambda ]^n,\qquad [{\mathbf{u}}_{xx}]^n={\mathbf{D}}[\lambda ]^n, \end{aligned}$$
(28)

in which

$$\begin{aligned} {\mathbf{C}}&=[\phi ^{'}_{ij}: 2 \le i \le N-1,1 \le j \le N ~\texttt {and }~0 \,\texttt { elsewhere}],\nonumber \\ {\mathbf{D}}&=[\phi ^{''}_{ij}: 2 \le i \le N-1,1 \le j \le N ~\texttt {and }~0\, \texttt { elsewhere}]. \end{aligned}$$
(29)

It should be noted that the derivative operator is only utilized for internal nodes. Now, by replacing Eqs. (21) and (28) into Eq. (19) and substituting the collocation nodes, one gets the following recurrence relation:

$$\begin{aligned}&[(a_{\alpha }+c){\mathbf{M}}_d+{\mathbf{M}}_b-a{\mathbf{D}} -b{\mathbf{C}}]\lambda ^{n+1}=[a_{\alpha }{\mathbf{M}}_{d}]\lambda ^{n}+\mathbf{{G}}^{n+1},\nonumber \\&\mathbf{{G}}^{n+1}=\mathbf{{G}}_{1}^{n+1}+\mathbf{{G}}_{2}^{n+1}+\mathbf{{F}}^{n+1}, \end{aligned}$$
(30)

where

$$\begin{aligned} \mathbf{{G}}_{1}^{n+1}&=[g_{1}(t^{n+1}),0,\ldots ,0,g_{2}(t^{n+1})]^{T},~~\mathbf{{G}}_{2}^{n+1}=\left\{ - a_{\alpha } {\sum \limits _{k=1}^n b_k({\mathbf{u}}^{n+1-k}-{\mathbf{u}}^{n-k})}\right\} ^{T},\\ \mathbf{{F}}^{n+1}&=[0,f^{n+1}_{2},\ldots ,f^{n+1}_{N-1},0]. \end{aligned}$$

Therefore, we can obtain

$$\begin{aligned} \lambda ^{n+1}={{\mathbf{K}}}^{-1}{\mathbf{L}}\lambda ^{n}+{\mathbf{K}}^{-1}\mathbf{{G}}^{n+1}, \end{aligned}$$
(31)

in which

$$\begin{aligned} {\mathbf{K}}&=(a_{\alpha }+c){\mathbf{M}}_d+{\mathbf{M}}_{b}-a{\mathbf{D}} -b{\mathbf{C}},\\ {\mathbf{L}}&=a_{\alpha }{\mathbf{M}}_{d}. \end{aligned}$$

In view of Eqs. (21) and (31), we can write

$$\begin{aligned} {\mathbf{U}}^{n+1}={\mathbf{M}}{\mathbf{K}}^{-1}{\mathbf{L}}{\mathbf{M}}^{-1} {\mathbf{U}}^{n}+{\mathbf{M}}{\mathbf{K}}^{-1}{} \mathbf{{G}}^{n+1}. \end{aligned}$$
(32)

The numerical solution can be obtained from this scheme at any time level n. The initial value \({\mathbf{U}}^0\) is fulfilled by help of the the initial condition \(u(x,0) = u_0(x)\). It should be noted that the matrix \({\mathbf{H}}={\mathbf{M}}{\mathbf{K}}^{-1}{\mathbf{L}}{\mathbf{M}}^{-1}\) is not normal, however very close to normal. In the next section, we will establish the stability and convergence of the scheme (9). The results of this section can be extracted in the following algorithm.

figure a

4 Stability and Convergence of the Numerical Scheme

In order to evaluate the discretization error, we review the formula explained in Eq. (17). First of all, based the finite difference approach, the time fractional derivative in Eq. (17) is approximated as follows:

$$\begin{aligned} \frac{\partial u(x,t)}{\partial t}=\frac{u(x,t+\delta t)-u(x,t)}{\delta t}+{\mathcal {O}}(\delta t), \end{aligned}$$

which leads to an error of order \({\mathcal {O}}({\delta t}^{2-\alpha })\). In the second step, \(u^{n}(x)\) is approximated by the MLS method. The error analysis of the MLS approximation has been established by some published papers e.g. Armentano (2001), Armentano and Durán (2001) and Zuppa (2003a, b).

In this paper, we utilize the results obtained in Armentano and Durán (2001); Uddin and Haq (2011) for error estimation, stability and convergence of the MLS method. Let \(R>0\) be given and \(w\ge 0\) be a function such that \(supp ~w\subset {\overline{B}}_{R}(0) = \{z |~ |z| \le R\} \) and \(X_{R} = \{x_{1},\ldots , x_{n}\}\) be a set of points in \(\varOmega \subset {\mathbb {R}}\) and \(u_{j} = u(x_j), 1 \le j \le n\). Let \({p_1,\ldots , p_m}\) be a set of basis polynomials in the polynomial space \({\mathcal {P}}_m\) with \(m<<n\), it means that n is very larger than m. In order to have the well defined MLS approximation, we require to guarantee that the minimization problem has a unique solution, which is equipollent to the non-singularity of matrix \({\mathbf{A}}(x)\) defined in Eq. (12). Accordingly, we put

$$\begin{aligned} \langle f,g \rangle _{x}=\sum \limits _{i=1}^{n}w(x-x_{i})f(x_{i})g(x_{i}), \end{aligned}$$

then \(\Vert f \Vert _{x}=(\langle f,g \rangle _{x})^{\frac{1}{2}}\)is a discrete norm on the polynomial space \({\mathcal {P}}_m\). The error estimations are estimated on the system of nodes and the weight functions by using the following assumption.

Property\(R_{p}\) (Zuppa 2003a). For any \(x\in {\overline{\varOmega }}\), the matrix \({\mathbf{A}}(x)\) defined in Eq. (9) is non-singular.

Definition 1

Let \( x \in {\overline{\varOmega }}\). The star of x, st(x) is defined as \(st(x) = \{i|w(x - x_i) \ne 0\}\).

Theorem 1

(Zuppa 2003a) A necessary condition for property \(R_p\) is that for any \(x\in {\overline{\varOmega }}\)\(n = card(st(x)) \ge card({\mathcal {P}}_m) = m + 1\).

Theorem 2

(Armentano and Durán 2001) Assume that \({\mathbf{A}}(x)\) satisfies property \(R_p\), then for any \(x\in {\overline{\varOmega }}\) there exists \({\widehat{u}}(x)\in {\mathcal {P}}_m\) which satisfies,

$$\begin{aligned} ||u-{\widehat{u}}(x)||_{x}\le ||u-p||_{x},\qquad \forall p \in {\mathcal {P}}_m. \end{aligned}$$
(33)

The objective is to evaluate error estimation in terms of the parameter R, which plays the role of the support size of the weight function. For the error analysis, the following properties of the weight function and distribution of points are required, as introduced in Armentano and Durán (2001):

  1. 1.

    Given \(x \in \varOmega \) there exist at least \(m+1\) points \(x_j \in X_{R} \cap B_{\frac{R}{2}}(x).\)

  2. 2.

    \(\exists ~ c_{0} > 0 \) such that \(w(z)\ge c_{0},\)\(\forall z \in B_{\frac{R}{2}}(0). \)

  3. 3.

    \(w\in C^{1}(B_R(0))\cap W^{1,\infty }({\mathbb {R}})\) and \(\exists ~ c_{1} \) such that \(||w^{'}||_{L^{\infty }({\mathbb {R}})}\le \frac{c_{1}}{R}\).

  4. 4.

    \(\exists ~ c_{p}\) such that \(\frac{R}{\sigma }\le c_{p}\) where \(\sigma =\min |x_i - x_k|\) is the minimum over the \(m+1\) points in condition 1.

  5. 5.

    \(\exists ~ c_{k}\) such that for all \(x \in \varOmega \), \(card\{X_R \cap B_{2R}(0)\}<c_{k}\).

  6. 6.

    \(w\in C^{2}(B_R(0))\cap W^{2,\infty }({\mathbb {R}})\) and \(\exists ~ c_{2}\) such that \(||w^{''}||_{L^{\infty }({\mathbb {R}})}\le \frac{c_{2}}{{R}}\).

Theorem 3

(Armentano and Durán 2001) If \(u \in C^{m+1}({\overline{\varOmega }})\) and properties 1–5 hold then, there exists \(C = C(c_0, c_1, c_p, c_k, m)\) such that

$$\begin{aligned} \Vert u^{'}-{\widehat{u}}^{'}\Vert \le C|| u^{m+1}||_{L^{\infty }(\varOmega )}R^{m}. \end{aligned}$$

Theorem 4

(Armentano and Durán 2001) Let \(m\ge 1\), if \(u\in C^{m+1}({\overline{\varOmega }})\) and properties 1–6 hold then, there exists \(C = C(c_0, c_1,c_2, c_p, c_k, m)\) such that

$$\begin{aligned} \Vert u^{''}-{\widehat{u}}^{''}\Vert \le C|| u^{m+1}||_{L^{\infty }(\varOmega )}R^{m-1}. \end{aligned}$$

Clearly, the error of the presented method will be affected by \(\delta t\) and the error of the first and second derivatives in Theorems 3 and 4. We assume that the scheme (32) is pth order accurate in space then we have

$$\begin{aligned} {\mathbf{u}}^{n}={\mathbf{M}}{\mathbf{K}}^{-1}{\mathbf{L}}{\mathbf{M}}^{-1} {\mathbf{u}}^{n}+{\mathbf{M}}{\mathbf{K}}^{-1}\mathbf{{G}}^{n+1}+{\mathcal {O}}((\delta t)^{2-\alpha }+h^{p}),\qquad \delta t\rightarrow 0,\quad h\rightarrow 0,\nonumber \\ \end{aligned}$$
(34)

for all n. Let us define \({{\zeta }}^n= {\mathbf{u}}^n - {\mathbf{U}}^n\), by subtracting Eq. (32) from Eq. (34) one gets

$$\begin{aligned} {\zeta }^{n+1}=\mathbf{{H}}{\zeta }^n+ {\mathcal {O}}((\delta t)^{2-\alpha }+h^{p}),\qquad \delta t\rightarrow 0,\quad h\rightarrow 0, \end{aligned}$$
(35)

where the matrix \(\mathbf{{H}}={ \mathbf{M}}{} \mathbf{{K}}^{-1}{} \mathbf{{L}}{ \mathbf{M}}^{-1}\) is called the amplification matrix. By Lax–Richtmyer definition of stability the scheme in Eq. (35) is called to be stable if

$$\begin{aligned} ||\mathbf{{H}}||\le 1, \end{aligned}$$
(36)

when the matrix \(\mathbf{{H}}\) is normal then \(||\mathbf{{H}}||=\rho (\mathbf{{H}})\) however the inequality \(||\mathbf{{H}}||\le \rho (\mathbf{{H}})\) always hold. It is assume that the initial condition and the solution of the given differential equation must be sufficiently smooth and h to be enough small. In order to keep \(\eta =\delta t / h^r\) is constant we must have \(h\rightarrow 0\). So there exist a constant \({\tilde{C}}\) such that

$$\begin{aligned} ||\zeta ||^{n+1}\le ||\mathbf{{H}}||||{\zeta }||{\tilde{C}}((\delta t)^{2-\alpha }+h^{p}),\qquad \delta t\rightarrow 0,\quad h\rightarrow 0, \end{aligned}$$
(37)

Since the residual \({{\zeta }}^{n}\) obey zero initial conditions as well as zero boundary conditions, so \({\zeta }^0=0\). Hence, taking into account principle of mathematical induction one gets

$$\begin{aligned} ||\zeta ||^{n+1}\le (1+||\mathbf{{H}}||^{2}+\cdots +||\mathbf{{H}}||^{n-1}){\tilde{C}}((\delta t)^{2-\alpha }+h^{p}),\qquad \delta t\rightarrow 0,\quad h\rightarrow 0,\nonumber \\ \end{aligned}$$
(38)

by making use of the stability condition \(||\mathbf{{H}}||\le 1\) defined in Eq. (36) one can obtain

$$\begin{aligned} ||\zeta ||^{n+1}\le n{\tilde{C}}((\delta t)^{2-\alpha }+h^{p}),\qquad \delta t\rightarrow 0,\quad h\rightarrow 0\quad n=0,1,\ldots , M. \end{aligned}$$
(39)

From what has been discussed above, convergence of the scheme is proved. In the next section, we will evaluate the convergence order in the temporal approximation by some numerical experiments.

5 Numerical Examples and Application

In this section, two examples illustrating an exact solution are presented to show the accuracy of the solution and the order of convergence of our proposed numerical scheme in given Sect. 3. Also, the present method for pricing barrier option governed by a time fractional B–S model was exploited which is one of the most interesting models in the financial market. The accuracy and efficiency of the method are verified in terms of the following error norms:

$$\begin{aligned} L_{\infty }&=\max _{1\le i \le N-1}|U({{x}}_{i},T)-u({{x}}_{i},T)|,\\ RMS&=\sqrt{\frac{1}{N}\bigg (\sum \limits _{i=1}^{N}|U({{x}}_{i},T) -u({{x}}_{i},T)|^{2}\bigg )}. \end{aligned}$$

For all cases, we employed the quadratic basis and Gaussian weight functions according to Eq. (16). In addition, for all test problems, we set the same influence domain as \(h_i = 0.2\), for \(i = 1, 2,\ldots ,N;\) which is the radius of influence domain circle. In the area of the circle, all the assumed nodes are influencing the approximation and \(\mu =0.1\). Note that these values are selected as the best attempt of the performed numerical experiments. The computational order and convergence rate (error rate) in time variable respectively can be computed as follows:

$$\begin{aligned} \begin{aligned} C_{}{} \texttt {-order}&=\frac{\log \left( \frac{E_i}{E_{i+1}}\right) }{\log \left( \frac{\delta t_{i}}{\delta t_{i+1}}\right) },\\ \texttt {Error~rate}&=\left( \frac{\delta t_{i}}{\delta t_{i+1}}\right) ^{C_{}-order}, \end{aligned} \end{aligned}$$

where \(E_{i}\) is the error value that corresponds to grid with mesh size \(\delta t_{i}\). Note that the numerical computations have been carried out by using Matlab 7 software on a Pentium IV, 2800 MHz CPU machine with 4 Gbyte of memory. Finally, the computer time required to obtain the option price using the proposed scheme described in previous sections is denoted by CPU Time.

Example 1

Let us consider the time fractional B–S equation

$$\begin{aligned} {\left\{ \begin{array}{ll} {}_{0}D_{\uptau }^\alpha U(x,\uptau )=a\frac{{\partial }^2 U({x},\uptau )}{{\partial x}^2 }+b\frac{{\partial } U(x,\uptau )}{\partial x}-cU(x,\uptau )+f(x,\uptau ),\\ U(0, \uptau )=0, U(1,\uptau ) = 0,\\ U(x, 0) = x^2(1-x), \end{array}\right. } \end{aligned}$$
(40)

where the source term \(f=(\frac{2\uptau ^{2-\alpha }}{\varGamma (3-\alpha )}+\frac{2\uptau ^{1-\alpha }}{\varGamma (2-\alpha )})x^2(1-x)-(\uptau +1)^2[a(2-6x)+b(2x-3x^2)-cx^2(1-x)]\) is selected so that the exact solution of (40) is \(U = (\uptau +1)^{2}x^2(1-x)\) (De Staelen and Hendy 2017; Zhang et al. 2016). The aforementioned related parameters can be assigned with values as \(r = 0.05, D=0\), \(\sigma =0.25\), \(a\ = \frac{1}{2}\sigma ^{2}\), \(b= r -a-D\), \( c = r\) and \(T = 1\). The results are reported in Tables 1 and 2.

Table 1 Evaluated convergence rates and errors for Example 1 with MQ-RBF when \(N=100\) and \(\alpha =0.7\)
Table 2 Errors obtained in Example 1 where \(\delta t=0.01\), \(N = 50\) and \(\alpha = 0.2, 0.8\)

Example 2

As the second example, we consider the following time fractional model with homogeneous boundary conditions

$$\begin{aligned} {\left\{ \begin{array}{ll} {}_{0}D_{\uptau }^\alpha U(x,\uptau )=a\frac{{\partial }^2 U({x},\uptau )}{{\partial x}^2 }+b\frac{{\partial } U(x,\uptau )}{\partial x}-cU(x,\uptau )+f(x,\uptau ),\\ U(0, \uptau )=(\uptau +1)^2, U(1,\uptau ) = 3(\uptau +1)^2,\\ U(x, 0) = x^3+x^2+1, \end{array}\right. } \end{aligned}$$
(41)

such that the source term \(f=(\frac{2\uptau ^{2-\alpha }}{\varGamma (3-\alpha )}+\frac{2\uptau ^{1-\alpha }}{\varGamma (2-\alpha )})( x^3+x^2+1)-(\uptau +1)^{2}[a(6x+2)+b(3x^2+2x)-c(x^3+x^2+1)]\) is selected so that the exact solution of (41) is \(U = (\uptau +1)^{2}(x^3 +x^2 +1)\) (De Staelen and Hendy 2017; Zhang et al. 2016). The aforesaid related parameters can be chosen with values as \(r = 0.5,D=0\), \(a = 1\), \(b = r -a-D\), \( c = r\) and \(T = 1\). The results are reported in Tables 3 and 4.

Table 3 Evaluated convergence rates and errors for Example 2 with \(N=100\) and \(\alpha =0.7\)
Table 4 Errors obtained in Example 2 where \(\delta t=0.01\), \(N = 50\) and \(\alpha = 0.2, 0.8\)

Tables 123 and 4 list the numerical results and comparisons and its corresponding error rate, which verify the effectiveness and high accuracy of this method. From these tables, it can be seen that the numerical solutions obtained the presented method are in excellent agreement with the exact solutions. Also, the consumed CPU time of scheme for various time discretization steps were reported. It produces high accurate results with very low CPU time. Based on detailed comparisons in Tables 1 and 3, the present method gives better results than the implicit finite deference method (Zhang et al. 2016) and compact finite deference method (De Staelen and Hendy 2017) for discrete barrier option pricing. Furthermore, we conclude that the convergence rate is \({\mathcal {O}}(\delta t^{ 2-\alpha })\) in both examples and provides with what has been discussed in Sect. 4. It is worth mentioning that the convergence rate in time is approximately \((\frac{\delta t_{i}}{\delta t_{i+1}})^{2-0.7}=2^{1.3}=2.4623\). Also, the results of the convergence rate of this study are inline with the other two methods (De Staelen and Hendy 2017; Zhang et al. 2016), which can be a justifying factor to present our method. The \(L_{\infty }\) and RMS of errors when \(t = 0.2, 0.4, 0.6, 0.8, 1\) and \(N = 50\) for two different values of \(\alpha \) are presented in Tables 2 and 4, which shows that the results of RMS-error are comparatively better than the \(L_{\infty }\)-error norm.

Example 3

Consider the following time fractional B–S model (TFBSM) governing European options

$$\begin{aligned}&\frac{{\partial }^\alpha V({S},t)}{{\partial t}^\alpha }+\frac{1}{2} {\sigma }^{2}{S^2}\frac{{\partial }^2 V({S},t)}{{\partial S}^2 }+(r-D)S\frac{{\partial } V({S},t)}{\partial S}\\&\quad -\,rV(s,t)=0,\quad (s,t) \in {\mathbb {R}}^{+} \times (0,T), \end{aligned}$$

with final condition \(v(S) = \max \{S- K, 0\}\).

This model with the method exhibited in this paper is solved. The double barrier option price curves at different values of the order \(\alpha \) and t are illustrated in Fig. 1. Here the parameters \(\sigma = 0.2\), \(r = 0.05\), \(T = 2({ year})\), \(B_u = 83,\)\(K = 10\) and the dividend yield \(D = 0.\) As mentioned before, the time fractional B–S model can be rewritten as:

$$\begin{aligned} \frac{\partial ^{\alpha } U}{\partial \uptau ^{\alpha }}=\frac{\partial ^{2} U}{\partial x^{2}}+(m-1)\frac{\partial U}{\partial x}-mU, \end{aligned}$$

where \(m = r/\frac{1}{2}\sigma ^2\) and with strike price of \(\$10\) and up-and-out barrier option constraint

$$\begin{aligned} U(x,\uptau )={\left\{ \begin{array}{ll} 0&{}\quad e^{x} \ge e^{B_u},\quad 0\le \uptau< T,\\ e^{x}-10&{} \quad 0< e^{x} < e^{B_u}, \quad \uptau =0. \end{array}\right. } \end{aligned}$$

Thus up-and-out barrier option is the option that the option expires worthless if it hits upper barrier, say, is reached from below before expiry. Figure 1a displays the numerical solutions for up-and-out Barrier option price for different values \(\alpha \). Also, we depict the difference in values for the up-and-out barrier option for \(t = 0\) and \(t =T=2\) in the Fig. 1b.

Fig. 1
figure 1

a up-and-out barrier option values with different values \(\alpha \) for \(t =\frac{1}{2}\) and \(T=2\), b up-and-out barrier option values for \(t = 0\) and \(t =T=2\) when \(\alpha =0.25\)

6 Concluding Remarks

The “globalness” character of the fractional order derivative in the model causes both exact and numerical solutions quite complicated to get rather than ones with the integer order model. The time fractional B–S model is the general format of the classical B–S model. In the current work, we revolutionize the modified Riemann–Liouville fractional derivative to a Caputo fractional derivative by a variable transformation. Firstly, the discretization process of the problem in temporal sense via the finite difference scheme (accuracy of order \(2-\alpha \)) is described. Then we will exhibit how to achieve the approximated solution by using the MLS. Moreover, the convergence analysis of this current method is discussed. Two mentioned numerical examples with analytical solutions are chosen in order to illustrate the accuracy and convergence order of the numerical method. In conclusion, in the application based point of view, we use this time fractional B–S model and the proposed numerical technique to price double barrier options. We have confidence in that the numerical techniques offered in this paper can also be utilized in other alike fractional simulations for pricing different barrier options in fractional B–S market.