Stochastic Process#
This page gives an overview of all Stochastic Processes available in the library.
- class quantflow.sp.base.StochasticProcess
Base class for stochastic processes in continuous time
Methods:
analytical_cdf
Analytical cdf of the process at time t
analytical_mean
Analytical mean of the process at time t
analytical_pdf
Analytical pdf of the process at time t
analytical_variance
Analytical variance of the process at time t
characteristic
Characteristic function at time t for a given input parameter
characteristic_exponent
Characteristic exponent at time t for a given input parameter
convexity_correction
Convexity correction for the process
sample
Generate random
Paths
from the process.sample_from_draws
Sample
Paths
from the process given a set of drawsAttributes:
model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- analytical_cdf(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float, x: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) ndarray[tuple[int, ...], dtype[floating[Any]]] | float
Analytical cdf of the process at time t
Implement if available
- analytical_mean(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) ndarray[tuple[int, ...], dtype[floating[Any]]] | float
Analytical mean of the process at time t
Implement if available
- analytical_pdf(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float, x: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) ndarray[tuple[int, ...], dtype[floating[Any]]] | float
Analytical pdf of the process at time t
Implement if available
- analytical_variance(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) ndarray[tuple[int, ...], dtype[floating[Any]]] | float
Analytical variance of the process at time t
Implement if available
- characteristic(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float, u: int | float | complex | ndarray | Series) int | float | complex | ndarray | Series
Characteristic function at time t for a given input parameter
The characteristic function represents the Fourier transform of the probability density function
\[\phi = {\mathbb E} \left[e^{i u x_t}\right]\]- Parameters:
t – time horizon
u – characteristic function input parameter
- abstract characteristic_exponent(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float, u: int | float | complex | ndarray | Series) int | float | complex | ndarray | Series
Characteristic exponent at time t for a given input parameter
- convexity_correction(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) int | float | complex | ndarray | Series
Convexity correction for the process
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class quantflow.sp.base.StochasticProcess1D
Base class for 1D stochastic process in continuous time
- frequency_range(std: float, max_frequency: float | None = None) Bounds
Maximum frequency when calculating characteristic functions
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- support(mean: float, std: float, points: int) ndarray[tuple[int, ...], dtype[floating[Any]]]
Support of the process at time t
- class quantflow.sp.base.IntensityProcess(*, rate: Annotated[float, Gt(gt=0)] = 1.0, kappa: Annotated[float, Gt(gt=0)] = 1.0)
Base class for mean reverting 1D processes which can be used as stochastic intensity
- abstract integrated_log_laplace(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float, u: int | float | complex | ndarray | Series) int | float | complex | ndarray | Series
The log-Laplace transform of the cumulative process:
\[e^{\phi_{t, u}} = {\mathbb E} \left[e^{i u \int_0^t x_s ds}\right]\]- Parameters:
t – time horizon
u – frequency
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].