Simulation models#

sigtech.framework.infra.data_adapter.simulations.models.bootstrap(data, size, seed, replace=True)

Generate random samples from a given one-dimensional array.

Parameters
  • data – One-dimensional array.

  • size – Output shape.

  • seed – Seed.

  • replace – Whether the sample is with or without replacement (default is True).

Returns

Generated random samples.

sigtech.framework.infra.data_adapter.simulations.models.normal_distribution(mean, std, size, seed)

Generate random samples from a normal Gaussian distribution.

Parameters
  • mean – Mean of the distribution.

  • std – Standard deviation of the distribution

  • size – Output shape.

  • seed – Seed.

Returns

Generated random samples.

sigtech.framework.infra.data_adapter.simulations.models.cir_process(initial, target, sigma, alpha, step_size, size, seed, sampling_steps=1)

Generate random samples from a Cox–Ingersoll–Ross model distribution.

Parameters
  • initial – Initial value.

  • target – Target value.

  • sigma – Sigma.

  • alpha – Alpha.

  • step_size – Step size.

  • size – Output shape.

  • seed – Seed.

  • sampling_steps – Sampling steps (default is 1).

Returns

Generated random samples.

sigtech.framework.infra.data_adapter.simulations.models.fit_cir_process(data, step_size=1, shift=1, floor=0.01)

Compute the parameters target, sigma, alpha to be used in the Cox–Ingersoll–Ross model.

Parameters
  • data – Input data.

  • step_size – Step size (default is 1).

  • shift – Shift value (default is 1).

  • floor – Floor value (default is 0.01).

Returns

tuple (target, sigma, alpha).