Stochastic Gradient Descent in Continuous Time
Justin Sirignano, Konstantinos Spiliopoulos
Introduction
This paper develops a statistical learning algorithm for continuous-time models, which are common in science, engineering, and finance. We study its theoretical convergence properties as well as its computational performance in a number of benchmark problems. Although the method is broadly applicable, this paper mainly focuses on applications in finance. Given a continuous stream of data, stochastic gradient descent in continuous time (SGDCT) can estimate unknown parameters or functions in stochastic differential equation (SDE) models for stocks, bonds, interest rates, and financial derivatives. The statistical learning algorithm can also be used for the optimization of high-dimensional continuous-time models, such as American options. High-dimensional American options have been a longstanding computational challenge in finance. SGDCT is able to accurately solve American options even in 100 dimensions.
Batch optimization for the statistical estimation of continuous-time models can be impractical for large datasets where observations occur over a long period of time. Batch optimization takes a sequence of descent steps for the model error for the entire observed data path. Since each descent step is for the model error for the entire observed data path, batch optimization is slow (sometimes impractically slow) for long periods of time or models which are computationally costly to evaluate (e.g., partial differential equations). Typical existing approaches in the financial statistics literature use batch optimization.
SGDCT provides a computationally efficient method for statistical learning over long time periods and for complex models. SGDCT continuously follows a (noisy) descent direction along the path of the observation; this results in much more rapid convergence. Parameters are updated online in continuous time, with the parameter updates satisfying a stochastic differential equation. We prove that where is a natural objective function for the estimation of the continuous-time dynamics.
The stochastic gradient descent update in continuous time follows the SDE:
where is matrix valued and is the learning rate. The parameter update (1.2) can be used for both statistical estimation given previously observed data as well as online learning (i.e., statistical estimation in real-time as data becomes available). SGDCT will still converge if in (1.2) is replaced by the identity matrix .
We assume that is sufficiently ergodic (to be concretely specified later in the paper) and that it has some well-behaved as its unique invariant measure. As a general notation, if is a generic function, then we define its average over to be
The gradient cannot be evaluated since is unknown. However, is a noisy estimate of , which leads to the algorithm (1.2). SGDCT follows a noisy descent direction along a continuous stream of data produced by .
Heuristically, it is expected that will tend towards the minimum of the function . The data will be correlated over time, which complicates the mathematical analysis. This differs from the standard discrete-time version of stochastic gradient descent where the the data is usually considered to be i.i.d. at every step.
In this paper we show that if is appropriately chosen then as with probability 1 (see Theorem 2.4). Results like this have been previously derived for stochastic gradient descent in discrete time; see and . proves convergence in the absence of the term. proves convergence of stochastic gradient descent in discrete time with the process but requires stronger conditions than .
Although stochastic gradient descent for discrete time has been extensively studied, stochastic gradient descent in continuous time has received relatively little attention. We refer readers to and for a thorough review of the very large literature on stochastic gradient descent. There are also many algorithms which modify traditional stochastic gradient descent (stochastic gradient descent with momentum, Adagrad, RMSprop, etc.). For a review of these variants of stochastic gradient descent, see . We mention below the prior work which is most relevant to our paper.
Our approach and assumptions required for convergence are most similar to , who prove convergence of discrete-time stochastic gradient descent in the absence of the process. The presence of the process is essential for considering a wide range of problems in continuous time, and showing convergence with its presence is considerably more difficult. The term introduces correlation across times, and this correlation does not disappear as time tends to infinity. This makes it challenging to prove convergence in the continuous-time case. In order to prove convergence, we use an appropriate Poisson equation associated with to describe the evolution of the parameters for large times.
proves, in a setting different than ours, convergence in of projected stochastic gradient descent in discrete time for convex functions. In projected gradient descent, the parameters are projected back into an a priori chosen compact set. Therefore, the algorithm cannot hope to reach the minimum if the minimum is located outside of the chosen compact set. Of course, the compact set can be chosen to be very large for practical purposes. Our paper considers unconstrained stochastic gradient descent in continuous time and proves the almost sure convergence as taking into account the component as well. We do not assume any stability conditions on (except that it is ergodic with a unique invariant measure).
Another approach for proving convergence of discrete-time stochastic gradient descent is to show that the algorithm converges to the solution of an ODE which itself converges to a limiting point. This is the approach of . See also . This method, sometimes called the “ODE method”, requires the assumption that the iterates (i.e., the model parameters which are being learned) remain in a bounded set with probability one. It is unclear whether the ODE method of proof can be successfully used to show convergence for a continuous-time stochastic gradient descent scheme. In this paper we follow a potentially more straightforward method of proof by analyzing the speed of convergence to equilibrium with an appropriately chosen Poisson type of equation.
studies continuous-time stochastic mirror descent in a setting different than ours. In the framework of , the objective function is known. In this paper, we consider the statistical estimation of the unknown dynamics of a random process (i.e. the process satisfying (1.1)).
Statisticians and financial engineers have actively studied parameter estimation of SDEs, although typically not with statistical learning or machine learning approaches. The likelihood function will usually be calculated from the entire observed path of (i.e., batch optimization) and then maximized to find the maximum likelihood estimator (MLE). Unlike in this paper, the actual optimization procedure to maximize the likelihood function is often not analyzed.
Some relevant publications in the financial statistics literature include , , , and . derives the likelihood function for continuously observed . The MLE can be calculated via batch optimization. and consider the case where is discretely observed and calculate MLEs via a batch optimization approach. estimates parameters by a Bayesian approach. Readers are referred to for thorough reviews of classical statistical inference methods for stochastic differential equations.
2 Applications of SGDCT
Continuous-time models are especially common in finance. Given a continuous stream of data, the stochastic gradient descent algorithm can be used to estimate unknown parameters or functions in SDE models for stocks, bonds, interest rates, and financial derivatives. Numerical analysis of SGDCT for two common financial models is included in Sections 5.1, 5.2, and 5.5. The first is the well-known Ornstein-Uhlenbeck (OU) process (for examples in finance, see , , , and ). The second is the multidimensional CIR process which is a common model for interest rates (for examples in finance, see , , , , and ).
Scientific and engineering models are also typically in continuous-time. There are often coefficients or functions in these models which are uncertain or unknown; stochastic gradient descent can be used to learn these model parameters from data. In Section 5, we study the numerical performance for two example applications: Burger’s equation and the classic reinforcement learning problem of balancing a pole on a moving cart. Burger’s equation is a widely used nonlinear partial differential equation which is important to fluid mechanics, acoustics, and aerodynamics.
A natural question is why use SGDCT versus a straightforward approach which (1) discretizes the continuous-time dynamics and then (2) applies traditional stochastic gradient descent. For some of the same reasons that scientific models have been largely developed in continuous time, it can be advantageous to develop continuous-time statistical learning for continuous-time models.
SGDCT allows for the application of numerical schemes of choice to the theoretically correct statistical learning equation for continuous-time models. This can lead to more accurate and more computationally efficient parameter updates. Numerical schemes are always applied to continuous-time dynamics and different numerical schemes may have different properties for different continuous-time models. A priori performing a discretization to the system dynamics and then applying a traditional discrete-time stochastic gradient descent scheme can result in a loss of accuracy. For example, there is no guarantee that (1) using a higher-order accurate scheme to discretize the system dynamics and then (2) applying traditional stochastic gradient descent will produce a statistical learning scheme which is higher-order accurate in time. Hence, it makes sense to first develop the continuous-time statistical learning equation, and then apply the higher-order accurate numerical scheme.
Besides model estimation, SGDCT can be used to solve continuous-time optimization problems, such as American options. We combine SGDCT with a deep neural network to solve American options in up to dimensions (see Section 6). An alternative approach would be to discretize the dynamics and then use the Q-learning algorithm (traditional stochastic gradient descent applied to an approximation of the discrete HJB equation). However, Q-learning is biased while SGDCT is unbiased. Furthermore, in SDE models with Brownian motions, the Q-learning algorithm can blow up as the time step size becomes small; see Section 6 for details.
The convergence issue with Q-learning highlights the importance of studying continuous-time algorithms for continuous-time models. It is of interest to show that (1) a discrete-time scheme converges to an appropriate continuous-time scheme as and (2) the continuous-time scheme converges to the correct estimate as . These are important questions since any discrete scheme for a continuous-time model incurs some error proportional to , and therefore must be decreased to reduce error. It is also important to note that in some cases, such as Q-learning, computationally expensive terms in the discrete algorithm (such as expectations over high-dimensional spaces) may become much simpler expressions in the continuous-time scheme (differential operators).
3 Organization of Paper
The paper is organized into five main sections. Section 2 presents the assumption and the main theorem. In Section 3 we prove the main result of this paper for the convergence of continuous-time stochastic gradient descent. The extension of the stochastic gradient descent algorithm to the case of a variable diffusion coefficient function is described in Section 4. Section 5 provides numerical analysis of SGDCT for model estimation in several applications. Section 6 discusses SGDCT for solving continuous-time optimization problems, particularly focusing on American options.
Assumptions and Main Result
Before presenting the main result of this paper, Theorem 2.4, let us elaborate on the standing assumptions. In regards to the learning rate the standing assumption is
Assume that , , and that there is a such that =0.
A standard choice for that satisfies Condition 2.1 is for some constant . Notice that the condition follows immediately from the other two restrictions for the learning rate if it is chosen to be a monotonic function of .
Let us next discuss the assumptions that we impose on , and . Condition 2.2 guarantees uniqueness and existence of an invariant measure for the process.
We assume that is non-degenerate bounded diffusion matrix and
Moreover, there exists and such that
The function is with . Namely, it has two derivatives in , with all partial derivatives being Hölder continuous, with exponent , with respect to .
Condition 2.3 allows one to control the ergodic behavior of the X process. As will be seen from the proof of the main convergence result Theorem 2.4, one needs to control terms of the form . Due to ergodicity of the process one expects that such terms are small in magnitude and go to zero as . However, the speed at which they go to zero is what matters here. We treat such terms by rewriting them equivalently using appropriate Poisson type partial differential equations (PDE). Condition 2.3 guarantees that these Poisson equations have unique solutions that do not grow faster than polynomially in the variable (see Theorem A.1 in Appendix A).
The main result of this paper is Theorem 2.4.
Assume that Conditions 2.1, 2.2 and 2.3 hold. Then we have that
Proof of Theorem 2.4
We proceed in a spirit similar to that of . However, apart from continuous versus discrete dynamics, one of the main challenges of the proof here is the presence of the ergodic process. Let us consider an arbitrarily given and to be chosen. Then set and consider the cycles of random times
The purpose of these random times is to control the periods of time where is close to zero and away from zero. Let us next define the random time intervals and . Notice that for every we have .
Let us next consider some sufficiently small to be chosen later on and set . Lemma 3.1 is crucial for the proof of Theorem 2.4.
Assume that Conditions 2.1, 2.2 and 2.3 hold. Let us set
The idea is to use Theorem A.1 in order to get an equivalent expression for the term that we seek to control.
Let us consider the function . Notice that by definition and due to Condition 2.3, the function satisfies the centering condition (A.1) of Theorem A.1 componentwise. So, the Poisson equation (A.2) will have a unique smooth solution, denoted by that grows at most polynomially in . Let us apply Itô formula to the vector valued function . Doing so, we get for
where and denote the infinitesimal generators for processes and respectively.
Recall now that is the solution to the given Poisson equation and that . Using these facts and rearranging the previous Itô formula, we get in vector notation
The next step is to treat each term on the right hand side of (3) separately. For this purpose, let us first set
By Theorem A.1 and Proposition 2 of there is some (that may change from line to line below) and such that for large enough
By Condition 2.1 let us consider such that and for any define the event . Then we have for large enough such that
Therefore, by Borel-Cantelli lemma we have that for every there is a finite positive random variable and some such that for every one has
Thus for and one has for some finite constant
The latter display then guarantees that for we have with probability one
By the bounds of Theorem A.1 we see that there are constants (that may change from line to line) and such that
The first inequality follows by Theorem A.1, the second inequality follows by Proposition 1 in and the third inequality follows by Condition 2.1.
The latter display implies that there is a finite random variable such that
The last term that we need to consider is the martingale term
Notice that the Burkholder-Davis-Gundy inequality and the bounds of Theorem A.1 (doing calculations similar to the ones for the term ) give us that for some finite constant , we have
Thus, by Doob’s martingale convergence theorem there is a square integrable random variable such that
Let us now go back to (3). Using the terms , and we can write
The last display together with (3.2), (3.3) and (3.4) imply the statement of the lemma. ∎
Assume that Conditions 2.1, 2.2 and 2.3 hold. Choose such that for a given , one has , where is the Lipschitz constant of . For large enough and for small enough (potentially random depending on ), one has . In addition we also have with probability one.
We proceed with an argument via contradiction. In particular let us assume that and let us choose arbitrarily some such that .
Let us now make some remarks that are independent of the sign of . Due to the summability condition , and Conditions 2.1 and 2.3, we have that
Hence, the martingale convergence theorem applies to the martingale . This means that there exists a square integrable random variable such that both almost surely and in . This means that for the given there is large enough such that almost surely.
Let us also assume that for the given , is so small such that for any one has .
Let us next bound appropriately the Euclidean norm of the vector-valued random variable
By Lemma 3.1 we have that for the same that was chosen before there is large enough such that almost surely
Hence, using also the fact that we obtain
The latter then implies that we should have
The latter statement will then imply that
But then we would necessarily have that , since otherwise which is impossible.
Next we move on to prove the second statement of the lemma. By definition we have . So it remains to show that . Since we know that and because for large enough and small enough one should have , we obtain that
Lemma 3.3 shows that the function and its first two derivatives are uniformly bounded in .
Assume Conditions 2.1, 2.2 and 2.3. For any , there is a constant such that
In addition we also have that there is a constant such that .
By Theorem 1 in , the density of the measure admits, for any , a constant such that . Choosing large enough that , we then obtain
concluding the proof of the first statement of the lemma. Let us now focus on the second part of the lemma. We only prove the claim for , since due to the bounds in Condition 2.3, the proof for is the same. By Condition 2.3 and by the first part of the lemma, we have that there exist constants such that
Our next goal is to show that if the index is large enough, then decreases, in the sense of Lemma 3.4.
Assume Conditions 2.1, 2.2 and 2.3. Suppose that there are an infinite number of intervals . There is a fixed constant such that for large enough, one has
Let’s first consider . Notice that for all one has . Hence, for sufficiently large , we have the upper bound:
since Lemma 3.1 proved that for sufficiently large .
We next address and show that it becomes small as . First notice that we can trivially write
By Condition 2.3 and Itô isometry we have
where is defined via (3.5). Hence, by Doob’s martingale convergence theorem there is a square integrable random variable such that both almost surely and in . The latter statement implies that for a given there is large enough such that almost surely
where we have used Condition 2.3 and Lemma 3.3. Bound (3.7) implies that
is finite almost surely, which in turn implies that there is a finite random variable such that
with probability one. Since is finite, as with probability one.
Finally, we address . Let us consider the function . The function satisfies the centering condition (A.1) of Theorem A.1. Therefore, the Poisson equation (A.2) with right hand side will have a unique smooth solution, say , that grows at most polynomially in . Let us apply Itô formula to the function that is solution to this Poisson equation.
Rearranging the previous Itô formula yields
Following the exact same steps as in the proof of Lemma 3.1 gives us that almost surely.
We now return to and provide an upper bound which is negative. For sufficiently large , we have that:
Choose . On the one hand, if :
On the other hand, if , then
Finally, let and the proof of the lemma is complete.
Assume Conditions 2.1, 2.2 and 2.3. Suppose that there are an infinite number of intervals . There is a fixed constant such that for large enough,
First, recall that for . Similar to before, we have that:
The right hand side (RHS) of equation (3.8) converges almost surely to as as a consequence of similar arguments as given in Lemma 3.4. Indeed, the treatment of the second and third terms on the RHS of (3.8) are exactly the same as in Lemma 3.4. It remains to show that the first term on the RHS of (3.8) converges almost surely to as .
As shown in Lemma 3.4, as almost surely. Finally, note that (except when , in which case the interval is length 0 and hence the integral (3.9) over is ). Then, as almost surely.
Therefore, with probability one, for sufficiently large .
Choose a . First, consider the case where there are a finite number of times . Then, there is a finite such that for . Now, consider the other case where there are an infinite number of times and use Lemmas 3.4 and 3.5. With probability one,
for sufficiently large . Choose a such that (3.10) holds for . This leads to:
Let and then . However, we also have that by definition . This is a contradiction, and therefore almost surely there are a finite number of times .
Consequently, there exists a finite time (possibly random) such that almost surely for . Since the original was arbitrarily chosen, this shows that as almost surely. ∎
Estimating the Coefficient Function of the Diffusion Term and Generalizations
The stochastic gradient descent update in continuous time follows the stochastic differential equations:
We assume that is such that the process is ergodic with a unique invariant measure (for example one may assume that it is non-degenerate, i.e., bounded away from zero and bounded by above). In addition, we assume that satisfies the same assumptions as does in Condition 2.3.
From the previous results in Section 3, as with probability 1. Let’s study the convergence of the stochastic gradient descent algorithm (4) for . By Itô’s formula,
Applying exactly the same procedure as in Section 3, as with probability 1. We omit the details as the proof is exactly the same as in Section 3.
Notice also that is not identifiable; for example, has the same distribution under the diffusion coefficient . Only is identifiable. We are therefore essentially estimating a model for .
We close this section with the following remark.
Model Estimation: Numerical Analysis
We implement SGDCT for several applications and numerically analyze the convergence. Section 5.1 studies continuous-time stochastic gradient descent for the Ornstein-Uhlenbeck process, which is widely used in finance, physics, and biology. Section 5.2 studies the multidimensional Ornstein-Uhlenbeck process. Section 5.3 estimates the diffusion coefficient in Burger’s equation with continuous-time stochastic gradient descent. Burger’s equation is a widely-used nonlinear partial differential equation which is important to fluid mechanics, acoustics, and aerodynamics. Burger’s equation is extensively used in engineering. In Section 5.4, we show how SGDCT can be used for reinforcement learning. In the final example, the drift and volatility functions for the multidimensional CIR process are estimated. The CIR process is widely used in financial modeling.
For the numerical experiments, we use an Euler scheme with a time step of . The learning rate is with . We simulate data from (5.1) for a particular and the stochastic gradient descent attempts to learn a parameter which fits the data well. is the statistical estimate for at time . If the estimation is accurate, should of course be close to . This example can be placed in the form of the original class of equations (1.1) by setting and .
We study cases. For each case, a different is generated uniformly at random in the range . For each case, we solve for the parameter over the time period for . To summarize:
Generate a random in
Simulate a single path of given and simultaneously solve for the path of on
The accuracy of at times , and is reported in Table 1. Figures 1 and 2 plot the mean error in percent and mean squared error (MSE) against time. In the table and figures, the “error” is where represents the -th case. The “error in percent” is . The “mean error in percent” is the average of these errors, i.e. .
Finally, we also track the objective function over time. Figure 3 plots the error against time. Since the limiting distribution of (5.2) is Gaussian with mean and variance , we have that:
2 Multidimensional Ornstein-Uhlenbeck process
For the numerical experiments, we use an Euler scheme with a time step of . The learning rate is with . We simulate data from (5.2) for a particular and the stochastic gradient descent attempts to learn a parameter which fits the data well. is the statistical estimate for at time . If the estimation is accurate, should of course be close to . This example can be placed in the form of the original class of equations (1.1) by setting and .
The matrix must be generated carefully to ensure that is ergodic and has a stable equilibrium point. If some of ’s eigenvalues have negative real parts, then can become unstable and grow arbitrarily large. Therefore, we randomly generate matrices which are strictly diagonally dominant. ’s eigenvalues are therefore guaranteed to have positive real parts and will be ergodic. To generate random strictly diagonally dominant matrices , we first generate uniformly at random in the range $i\neq jA_{i,i}^{\ast}=\sum_{j\neq i}A_{i,j}^{\ast}+U_{i,i}U_{i,i}M_{i}^{\ast}i=1,\ldots,d$.
We study cases and analyze the error in Table 2. Figures 4 and 5 plot the error over time.
3 Burger’s Equation
The stochastic Burger’s equation that we consider is given by:
where and is a Brownian sheet. The finite-difference discretization of (5.3) satisfies a system of nonlinear stochastic differential equations (for instance, see or ). We use continuous-time stochastic gradient descent to learn the diffusion parameter .
We use the following finite difference scheme for Burger’s equation:
For our numerical experiment, the boundary conditions and are used and . (5.4) is simulated with the Euler scheme (i.e., we solve Burger’s equation with explicit finite difference). A spatial discretization of and a time step of are used. The learning rate is with . The small time step is needed to avoid instability in the explicit finite difference scheme. We simulate data from (5.3) for a particular diffusion coefficient and the stochastic gradient descent attempts to learn a diffusion parameter which fits the data well. is the statistical estimate for at time . If the estimation is accurate, should of course be close to .
This example can be placed in the form of the original class of equations (1.1). Let be the -th element of the function . Then, . Similarly, let be the -th element of the function . Then, .
We study cases. For each case, a different is generated uniformly at random in the range . This represents a wide range of physical cases of interest, with ranging over two orders of magnitude. For each case, we solve for the parameter over the time period for .
The accuracy of at times and is reported in Table 3. Figures 6 and 7 plot the mean error in percent and mean squared error against time. The convergence of to is fairly rapid in time.
4 Reinforcement Learning
We consider the classic reinforcement learning problem of balancing a pole on a moving cart (see ). The goal is to balance a pole on a cart and to keep the cart from moving outside the boundaries via applying a force of Newtons.
The position of the cart, the velocity of the cart, angle of the pole , and angular velocity of the pole are observed. The dynamics of satisfy a set of ODEs (see ):
where is the acceleration due to gravity, is the mass of the cart, is the mass of the pole, is the length of the pole, is the coefficient of friction of the cart on the ground, is the coefficient of friction of the pole on the cart, and is the force applied to the cart.
For this example, . The model where is a single-layer neural network with rectified linear units.
The boundary is meters and the pole must not be allowed to fall below radians (the frame of reference is chosen such that the perfectly upright is radians). A reward of is received every seconds if and . A reward of is received (and the episode ends) if the cart moves beyond or the pole falls below radians. The sum of these rewards across the entire episode is the reward for that episode. The initial state at the start of an episode is generated uniformly at random in . For our numerical experiment, we assume that the rule for receiving the rewards and the distribution of the initial state are both known. An action of Newtons may be chosen every seconds. This force is then applied for the duration of the next seconds. The system (5.5) is simulated using an Euler scheme with a time step size of seconds.
The goal, of course, is to statistically learn the optimal actions in order to achieve the highest possible reward. This requires both: 1) statistically learning the physical dynamics of and 2) finding the optimal actions given these dynamics in order to achieve the highest possible reward. The dynamics satisfy the set of ODEs (5.5); these dynamics can be learned using continuous-time stochastic gradient descent. We use a neural network for . Given the estimated dynamics , we use a policy gradient method to estimate the optimal actions. The approach is summarized below.
For time :
Update the model for the dynamics using continuous-time stochastic gradient descent.
Periodically update the optimal policy using policy gradient method. The optimal policy is learned using data simulated from the model . Actions are randomly selected via the policy .
The policy is a neural network with parameters . We use a single hidden layer with rectified linear units followed by a softmax layer for and train it using policy gradients.Let be the reward for episode at time . Let be the cumulative discounted reward from episode after time where is the discount factor. Stochastic gradient descent is used to learn the parameter : where is the learning rate. In practice, the cumulative discounted rewards are often normalized across an episode. The policy gives the probability of taking action conditional on being in the state .
cases are run, each for hours. The optimal policy is learned using the estimated dynamics and is updated every episodes. Table 4 reports the results at fixed episodes using continuous-time stochastic gradient descent. Table 5 reports statistics on the number of episodes required until a target episodic reward (, , ) is first achieved.
Alternatively, one could directly apply policy gradient to learn the optimal action using the observed data. This approach does not use continuous-time stochastic gradient descent to learn the model dynamics, but instead directly learns the optimal policy from the data. Again using 525 cases, we report the results in Table 6 for directly learning the optimal policy without using continuous-time stochastic gradient descent to learn the model dynamics. Comparing Tables 4 and 6, it is clear that using continuous-time stochastic gradient descent to learn the model dynamics allows for the optimal policy to be learned significantly more quickly. The rewards are much higher when using continuous-time stochastic gradient descent (see Table 4) than when not using it (see Table 6).
5 Estimating both the drift and volatility functions for the multidimensional CIR process
American Options
High-dimensional American options are extremely computationally challenging to solve with traditional numerical methods such as finite difference. Here we propose a new approach using statistical learning to solve high-dimensional American options. SGDCT achieves a high accuracy on two benchmark problems with 100 dimensions.
Before describing the SGDCT algorithm for American options, it is important to note that traditional stochastic gradient descent faces certain difficulties in this class of problems. Some brief remarks are provided below regarding this fact; the authors plan to elaborate on these issues in more detail in a future work. The well-known Q-learning algorithm uses stochastic gradient descent to minimize an approximation to the discrete-time Hamilton-Jacobi-Bellman equation. To demonstrate the challenges and the issues that arise, consider using Q-learning to estimate the value function:
where is a discount factor and is a reward function. The function is an approximation for the value function . The parameter must be estimated. The traditional approach would discretize the dynamics (6.1) and then apply a stochastic gradient descent update to the objective function:
This results in the stochastic gradient descent algorithm:
Although now computationally efficient, the Q-learning algorithm (6.4) is now biased (due to ignoring the inner expectations). Furthermore, when , the Q-learning algorithm (6.4) blows up. A quick investigation shows that the term arises while all other terms are or .
The SGDCT algorithm is unbiased and computationally efficient. It can be directly derived by letting and using Itô’s formula in (6.3):
Note that computationally challenging terms in (6.3) become differential operators in (6.7), which are usually easier to evaluate. This is one of the advantages of developing the theory in continuous time for continuous-time models. Once the continuous-time algorithm is derived, it can be appropriately discretized for numerical solution.
2 SGDCT for American Options
is the infinitesimal generator for the process. The continuous-time algorithm (6.7) is run for many iterations until convergence. See the authors’ paper for implementation details on pricing American options with deep learning.
We implement the SGDCT algorithm (6.7) using a deep neural network for the function . Two benchmark problems are considered where semi-analytic solutions are available. The SGDCT algorithm’s accuracy is evaluated for American options in dimensions, and the results are presented in Table 8.
Appendix A On a related Poisson equation
We recall the following regularity result from on the Poisson equations in the whole space, appropriately stated to cover our case of interest.
and that for some positive constants and ,
Let be the infinitesimal generator for the process. Then the Poisson equation