Solving stochastic differential equations through genetic programming and automatic differentiation

https://doi.org/10.1016/j.engappai.2017.10.021Get rights and content

Highlights

  • We investigate the potential of evolutionary algorithms to solve SDEs.

  • The approach combines genetic programming and automatic differentiation.

  • The solutions are in symbolic form and in continuous time.

  • We use MATLAB programming environment and theory of stochastic calculus.

  • We employed the equation for Geometric Brownian motion.

Abstract

This paper investigates the potential of evolutionary algorithms, developed using a combination of genetic programming and automatic differentiation, to obtain symbolic solutions to stochastic differential equations. Using the MATLAB programming environment and based on the theory of stochastic calculus, we develop algorithms and conceive a new methodology of resolution. Relative to other methods, this method has the advantages of producing solutions in symbolic form and in continuous time and, in the case in which an equation of interest is completely unknown, of offering the option of algorithms that perform the specification and estimation of the solution to the equation via a real database. The last advantage is important because it determines an appropriate solution to the problem and simultaneously eliminates the difficult task of arbitrarily defining the functional form of the stochastic differential equation that represents the dynamics of the phenomenon under analysis. The equation for geometric Brownian motion, which is usually applied to model prices and returns from financial assets, was employed to illustrate and test the quality of the algorithms that were developed. The results are promising and indicate that the proposed methodology can be a very effective alternative for resolving stochastic differential equations.

Introduction

A large number of research projects in various fields of scientific knowledge utilize mathematical models that are partially or entirely formulated by stochastic differential equations (SDEs). Given the complexity of the specified models, their formulators must almost always address problems that have difficult resolutions and an unknown symbolic solution. In this situation, a typical procedure is to obtain an approximate solution by numeric methods.

Some of these projects aim to generate results that formally represent the temporal dynamics of the phenomena studied. In these cases, the numerical solution is not an appropriate instrument for giving researchers the necessary answers to their evaluations. The solution to the problem in its functional form is required; this solution will facilitate different types of analyses, such as determining the magnitude of partial effects and elasticities, estimating tendencies and volatilities, and realizing simulations and predictions of future scenarios.

The main goal of this study is to investigate the potential of evolutionary computational algorithms, which are developed by combining the methods of genetic programming (GP) and automatic differentiation (AD) and denoted as GPAD, to obtain symbolic solutions to SDE problems. Some algorithms were developed utilizing the programming environment of MATLAB, and a new methodology for a continuous time solution was generated.

The methodology adopted in this paper explores the already proven ability of GP in obtaining symbolic solutions in the form of equations. The GP algorithm looks, in the search space, for the analytical solution that minimizes the sum of the errors’ squares between both sides of the chosen differential equation. The AD method is then used for obtaining the derivatives necessary to the minimization problem. It is worth noting that the AD method was chosen for providing the exact value of the punctual derivatives, as the adoption of methods based in finite differences or any other non-exact numerical method would not affect the accuracy of the equations candidate for solution, impairing the GP’s performance during the evolution and the quality of the final obtained solution.

The methodology here proposed is conceptually difficult to compare to the ones based in finite differences and other numerical methods. However, the results given by the different methods can be compared based on error measurements and matching quality, even graphically. Nevertheless, the results generated by GPAD are, in the deterministic case, a differentiable function through traditional calculus, an in the case of this paper, a stochastic process differentiable by Itô’s formula or lemma. As such, one of the advantages in the use of this methodology is that the accuracy of the obtained solution can be mathematically and analytically verified.

To compare the developed methodology with existing methods, a bibliographic review was conducted, and a significant number of scientific publications was investigated. It was seen that there is a plethora of papers developing GP applications for symbolic regression, in different areas of the technical and scientific knowledge. From the more recent ones, attention is given to the articles of Qi Chen et al. (2016), Qi Chen et al. (2017) and Xie, et al. (2007). The first two approach the feature selection matter, presenting relevant results and proposing new selection methods, more efficient than the existing ones, for the generalization of genetic programming for high-dimensional symbolic regression problem, contributing for a smaller overfitting probability and lower computational cost.

The third paper uses GP for high-dimensional symbolic regression, to predict price inflation over short and medium terms for the New Zealand consumers’ price index. The results obtained are significant, as the prediction model estimated by GP shows predictions with precision comparable to the official prediction system, developed and disclosed by the Reserve Bank of New Zealand (RBNZ).

Beyond the papers previously mentioned, Dr. Sara Silva’s recent work on GP for symbolic regression was also consulted, as found on the following link: http://www.cs.bham.ac.uk/~wbl/biblio/gp-html/SaraSilva.html.

It is important to acknowledge the existence of a great number of papers, with different kinds and applications of Genetic Algorithms, as well as significant results, mainly in the electrical and mechanical engineering areas. Between the consulted ones, attention is called to Güllü (2012), Güllü (2013), Güllü (2014), Güllü (2016), Güllü (2017) and Canakci et al. (2009).

Although extensive literature on GP and AD exists, the majority of the studies separately discuss and apply these methods. Among the studies that develop GPADs, those on the solution of differential equations are rare, and in the specific case of SDEs, no study was identified. Among these studies, the most notable research includes studies by Imae et al. (2004) and Tsoulos and Lagaris (2006).

In Imae et al. (2004), a GPAD algorithm is proposed to solve Hamilton–Jacobi–Bellman (HJB) equations, Hamilton–Jacobi–Isaacs (HJI) equations and Francis–Byrnes–Isidori (FBI) equations in nonlinear dynamical systems of optimal control problems. The methodology uses the conventional GP technique combined with an AD method developed by the authors. The algorithm is applied to equations that contain known symbolic solutions and generates approximate solutions with low estimate errors for every simulated case. The conclusions of the study suggest that the methodology presents promising results and is a suitable alternative for solving optimal control problems.

