nb module¶
Numba-compiled functions for custom indicators.
Provides an arsenal of Numba-compiled functions that are used by indicator classes. These only accept NumPy arrays and other Numba-compatible types.
adx_1d_nb function¶
Average Directional Movement Index (ADX).
Returns +DI, -DI, DX, and ADX.
adx_nb function¶
2-dim version of adx_1d_nb().
atr_1d_nb function¶
Average True Range (ATR).
Returns TR and ATR.
atr_nb function¶
2-dim version of atr_1d_nb().
avg_gain_1d_nb function¶
Average gain.
avg_gain_nb function¶
2-dim version of avg_gain_1d_nb().
avg_loss_1d_nb function¶
Average loss.
avg_loss_nb function¶
2-dim version of avg_loss_1d_nb().
bbands_1d_nb function¶
Bollinger Bands.
Returns the upper band, the middle band, and the lower band.
bbands_bandwidth_1d_nb function¶
Bollinger Bands Bandwidth.
bbands_bandwidth_nb function¶
2-dim version of bbands_bandwidth_1d_nb().
bbands_nb function¶
2-dim version of bbands_1d_nb().
bbands_percent_b_1d_nb function¶
Bollinger Bands %B.
bbands_percent_b_nb function¶
2-dim version of bbands_percent_b_1d_nb().
final_basic_bands_nb function¶
Final bands at one iteration.
get_dma_hurst_nb function¶
Estimate the Hurst exponent using DMA method.
Windows are linearly distributed.
get_dsod_hurst_nb function¶
Estimate the Hurst exponent using discrete second order derivative.
get_hurst_nb function¶
get_hurst_nb(
close,
method=0,
max_lag=20,
min_log=1,
max_log=2,
log_step=0.25,
min_chunk=8,
max_chunk=100,
num_chunks=5,
stabilize=False
)
Estimate the Hurst exponent using various methods.
Uses the following methods:
HurstMethod.Standard:vectorbtpro.generic.nb.base.get_standard_hurst_nbHurstMethod.LogRS:vectorbtpro.generic.nb.base.get_log_rs_hurst_nbHurstMethod.RS:vectorbtpro.generic.nb.base.get_rs_hurst_nbHurstMethod.DMA:vectorbtpro.generic.nb.base.get_dma_hurst_nbHurstMethod.DSOD:vectorbtpro.generic.nb.base.get_dsod_hurst_nb
get_log_rs_hurst_nb function¶
Estimate the Hurst exponent using R/S method.
Windows are log-distributed.
get_rs_hurst_nb function¶
Estimate the Hurst exponent using R/S method.
Windows are linearly distributed.
get_rs_nb function¶
Get rescaled range (R/S) for Hurst exponent estimation.
get_standard_hurst_nb function¶
Estimate the Hurst exponent using standard method.
iter_basic_bands_nb function¶
Upper and lower bands at one iteration.
iter_med_price_nb function¶
Median price at one iteration.
iter_tr_nb function¶
True Range (TR) at one iteration.
ma_1d_nb function¶
Moving average.
ma_nb function¶
2-dim version of ma_1d_nb().
macd_1d_nb function¶
macd_1d_nb(
close,
fast_window=12,
slow_window=26,
signal_window=9,
wtype=2,
macd_wtype=None,
signal_wtype=None,
minp=None,
macd_minp=None,
signal_minp=None,
adjust=False,
macd_adjust=None,
signal_adjust=None
)
MACD.
Returns the MACD and the signal.
macd_hist_1d_nb function¶
MACD histogram.
macd_hist_nb function¶
2-dim version of macd_hist_1d_nb().
macd_nb function¶
macd_nb(
close,
fast_window=12,
slow_window=26,
signal_window=9,
wtype=2,
macd_wtype=None,
signal_wtype=None,
minp=None,
macd_minp=None,
signal_minp=None,
adjust=False,
macd_adjust=None,
signal_adjust=None
)
2-dim version of macd_1d_nb().
modes_1d_nb function¶
Modes.
Warning
To be used in plotting. Do not use it as an indicator!
modes_nb function¶
2-dim version of modes_1d_nb().
msd_1d_nb function¶
Moving standard deviation.
msd_nb function¶
2-dim version of msd_1d_nb().
obv_1d_nb function¶
On-Balance Volume (OBV).
obv_nb function¶
2-dim version of obv_1d_nb().
ols_1d_nb function¶
Rolling Ordinary Least Squares (OLS).
ols_angle_1d_nb function¶
OLS angle.
ols_angle_nb function¶
2-dim version of ols_angle_1d_nb().
ols_error_1d_nb function¶
OLS error.
ols_error_nb function¶
2-dim version of ols_error_1d_nb().
ols_nb function¶
2-dim version of ols_1d_nb().
ols_pred_1d_nb function¶
OLS prediction.
ols_pred_nb function¶
2-dim version of ols_pred_1d_nb().
pivot_info_1d_nb function¶
Pivot information.
pivot_info_nb function¶
2-dim version of pivot_info_1d_nb().
pivot_value_1d_nb function¶
Pivot value.
pivot_value_nb function¶
2-dim version of pivot_value_1d_nb().
pivots_1d_nb function¶
Pivots.
Warning
To be used in plotting. Do not use it as an indicator!
pivots_nb function¶
2-dim version of pivots_1d_nb().
rolling_hurst_1d_nb function¶
rolling_hurst_1d_nb(
close,
window,
method=0,
max_lag=20,
min_log=1,
max_log=2,
log_step=0.25,
min_chunk=8,
max_chunk=100,
num_chunks=5,
minp=None,
stabilize=False
)
Rolling version of get_hurst_nb().
rolling_hurst_nb function¶
rolling_hurst_nb(
close,
window,
method=0,
max_lag=20,
min_log=1,
max_log=2,
log_step=0.25,
min_chunk=8,
max_chunk=100,
num_chunks=5,
minp=None,
stabilize=False
)
2-dim version of rolling_hurst_1d_nb().
rsi_1d_nb function¶
RSI.
rsi_nb function¶
2-dim version of rsi_1d_nb().
signal_detection_1d_nb function¶
signal_detection_1d_nb(
close,
lag=14,
factor=1.0,
influence=1.0,
up_factor=None,
down_factor=None,
mean_influence=None,
std_influence=None
)
Signal detection.
signal_detection_nb function¶
signal_detection_nb(
close,
lag=14,
factor=1.0,
influence=1.0,
up_factor=None,
down_factor=None,
mean_influence=None,
std_influence=None
)
2-dim version of signal_detection_1d_nb().
stoch_1d_nb function¶
stoch_1d_nb(
high,
low,
close,
fast_k_window=14,
slow_k_window=3,
slow_d_window=3,
wtype=0,
slow_k_wtype=None,
slow_d_wtype=None,
minp=None,
fast_k_minp=None,
slow_k_minp=None,
slow_d_minp=None,
adjust=False,
slow_k_adjust=None,
slow_d_adjust=None
)
Stochastic Oscillator.
Returns the fast %K, the slow %K, and the slow %D.
stoch_k_1d_nb function¶
Stochastic Oscillator %K.
stoch_k_nb function¶
2-dim version of stoch_k_1d_nb().
stoch_nb function¶
stoch_nb(
high,
low,
close,
fast_k_window=14,
slow_k_window=3,
slow_d_window=3,
wtype=0,
slow_k_wtype=None,
slow_d_wtype=None,
minp=None,
fast_k_minp=None,
slow_k_minp=None,
slow_d_minp=None,
adjust=False,
slow_k_adjust=None,
slow_d_adjust=None
)
2-dim version of stoch_1d_nb().
supertrend_1d_nb function¶
Supertrend.
supertrend_acc_nb function¶
Accumulator of supertrend_nb().
Takes a state of type SuperTrendAIS and returns a state of type SuperTrendAOS.
supertrend_nb function¶
2-dim version of supertrend_1d_nb().
tr_1d_nb function¶
True Range (TR).
tr_nb function¶
2-dim version of tr_1d_nb().
typical_price_1d_nb function¶
Typical price.
typical_price_nb function¶
2-dim version of typical_price_1d_nb().
vwap_1d_nb function¶
Volume-Weighted Average Price (VWAP).
vwap_nb function¶
2-dim version of vwap_1d_nb().