<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>ON DEEP LEARNING FOR OPTION PRICING IN LOCAL VOLATILITY MODELS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>S.G. Shorokhov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergey Shorokhov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Peoples' Friendship University of Russia (RUDN University)</institution>
          ,
          <addr-line>6 Miklukho-Maklaya St, Moscow, 117198</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>5</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>We study neural network approximation of the solution to boundary value problem for Black-ScholesMerton partial differential equation for a European call option price, when model volatility is a function of underlying asset price and time (local volatility model). Strike-price and expiry day of the option are assumed to be fixed. An approximation to option price in local volatility model is obtained via deep learning with deep Galerkin method (DGM), making use of the neural network of special architecture and stochastic gradient descent on a sequence of random time and underlying price points. Architecture of the neural network and the algorithm of its training for option pricing in local volatility models are described in detail. Computational experiment with DGM neural network is performed to evaluate the quality of neural network approximation for hyperbolic sine local volatility model with known exact closed form option price. The quality of the neural network approximation is estimated with mean absolute error, mean squared error and coefficient of determination. The computational experiment demonstrates that DGM neural network approximation converges to a European call option price of the local volatility model with acceptable accuracy.</p>
      </abstract>
      <kwd-group>
        <kwd>partial differential equation</kwd>
        <kwd>local volatility model</kwd>
        <kwd>option price</kwd>
        <kwd>neural network</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In a local volatility model (LVM) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], in contrast to Black-Scholes constant volatility model
[
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ], the volatility depends on underlying asset price  and time  . Well-known LVM with exact
closed form solutions include CEV model [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], shifted lognormal model [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and normal model (a clone
of Ornstein–Uhlenbeck model [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]).
      </p>
      <p>When evaluating derivatives with LVM, the boundary (terminal) value problem for Black
Scholes-Merton (BSM) partial differential equation (PDE) is to be solved. Exact closed form solutions
of terminal value problem for BSM PDE are known only in a few special cases, therefore, in general
case application of numerical methods such as binomial trees, Monte Carlo simulations, Fourier or
finite difference methods is required. Alternatively, derivative prices in LVM can be approximated
with an artificial neural network (ANN).</p>
      <p>
        The idea to use ANNs for option pricing is several decades old (see [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and the references
therein), however, the need to improve the quality of option price approximation stimulates further
research. Deep Galerkin Method (DGM), introduced recently in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] for the solution of PDEs, makes
use of the neural network of special architecture and stochastic gradient descent (SGD) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] on a
sequence of random time and space points. The method has been successfully applied to various PDEs
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], including BSM PDE with constant volatility.
      </p>
      <p>
        Our goal is to study application of DGM approach [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] to option pricing when volatility
function is not constant and evaluate the quality of ANN approximation for an LVM with known exact
analytical closed form solution.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Deep option pricing with local volatility models</title>
      <p>
        For pricing of a European call option with strike-price  and expiry day  in LVM with a
volatility function σ( ,  ) and a risk-free interest rate  &gt; 0, the solution of BSM PDE [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]
with terminal condition
∂u
∂
u( ,  ,  ,  ) = max( −  ,  0) #(2)
is to be determined. Strike-price  and expiry day  are assumed to be fixed.
      </p>
      <p>
        To determine ANN approximation to PDE (1) with condition (2) using DGM approach the
