tensortrade.stochastic.utils.parameters module¶
-
class
tensortrade.stochastic.utils.parameters.
ModelParameters
(all_s0: float, all_time: int, all_delta: float, all_sigma: float, gbm_mu: float, jumps_lambda: float = 0.0, jumps_sigma: float = 0.0, jumps_mu: float = 0.0, cir_a: float = 0.0, cir_mu: float = 0.0, all_r0: float = 0.0, cir_rho: float = 0.0, ou_a: float = 0.0, ou_mu: float = 0.0, heston_a: float = 0.0, heston_mu: float = 0.0, heston_vol0: float = 0.0)[source]¶ Bases:
object
Defines the model parameters of different stock price models.
Parameters: - all_s0 (float) – The initial asset value.
- all_time (int) – The amount of time to simulate for.
- all_delta (float) – The rate of time. (e.g. 1/252 = daily, 1/12 = monthly)
- all_sigma (float) – The volatility of the stochastic processes.
- gbm_mu (float) – The annual drift factor for geometric brownian motion.
- jumps_lambda (float, default 0.0) – The probability of a jump happening at each point in time.
- jumps_sigma (float, default 0.0) – The volatility of the jump size.
- jumps_mu (float, default 0.0) – The average jump size.
- cir_a (float, default 0.0) – The rate of mean reversion for Cox Ingersoll Ross.
- cir_mu (float, default 0.0) – The long run average interest rate for Cox Ingersoll Ross.
- all_r0 (float, default 0.0) – The starting interest rate value.
- cir_rho (float, default 0.0) – The correlation between the wiener processes of the Heston model.
- ou_a (float, default 0.0) – The rate of mean reversion for Ornstein Uhlenbeck.
- ou_mu (float, default 0.0) – The long run average interest rate for Ornstein Uhlenbeck.
- heston_a (float, default 0.0) – The rate of mean reversion for volatility in the Heston model.
- heston_mu (float, default 0.0) – The long run average volatility for the Heston model.
- heston_vol0 (float, default 0.0) – The starting volatility value for the Heston model.
-
tensortrade.stochastic.utils.parameters.
default
(base_price: float, t_gen: int, delta: float) → tensortrade.stochastic.utils.parameters.ModelParameters[source]¶ Creates a basic model parameter set with key parameters specified default parameters.
Parameters: Returns: ModelParameters – The default model parameters to use.
-
tensortrade.stochastic.utils.parameters.
random
(base_price: float, t_gen: int, delta: float) → tensortrade.stochastic.utils.parameters.ModelParameters[source]¶ Creates a random model parameter set with key parameters specified default parameters.
Parameters: Returns: ModelParameters – The random model parameters to use.