Among the research, the study by Tsoulos and Lagaris (2006) presents the most diverse and highest number of solution examples for differential equations using GPAD algorithms. Solutions are presented for first- and second-degree ODEs and partial differential equations (PDEs)—both linear and nonlinear equations. Exact symbolic solutions are identified for the vast majority of the addressed problems. The developed algorithm employs the grammatical evolution of GP and different AD methods. The study concludes that the developed methodology is adequate for solving ODEs and PDEs and that the results are very encouraging.

Few similarities between this study and the studies of Imae et al. (2004) and Tsoulos and Lagaris (2006) were identified. They are only related by the fact that they develop GPAD algorithms, and the goals and problems that are addressed differ. Consequently, attempts to solve SDEs require programs with very different technical details than those of the programs that are developed for solving ODEs and PDEs. Although some similarities are assumed, the differences among the studies are substantially greater.

Although the literature does not identify a study that employs a GPAD algorithm to solve SDEs, other methodologies and studies specifically address these equations. Numerous articles and books address this subject; the mathematical development of the theory of stochastic integration of the stochastic calculus of Itô (Itô, 1951) has produced general solutions for various types of SDEs. However, exact solutions for other important types or classes remain open. A diversity of methods have been developed with the aim of obtaining solutions for SDEs; most of the utilized methods are based on statistical estimation, computational numeric methods and stochastic simulation methods. Among the bibliographic references that theoretically informed this study, the most notable studies are Itô (1951), Arnold (1974), Schuss (1980), Ikeda and Watanabe (1989), Kloeden and Platen (1992), Campbell et al. (1997) and Aït-Sahalia (2002).

Therefore, the methodology that is proposed is an alternative for resolving the problem with the advantages of producing solutions in symbolic form and in continuous time and, in a case in which the equation of interest is completely unknown, of offering the option of algorithms that perform the specification and estimation of the solution to this equation via a real database. The last advantage is important because it determines an appropriate solution to the problem and simultaneously eliminates the difficult task of arbitrarily defining the functional form of the SDE that represents the dynamics of the phenomenon. The equation for geometric Brownian motion (GBM), which is usually applied to model prices and returns from financial assets, was used to illustrate and test the quality of the developed algorithms. The results are promising and indicate that the proposed methodology can be a very effective alternative for resolving SDEs.

In addition to this introduction, the paper is organized into four sections. The second section describes the methodological procedures that were adopted in the development of the GPAD algorithms. In the third section, we present the results of the application of the proposed methodology in the solution of a SDE and GBM. The fourth section summarizes and presents the study’s conclusions.

Section snippets

Methodology

In this section, the theoretical aspects and modeling procedures that are adopted in the development of the general methodology of this study are presented. They are elaborated with the intention of obtaining symbolic solutions for SDEs via GPADs. This section is divided into three subsections: the first section describes the mathematical problem of interest; the second section presents the methodology for the specification and estimation of the SDE model; and the third section describes the

Results and discussion

In this example, a complete exercise is presented with simulated data, which shows all stages of the solution of an SDE for a GPAD. GBM was chosen for the simulation due to its importance in the modeling of a financial series. dX(t)=μX(t)dt+σX(t)dW(t)where a(t,X(t))=μX(t),b(t,X(t))=σX(t), such that σ>0 and X(t)>0t[0,T].Although the solution to this equation is known, its solution is developed at a fast pace to facilitate the understanding of the application that will be posteriorly realized.

Conclusions

This study investigated the potential of genetic programming techniques and automatic differentiation to obtain solutions for stochastic differential equations. A methodology was conceived, and several examples of solutions to SDEs were presented. However, the GBM was the only example that was presented with respect to the extended analysis.

The proposed methodology is a novel alternative for addressing the problem and has the advantage of producing solutions in symbolic form and in continuous

Acknowledgments

The authors would like to thank the Professor André V. Abs da Cruz for his valuable critiques and suggestions that contributed significantly to the achievement of this study.

Declaration of interest

The authors have no conflicts of interest to declare.

Funding sources

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Role of the funding source

The authors would like to declare that received no financial support for the realization of research and for the preparation of this article.

References (30)

  • GüllüH.

    A novel approach to prediction of rheological characteristics of jet grout cement mixtures via genetic expression programming

    Neural Comput. Appl.

    (2016)
  • GüllüH.

    A new prediction method to rheological behavior of grout with bottom ash for jet grouting columns

    Soils Found.

    (2017)
  • HamiltonJ.D.

    Time Series Analysis

    (1994)
  • XieH.

    Genetic programming for new zealand cpi inflation prediction

  • IkedaN. et al.

    Stochastic Differential Equations and Diffusion Processes

    (1989)
  • Cited by (6)

    • A novel Error-Correcting Output Codes algorithm based on genetic programming

      2019, Swarm and Evolutionary Computation
      Citation Excerpt :

      In our algorithm, the ECOC decoding process is only needed for the fitness value evaluation step, and other steps contribute to the optimal encoding process. In GP, different settings of terminal and nonterminal nodes allow an individual to stand for a classification rule [51] or mathematics formula [52]. In GP-ECOC, each individual represents an ECOC codematrix.

    • Stochastic small disturbance stability analysis of nonlinear multi-machine system with Itô differential equation

      2018, International Journal of Electrical Power and Energy Systems
      Citation Excerpt :

      In addition, the influence of PSS to the small disturbance stability of the system is analyzed briefly through the discussion of the system eigenvalues. Stochastic process [25,26] mainly includes process with independent incremental process, Gaussian process, Wiener process and so on. Itô differential equations can be mainly divided into two categories.

    View full text