Paths¶
quantflow.ta.paths.Paths
pydantic-model
¶
Bases: BaseModel
Paths of a stochastic process
This is the output from a simulation of a stochastic process.
Fields:
-
t(float) -
data(FloatArray)
path
¶
dates
¶
Dates of paths as a pandas DatetimeIndex
Source code in quantflow/ta/paths.py
mean
¶
std
¶
var
¶
paths_mean
¶
mean for each path
If scaled is True, the mean is scaled by the time step
paths_std
¶
standard deviation for each path
If scaled is True, the standard deviation is scaled by the square root of the time step
Source code in quantflow/ta/paths.py
paths_var
¶
variance for each path
If scaled is True, the variance is scaled by the time step
Source code in quantflow/ta/paths.py
as_datetime_df
¶
Paths as pandas DataFrame with datetime index
integrate
¶
hurst_exponent
¶
Estimate the Hurst exponent from all paths
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
number of lags to consider, if not provided it uses half of the time steps capped at 100
TYPE:
|
Source code in quantflow/ta/paths.py
cross_section
¶
Cross section of paths at time t
| PARAMETER | DESCRIPTION |
|---|---|
t
|
time of cross section
TYPE:
|
Source code in quantflow/ta/paths.py
pdf
¶
Estimate the Probability density function from paths at a given time horizon.
This method calculates a DataFrame with the probability density function of the paths at a given cross section of time. By default it take the last section.
| PARAMETER | DESCRIPTION |
|---|---|
t
|
time at which to calculate the pdf
TYPE:
|
num_bins
|
number of bins to use
TYPE:
|
delta
|
optional size of bins (cannot be set with num_bins)
TYPE:
|
symmetric
|
An optional value where to center bins
TYPE:
|
Source code in quantflow/ta/paths.py
plot
¶
normal_draws
classmethod
¶
Create paths from normal draws
| PARAMETER | DESCRIPTION |
|---|---|
paths
|
Number of paths to simulate
TYPE:
|
time_horizon
|
Time horizon
TYPE:
|
time_steps
|
Number of time steps to arrive at horizon
TYPE:
|
antithetic_variates
|
Whether to use antithetic variates to reduce variance by generating pairs of paths that are mirror images of each other
TYPE:
|