  This paper presents a novel and direct approach to price boundary and
final-value problems, corresponding to barrier options, using forward deep
learning to solve forward-backward stochastic differential equations (FBSDEs).
Barrier instruments are instruments that expire or transform into another
instrument if a barrier condition is satisfied before maturity; otherwise they
perform like the instrument without the barrier condition. In the PDE
formulation, this corresponds to adding boundary conditions to the final value
problem. The deep BSDE methods developed so far have not addressed
barrier/boundary conditions directly. We extend the forward deep BSDE to the
barrier condition case by adding nodes to the computational graph to explicitly
monitor the barrier conditions for each realization of the dynamics as well as
nodes that preserve the time, state variables, and trading strategy value at
barrier breach or at maturity otherwise. Given these additional nodes in the
computational graph, the forward loss function quantifies the replication of
the barrier or final payoff according to a chosen risk measure such as squared
sum of differences. The proposed method can handle any barrier condition in the
FBSDE set-up and any Dirichlet boundary conditions in the PDE set-up, both in
low and high dimensions.