neural network of special architecture [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] is to be built and trained. The architecture of the ANN is
similar to architectures of LSTM [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and Highway [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] networks. It consists of the layers in Fig.1: an
input layer,  hidden (LSTM) layers and an output layer.
      </p>
      <p>X0 = σ(w0 x + b0)
with a nonlinear activation function σ and input layer parameters w0 and b0.</p>
      <p>Each hidden (LSTM) layer receives as an input the original set of price-time points x and the
output of the previous layer. In hidden layers, the price-time points x and the outputs of the previous
layer Xi−1 are processed with the following transformations:</p>
      <p>Zi = σ(uiz x + wiz Xi−1 + biz),
Gi = σ(uig x + wig Xi−1 + big),</p>
      <p>Ri = σ(uir x + wir Xi−1 + bir),
Hi = σ(uih  x + wih (Xi−1 ⊙ Ri ) + bih ),
where ⊙ denotes element-wise multiplication, and the outputs of the layer are</p>
      <p>Xi = (1 − Gi) ⊙ Hi + Zi ⊙ Xi−1.</p>
      <p>In the output layer, the outputs of the last LSTM layer Xd are transformed into the neural
network outputs y with a linear transform</p>
      <p>y = f(x;  θ) = w′ Xd + b′,
where w′ and b′ are the output layer parameters. The output of the DGM neural network y is the
approximation of option price u at the initial price-time points x.</p>
      <p>In hidden LSTM layers, the shape of the weight parameters uiz, uig, uir, uih is 2 ×  , the shape
of the weight parameters wiz, wig, wir, wih is  ×  , the shape of the bias parameters biz, big, bir, bih is
1 ×  .</p>
      <p>In the output layer, the shape of the weight parameter w′ is  × 1 and b′ is a scalar
parameter. The neural network parameter set  contains all weight and bias parameters mentioned
above. Thus, the total number of parameters in DGM neural network is equal to</p>
      <p>| | = 4 d (N+ 1)2 + 4 N + 1.</p>
      <p>
        DGM neural network is trained with adaptive algorithm Adam [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], which is an extension to
classical SGD algorithm. General outline of DGM algorithm for the solution of BSM PDE (1)-(2) is
shown below in Algorithm 1.
Algorithm 1: Approximation of option price in local volatility model with DGM neural network
a volatility function  ( ,  ), strike-price  , time to maturity  , risk free interest rate  , distributions
 1 and  2, absolute tolerance  &gt; 0;
optimal parameter set  ∗ for the approximation of option price in LVM;
– choose initial parameter set  0 and learning rate  0;
generate random time-price points (  ,   ) from  × [0,  ] with distribution  1 and random price
points   ′ from  with distribution  2,  = [  ,  ℎ] ⊂ ℝ;
calculate the loss function  (  ,   ) at the randomly sampled points ξ = {(  ,   ),   ′ } , where
 (  ,   )
← (
  (  ,   ;   )
 
+   
  (  ,   ;   )
      </p>
      <p>+ 12 σ2(  ,   )  2  2 (    ,  2 ;   )–   (  ,   ;   ))</p>
      <p>2
+ ( (  ′,  ;   )– max( ′ –  )) .</p>
      <p>
        2
update parameter set  for a gradient descent step at the random points   for the learning rate  
with adaptive algorithm Adam [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]:
      </p>
      <p>+1 ←   −      (  ,   ).</p>
      <p>Data:
Result:
repeat
–
–
–
until ‖  +1 −   ‖ &lt;  ;
 ∗ ←   +1;</p>
      <p>As a result of Algorithm 1, an approximation of the price of a European call option in LVM
with volatility function σ( ,  ) is obtained in the form u( ,  ) =  ( ,  ;  ∗).</p>
    </sec>
    <sec id="sec-3">
      <title>3. Computational experiment for hyperbolic sine LVM</title>
      <p>
        Consider hyperbolic sine LVM [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] with underlying asset price driven by SDE
,   &gt; 0,   &gt; 0#(3)
with the following BSM PDE for a derivative price
∂u
∂
      </p>
      <p>The computational experiment is performed with the following parameters: the number  of
hidden layers is 3, the number  of nodes (neurons) per hidden layer is 50, the number of training
stages is 100 with 10 SGD steps in each stage, and other parameters of the model are as follows
r  =  0.05,  λ  =  0.25,  K  =  50,  T  =  1,  S0  =  0.5. Quality of obtained ANN approximation is
characterized by the following metrics:



mean absolute error (MAE) is 0.2014;
mean squared error (MSE) is 0.2483;
coefficient of determination ( 2) is 99.93%.
Proceedings of the 9th International Conference "Distributed Computing and Grid Technologies in Science and</p>
      <p>Education" (GRID'2021), Dubna, Russia, July 5-9, 2021</p>
      <p>Absolut e Error Surface of DGM Opt ion Price Est imat e</p>
      <p>
        The resulting error of approximation, i.e. difference between exact analytical option prices in
hyperbolic sine LVM (3) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and option prices, predicted by DGM ANN, is visualized in Fig. 3.
Price
      </p>
      <p>The computational experiment shows that the approximation, obtained with DGM ANN,
predicts option prices in hyperbolic sine LVM (3) with acceptable accuracy, but the quality of
approximation deteriorates for options ATM (At The Money) at expiry day and for options ITM (In
The Money) with long time to maturity.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and Future plans</title>
      <p>Generally, option exchange trades various options on the same underlying with a range of
exercise (strike) prices and expiry days, so to price all these options ANN shall receive as an input the
set of price-time-strike price-expiry day points ( ,  ,  ,  ) instead of price-time points ( ,  ). This
transition from input ( ,  ) to input ( ,  ,  ,  ) may require different architecture of ANN and another
strategy of its training.</p>
      <p>
        As noted in [
        <xref ref-type="bibr" rid="ref15 ref16">15,16</xref>
        ], the loss function in the form of energy functional (potential) is preferable
for loss minimization, so construction of variational formulation for BSM PDE (1) can contribute to
deep option pricing. Energy functional (potential) for BSM PDE (1) may be obtained using methods of
the inverse problem of the calculus of variations [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>The computational experiment with deep option pricing in hyperbolic sine LVM demonstrates
that the algorithm converges to exact analytical European call option price of the LVM with
acceptable accuracy, but oscillating behavior of the option price approximation makes it desirable to
modify the neural network architecture for smoothing its output.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Dupire</surname>
          </string-name>
          .
          <article-title>Pricing with a smile // Risk Magazine 7 (1) (</article-title>
          <year>1994</year>
          )
          <fpage>18</fpage>
          -
          <lpage>20</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>F.</given-names>
            <surname>Black</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Scholes</surname>
          </string-name>
          .
          <source>The Pricing of Options and Corporate Liabilities // Journal of Political Economy</source>
          <volume>81</volume>
          (
          <issue>3</issue>
          ) (
          <year>1973</year>
          )
          <fpage>637</fpage>
          -
          <lpage>654</lpage>
          . doi:
          <volume>10</volume>
          .1086/260062
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R. C.</given-names>
            <surname>Merton</surname>
          </string-name>
          .
          <source>Theory of Rational Option Pricing // The Bell Journal of Economics and Management Science</source>
          <volume>4</volume>
          (
          <issue>1</issue>
          ) (
          <year>1973</year>
          )
          <fpage>141</fpage>
          -
          <lpage>183</lpage>
          . doi:
          <volume>10</volume>
          .2307/3003143
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Cox</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. A.</given-names>
            <surname>Ross</surname>
          </string-name>
          .
          <article-title>The valuation of options for alternative stochastic processes //</article-title>
          <source>Journal of Financial Economics</source>
          <volume>3</volume>
          (
          <issue>1</issue>
          -2) (
          <year>1976</year>
          )
          <fpage>145</fpage>
          -
          <lpage>166</lpage>
          . doi:
          <volume>10</volume>
          .1016/
          <fpage>0304</fpage>
          -
          <lpage>405x</lpage>
          (
          <issue>76</issue>
          )
          <fpage>90023</fpage>
          -
          <lpage>4</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Brigo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Mercurio</surname>
          </string-name>
          .
          <article-title>Fitting volatility skews and smiles with analytical stock-price models, Seminar paper</article-title>
          , Institute of Finance, University of Lugano (
          <year>2000</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Uhlenbeck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. S.</given-names>
            <surname>Ornstein</surname>
          </string-name>
          .
          <source>On the theory of the brownian motion // Phys. Rev</source>
          .
          <volume>36</volume>
          (
          <year>1930</year>
          )
          <fpage>823</fpage>
          -
          <lpage>841</lpage>
          . doi:
          <volume>10</volume>
          .1103/PhysRev.36.823
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. W.</given-names>
            <surname>Oosterlee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Bohte</surname>
          </string-name>
          .
          <source>Pricing Options and Computing Implied Volatilities using Neural Networks // Risks</source>
          <volume>7</volume>
          (
          <year>2019</year>
          )
          <article-title>16</article-title>
          . doi:
          <volume>10</volume>
          .3390/risks7010016
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Sirignano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Spiliopoulos. DGM</surname>
          </string-name>
          :
          <article-title>A deep learning algorithm for solving partial differential equations //</article-title>
          <source>Journal of Computational Physics</source>
          <volume>375</volume>
          (
          <year>2018</year>
          )
          <fpage>1339</fpage>
          -
          <lpage>1364</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.jcp.
          <year>2018</year>
          .
          <volume>08</volume>
          .029
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bottou</surname>
          </string-name>
          ,
          <string-name>
            <surname>O. Bousquet.</surname>
          </string-name>
          <article-title>The tradeoffs of large scale learning</article-title>
          ,
          <source>in: Proceedings of the 20th International Conference on Neural Information Processing Systems</source>
          , NIPS'07, Curran Associates Inc.,
          <string-name>
            <surname>Red</surname>
            <given-names>Hook</given-names>
          </string-name>
          ,
          <string-name>
            <surname>NY</surname>
          </string-name>
          , USA (
          <year>2007</year>
          )
          <fpage>161</fpage>
          -
          <lpage>168</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Hochreiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schmidhuber</surname>
          </string-name>
          .
          <source>Long short-term memory // Neural Computation</source>
          <volume>9</volume>
          (
          <issue>8</issue>
          ) (
          <year>1997</year>
          )
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          . doi:
          <volume>10</volume>
          .1162/neco.
          <year>1997</year>
          .
          <volume>9</volume>
          .8.
          <fpage>1735</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>R. K.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Greff</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schmidhuber</surname>
          </string-name>
          .
          <article-title>Training very deep networks</article-title>
          , in: C.
          <string-name>
            <surname>Cortes</surname>
            ,
            <given-names>N. D.</given-names>
          </string-name>
          <string-name>
            <surname>Lawrence</surname>
            ,
            <given-names>D. D.</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Sugiyama</surname>
          </string-name>
          , R. Garnett (Eds.),
          <source>Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems</source>
          <year>2015</year>
          , December 7-
          <issue>12</issue>
          ,
          <year>2015</year>
          , Montreal, Quebec, Canada (
          <year>2015</year>
          )
          <fpage>2377</fpage>
          -
          <lpage>2385</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Kingma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Ba</surname>
          </string-name>
          .
          <article-title>Adam: A method for stochastic optimization</article-title>
          , in: Y. Bengio, Y. LeCun (Eds.),
          <source>3rd International Conference on Learning Representations, ICLR</source>
          <year>2015</year>
          , San Diego, CA, USA, May 7-
          <issue>9</issue>
          ,
          <year>2015</year>
          , Conference Track Proceedings (
          <year>2015</year>
          ). URL http://arxiv.org/abs/1412.6980
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>S.</given-names>
            <surname>Shorokhov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fomin</surname>
          </string-name>
          .
          <article-title>Modeling of financial asset prices with hyperbolic-sine stochastic model</article-title>
          , in: V.
          <string-name>
            <surname>Sukhomlin</surname>
          </string-name>
          , E. Zubareva (Eds.),
          <source>Convergent Cognitive Information Technologies. Convergent</source>
          <year>2018</year>
          , Communications in Computer and Information Science, Springer, Cham
          <volume>1140</volume>
          (
          <year>2020</year>
          ) Ch.
          <volume>1</volume>
          ,
          <fpage>3</fpage>
          -
          <lpage>10</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -37436-
          <issue>5</issue>
          _
          <fpage>1</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Abadi</surname>
          </string-name>
          , et al.
          <article-title>TensorFlow: a system for large-scale machine learning</article-title>
          ,
          <source>in: OSDI'16: Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation</source>
          ,
          <year>2015</year>
          (
          <year>2016</year>
          )
          <fpage>265</fpage>
          -
          <lpage>283</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Zabaras</surname>
          </string-name>
          , P.-S. Koutsourelakis, P. Perdikaris.
          <article-title>Physics-constrained deep learning for high-dimensional surrogate modeling and uncertainty quantification without labeled data //</article-title>
          <source>Journal of Computational Physics</source>
          <volume>394</volume>
          (
          <year>2019</year>
          )
          <fpage>56</fpage>
          -
          <lpage>81</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.jcp.
          <year>2019</year>
          .
          <volume>05</volume>
          .024
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>N.</given-names>
            <surname>Geneva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Zabaras</surname>
          </string-name>
          .
          <article-title>Modeling the dynamics of PDE systems with physics-constrained deep auto-regressive networks //</article-title>
          <source>Journal of Computational Physics</source>
          <volume>403</volume>
          (
          <year>2020</year>
          )
          <article-title>109056</article-title>
          . doi:
          <volume>10</volume>
          .1016/j.jcp.
          <year>2019</year>
          .109056
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>V. M.</given-names>
            <surname>Filippov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. M.</given-names>
            <surname>Savchin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. G.</given-names>
            <surname>Shorokhov</surname>
          </string-name>
          .
          <article-title>Variational principles for nonpotential operators //</article-title>
          <source>Journal of Mathematical Sciences</source>
          <volume>68</volume>
          (
          <issue>3</issue>
          ) (
          <year>1994</year>
          )
          <fpage>275</fpage>
          -
          <lpage>398</lpage>
          . doi:
          <volume>10</volume>
          .1007/bf01252319
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>