This document outlines the core mathematical and financial theories that form the foundation of the DeepQuant library. It covers the models for asset price simulation and the feature representation of price paths.
The theoretical framework for modern quantitative finance is built upon a formal probabilistic setup. We begin by defining a filtered probability space
-
$\Omega$ is the sample space of all possible outcomes. -
$\mathcal{F}$ is a$\sigma$ -algebra representing the set of all possible events. -
$\mathbb{P}$ is the probability measure. -
$\{\mathcal{F}_t\}_{t \in [0,T]}$ is the filtration, an increasing family of$\sigma$ -algebras where$\mathcal{F}_t$ represents the information available up to time$t$ .
All stochastic processes, such as the asset price
The pricing of an American option within this framework is an optimal stopping problem. The key challenge is to find the optimal time to exercise to maximize the expected payoff.
Definition: The price of an American option (
Its value is given by the formula:
where
To solve this, the DeepQuant library uses a primal-dual approach. This method computes a mathematically rigorous price interval, trapping the true price between a lower and an upper bound. The difference, the duality gap, serves as a built-in measure of accuracy.
Stochastic Differential Equations (SDEs) are the mathematical language used to describe the random evolution of asset prices and their volatility. The library's adaptive framework selects the most appropriate SDE model based on market conditions, which are quantified by the Hurst parameter (H).
Definition: A Stochastic Differential Equation (SDE) is a differential equation in which at least one term is a stochastic process, resulting in a solution that is also a stochastic process. It's a mathematical recipe for describing something that has both a predictable trend and a dose of pure randomness!
The rigorous mathematical formulation of an SDE is expressed as an integral equation:
This states that the value of the process at time
For convenience, the SDE is often written in its simpler, equivalent differential form:
This shorthand clearly separates the deterministic drift (
For markets exhibiting classical random-walk behavior, the library employs the Heston model. It is defined by a system of two SDEs:
-
Asset Price (
$S_t$ ):
-
Variance (
$V_t$ ):
where:
-
$s_0$ : The initial stock price. -
$v_0$ : The initial variance. -
$\kappa$ (kappa): The rate of mean reversion, which controls how quickly the variance process returns to its long-term average. -
$\theta$ (theta): The long-term mean of the variance. -
$\xi$ (xi): The volatility of variance, or "vol of vol," which determines the volatility of the variance process itself. -
$\rho$ (rho): The correlation between the asset's random process ($W^s_t$ ) and the variance's random process ($W^v_t$ ). -
$r$ : The risk-free interest rate.
To capture the jagged, "rough" nature of volatility observed in real financial data, the library uses the modern rough Bergomi model. Its core component is the Volterra process:
-
Asset Price (
$S_t$ ):
-
Variance (
$V_t$ ):
where:
-
$s_0$ : The initial stock price. -
$v_0$ : The initial forward variance. -
$H$ (H): The Hurst parameter, which must be in the range (0, 0.5) to model rough volatility. -
$\eta$ (eta): The volatility of volatility parameter. -
$\rho$ (rho): The correlation between the volatility and price processes. -
$r$ : The risk-free interest rate.
Definition: The path signature is a collection of iterated integrals of a path, providing a graded, hierarchical summary of its geometric properties. It's the ultimate path summary, turning a wiggly line into a precise list of its essential features!
For a path
In practice, the library uses the truncated signature up to a specified order. This provides a powerful, finite-dimensional feature vector that serves as the primary input for the library's deep learning solvers.
The connection between a Stochastic Differential Equation (SDE) and a path signature is a formal mathematical mapping. The SDE generates a sample path, and the signature function transforms that path into a unique, structured feature vector. This document details the formal mathematics of that transformation.
The process begins with the output of an SDE simulation: a discrete time series of points
To prepare this for the signature calculation, two mathematical steps are taken:
- The path is augmented with the time dimension to create a new path
$Y_t \in \mathbb{R}^{d+1}$ , where the mathematical definition is:
- A continuous, piecewise linear path is constructed by connecting the points. For any time
$s$ within a simulation interval$[t_i, t_{i+1}]$ , the path is formally defined by the linear interpolation formula:
The signature of the constructed path M:
While this is the general form, for a piecewise linear path, it can be calculated exactly. To simplify the notation, we first define the increment of the
The first-order term,
This vector contains the total time elapsed and the total change in the asset's value.
The second-order term,
The total second-order term is the sum of these changes,
This pattern generalizes to any level M. The
The final, usable signature is the truncated signature, a finite vector containing all computed terms up to level M. The mathematical representation of this final vector is the concatenation of the terms:
This formal process provides a deterministic and unique mapping from any given SDE sample path to a rich feature vector.
The primal problem directly addresses the optimal stopping problem. Its theoretical foundation is the Bellman principle of dynamic programming. In a discrete-time setting, the value of the option
The continuation value (
To solve for
The backward induction process yields an estimated continuation value
where
The resulting lower bound,
The dual problem provides a powerful method for finding a provable upper bound on the option's price. The formulation is derived from the principle that subtracting a "fair game"—a martingale process that starts at zero—from the option's payoff does not change its true value, but allows for the construction of a clear upper bound. ⚖️
The true value of an American option,
The key insight comes from recognizing that for any single path, the value of the process
Combining these steps leads directly to the martingale duality formula:
Since this relationship holds for any valid martingale, the goal of the dual solver is to find the specific martingale that makes this upper bound as tight (as low) as possible. Therefore, the upper bound is the infimum over the space of all valid martingales (
To make this computationally feasible, the search is restricted to a rich family of martingales constructed as stochastic integrals. A general martingale process is defined as:
where
The final outputs of the primal and dual formulations provide the price interval