Skip to content
New: Star-import, signal unraveling, Python 3.12 support, and more

#
nb module

Numba-compiled functions for generating data.

Provides an arsenal of Numba-compiled functions that are used to generate data. These only accept NumPy arrays and other Numba-compatible types.

## generate_gbm_data_1d_nb function

    generate_gbm_data_1d_nb(
        n_rows,
        start_value=100.0,
        mean=0.0,
        std=0.01,
        dt=1.0
    )

Generate data using Geometric Brownian Motion (GBM).

## generate_gbm_data_nb function

    generate_gbm_data_nb(
        shape,
        start_value=100.0,
        mean=0.0,
        std=0.01,
        dt=1.0
    )

2-dim version of generate_gbm_data_1d_nb().

Each argument can be provided per column thanks to flexible indexing.

## generate_random_data_1d_nb function

    generate_random_data_1d_nb(
        n_rows,
        start_value=100.0,
        mean=0.0,
        std=0.01,
        symmetric=False
    )

Generate data using cumulative product of returns drawn from normal (Gaussian) distribution.

Turn on `symmetric` to diminish negative returns and make them symmetric to positive ones. Otherwise, the majority of generated paths will go downward.

## generate_random_data_nb function

    generate_random_data_nb(
        shape,
        start_value=100.0,
        mean=0.0,
        std=0.01,
        symmetric=False
    )

2-dim version of generate_random_data_1d_nb().

Each argument can be provided per column thanks to flexible indexing.

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings