
2 ERHAN BAYRAKTAR, ASAF COHEN, AND APRIL NELLIS
[33]. Energy storage problems [18, 32, 39] are another popular application of optimal switching, but we focus
on scheduling and production problems in our current work.
Various approaches have been taken to avoid a grid-based method, as grids are very susceptible to the
so-called “curse of dimensionality”, including many Monte Carlo-based methods like [40, 1]. However, such
probabilistic approaches are also limited in the dimension they can handle, as most rely on regression
over a number of basis functions that grows quickly with the dimension of the state space. In recent
years, the applications of machine learning to mathematical problems has become more and more common,
many inspired by seminal works such as [24], which trains a neural network to minimize the global error
associated with the backward stochastic differential equation (BSDE) representation of certain classes of
partial differential equations (PDEs). Expanding upon this work, neural networks have been found to
accurately estimate the solutions of a variety of partial differential equations of varying complexities when
used in different configurations, as in [26, 36, 6, 20]. In addition, the early paper [2] utilized neural networks
to solve for an optimal gas consumption strategy under uncertainty. It follows that such neural network-
based methods can be extended to solve optimal switching problems. Our algorithm draws upon the neural-
network-based deep backward dynamic programming approach introduced in [26] and extends it to situations
where the reflection boundary is no longer a known function, like the payoff of an American option. Instead,
the reflection boundary becomes dependent on the optimal control decision at the given point in time. We
also introduce jumps in the state process, which change the associated formulation from a partial differential
equation to a partial integro-differential equation (PIDE). These jumps are incorporated into the model to
better simulate the volatility inherent in electricity and fossil fuel markets. The recent work [21] extends
[24] to a setting with jumps, and [19] applies neural networks to PIDEs that arise in insurance mathematics.
In this paper, we extend [26] to handle both jumps and switches in a wider range of problems. This
algorithm is able to handle high-dimensional problems well because the time needed for artificial neural
network computations grows only linearly in the dimension of the state variable and suffers only minimal
slowdowns as the dimension increases, as demonstrated in Section 4. Our code can be found at https:
//github.com/april-nellis/osj.
In Section 2, we introduce the general stochastic model of an optimal switching problem. In Section 3,
we provide some background on neural networks and detail the proposed machine learning algorithm. In
Section 4 we discuss numerical examples of energy scheduling and capacity investment, and demonstrate the
high-dimensional abilities of our algorithm1. In Section 5, we verify the convergence of the neural networks
in our proposed algorithm to the true value functions.
2. Stochastic Model
2.1. Setup. The goal of our paper is to numerically solve high-dimensional optimal switching problems
related to energy production. Consider a filtered probability space (Ω,F,{Ft}t,P) satisfying the usual
conditions and supporting a d-dimensional Wiener process Wand a one-dimensional Poisson random measure
N(de, ds) with intensity measure ν(de)ds, where RRdν(de) = λ≥0. Consider further a d-dimensional jump-
diffusion process, given by
(2.1) Xt=x0+Zt
0
b(Xs)ds +Zt
0
σ(Xs)dWs+Zt
0ZRd
β(Xs−, e)N(de, ds), t ∈[0, T ], x0∈Rd.
Here, b:Rd→Rd,σ:Rd→Rd×d, and β:Rd×E→Rd, where dis a relatively large dimension and
E⊆Rd.
Assumption 1. We assume that
(1) The functions b,σ, and βare Lipschitz, and βis a measurable map such that there exists K > 0for
which
sup
ξ∈E|β(0, ξ)| ≤ Kand sup
ξ∈E|β(x, ξ)−β(x′, ξ)| ≤ K|x−x′|,∀x, x′∈Rd.
(2) The function β(x, ξ)has Jacobian such that ∇β(x, ξ) + Idis invertible with a bounded inverse.
Remark 1. From the appendices of [8], the conditions in assumption 1 imply the existence of a unique
adapted solution Xtto eq. (2.1).
1All calculations in this paper were performed on a 10-core CPU, 16-core GPU 2021 Macbook Pro with M1 Pro chip, without
using GPU acceleration.