enums module¶
Named tuples and enumerated types for generic data.
Defines enums and other schemas for vectorbtpro.generic.
BarZone BarZoneT¶
Bar zone.
DistanceMeasure DistanceMeasureT¶
Distance measure.
Attributes
MAE- Mean absolute error.
MSE- Mean squared error.
RMSE- Root mean squared error.
DrawdownStatus DrawdownStatusT¶
Drawdown status.
ErrorType ErrorTypeT¶
Error type.
Attributes
Absolute- Absolute error, that is,
x1 - x0. Relative- Relative error, that is,
(x1 - x0) / x0.
InterpMode InterpModeT¶
Interpolation mode.
Attributes
Line-
Linear interpolation.
For example:
[1.0, 2.0, 3.0]->[1.0, 1.5, 2.0, 2.5, 3.0] Nearest-
Nearest-neighbor interpolation.
For example:
[1.0, 2.0, 3.0]->[1.0, 1.0, 2.0, 3.0, 3.0] Discrete-
Discrete interpolation.
For example:
[1.0, 2.0, 3.0]->[1.0, np.nan, 2.0, np.nan, 3.0] Mixed-
Mixed interpolation.
For example:
[1.0, 2.0, 3.0]->[1.0, 1.5, 2.0, 2.5, 3.0]
OverlapMode OverlapModeT¶
Overlapping mode.
Attributes
AllowAll- Allow any overlapping ranges, even if they start at the same row.
Allow- Allow overlapping ranges, but only if they do not start at the same row.
Disallow- Disallow any overlapping ranges.
Any other positive number will check whether the intersection of each two consecutive ranges is bigger than that number of rows, and if so, the range with the highest similarity will be selected.
RangeStatus RangeStatusT¶
Range status.
RescaleMode RescaleModeT¶
Rescaling mode.
Attributes
MinMax-
Array is rescaled from its min-max range to the min-max range of another array.
For example:
[3.0, 2.0, 1.0]to[10, 11, 12]->[12.0, 11.0, 10.0]Use this to search for patterns irrespective of their vertical scale.
Rebase-
Array is rebased to the first value in another array.
For example:
[3.0, 2.0, 1.0]to[10, 11, 12]->[10.0, 6.6, 3.3]Use this to search for percentage changes.
Disable-
Disable any rescaling.
For example:
[3.0, 2.0, 1.0]to[10, 11, 12]->[3.0, 2.0, 1.0]Use this to search for particular numbers.
WType WTypeT¶
Rolling window type.
drawdown_dt VoidDType¶
np.dtype of drawdown records.
np.dtype([
('id', 'int64'),
('col', 'int64'),
('start_idx', 'int64'),
('valley_idx', 'int64'),
('end_idx', 'int64'),
('start_val', 'float64'),
('valley_val', 'float64'),
('end_val', 'float64'),
('status', 'int64')
])
pattern_range_dt VoidDType¶
np.dtype of pattern range records.
np.dtype([
('id', 'int64'),
('col', 'int64'),
('start_idx', 'int64'),
('end_idx', 'int64'),
('status', 'int64'),
('similarity', 'float64')
])
range_dt VoidDType¶
np.dtype of range records.
np.dtype([
('id', 'int64'),
('col', 'int64'),
('start_idx', 'int64'),
('end_idx', 'int64'),
('status', 'int64')
])
EWMMeanAIS class¶
A named tuple representing the input state of ewm_mean_acc_nb().
To get alpha, use one of the following:
Superclasses
builtins.tuple
adjust method-wrapper¶
Alias for field number 7
alpha method-wrapper¶
Alias for field number 5
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 6
nobs method-wrapper¶
Alias for field number 4
old_wt method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
weighted_avg method-wrapper¶
Alias for field number 3
EWMMeanAOS class¶
A named tuple representing the output state of ewm_mean_acc_nb().
Superclasses
builtins.tuple
nobs method-wrapper¶
Alias for field number 2
old_wt method-wrapper¶
Alias for field number 0
value method-wrapper¶
Alias for field number 3
weighted_avg method-wrapper¶
Alias for field number 1
EWMStdAIS class¶
A named tuple representing the input state of ewm_std_acc_nb().
For tips on alpha, see EWMMeanAIS.
Superclasses
builtins.tuple
adjust method-wrapper¶
Alias for field number 11
alpha method-wrapper¶
Alias for field number 9
cov method-wrapper¶
Alias for field number 4
i method-wrapper¶
Alias for field number 0
mean_x method-wrapper¶
Alias for field number 2
mean_y method-wrapper¶
Alias for field number 3
minp method-wrapper¶
Alias for field number 10
nobs method-wrapper¶
Alias for field number 8
old_wt method-wrapper¶
Alias for field number 7
sum_wt method-wrapper¶
Alias for field number 5
sum_wt2 method-wrapper¶
Alias for field number 6
value method-wrapper¶
Alias for field number 1
EWMStdAOS class¶
A named tuple representing the output state of ewm_std_acc_nb().
Superclasses
builtins.tuple
cov method-wrapper¶
Alias for field number 2
mean_x method-wrapper¶
Alias for field number 0
mean_y method-wrapper¶
Alias for field number 1
nobs method-wrapper¶
Alias for field number 6
old_wt method-wrapper¶
Alias for field number 5
sum_wt method-wrapper¶
Alias for field number 3
sum_wt2 method-wrapper¶
Alias for field number 4
value method-wrapper¶
Alias for field number 7
RollCorrAIS class¶
RollCorrAIS(
i,
value1,
value2,
pre_window_value1,
pre_window_value2,
cumsum1,
cumsum2,
cumsum_sq1,
cumsum_sq2,
cumsum_prod,
nancnt,
window,
minp
)
A named tuple representing the input state of rolling_corr_acc_nb().
Superclasses
builtins.tuple
cumsum1 method-wrapper¶
Alias for field number 5
cumsum2 method-wrapper¶
Alias for field number 6
cumsum_prod method-wrapper¶
Alias for field number 9
cumsum_sq1 method-wrapper¶
Alias for field number 7
cumsum_sq2 method-wrapper¶
Alias for field number 8
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 12
nancnt method-wrapper¶
Alias for field number 10
pre_window_value1 method-wrapper¶
Alias for field number 3
pre_window_value2 method-wrapper¶
Alias for field number 4
value1 method-wrapper¶
Alias for field number 1
value2 method-wrapper¶
Alias for field number 2
window method-wrapper¶
Alias for field number 11
RollCorrAOS class¶
A named tuple representing the output state of rolling_corr_acc_nb().
Superclasses
builtins.tuple
cumsum1 method-wrapper¶
Alias for field number 0
cumsum2 method-wrapper¶
Alias for field number 1
cumsum_prod method-wrapper¶
Alias for field number 4
cumsum_sq1 method-wrapper¶
Alias for field number 2
cumsum_sq2 method-wrapper¶
Alias for field number 3
nancnt method-wrapper¶
Alias for field number 5
value method-wrapper¶
Alias for field number 7
window_len method-wrapper¶
Alias for field number 6
RollCovAIS class¶
RollCovAIS(
i,
value1,
value2,
pre_window_value1,
pre_window_value2,
cumsum1,
cumsum2,
cumsum_prod,
nancnt,
window,
minp,
ddof
)
A named tuple representing the input state of rolling_cov_acc_nb().
Superclasses
builtins.tuple
cumsum1 method-wrapper¶
Alias for field number 5
cumsum2 method-wrapper¶
Alias for field number 6
cumsum_prod method-wrapper¶
Alias for field number 7
ddof method-wrapper¶
Alias for field number 11
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 10
nancnt method-wrapper¶
Alias for field number 8
pre_window_value1 method-wrapper¶
Alias for field number 3
pre_window_value2 method-wrapper¶
Alias for field number 4
value1 method-wrapper¶
Alias for field number 1
value2 method-wrapper¶
Alias for field number 2
window method-wrapper¶
Alias for field number 9
RollCovAOS class¶
A named tuple representing the output state of rolling_cov_acc_nb().
Superclasses
builtins.tuple
cumsum1 method-wrapper¶
Alias for field number 0
cumsum2 method-wrapper¶
Alias for field number 1
cumsum_prod method-wrapper¶
Alias for field number 2
nancnt method-wrapper¶
Alias for field number 3
value method-wrapper¶
Alias for field number 5
window_len method-wrapper¶
Alias for field number 4
RollMeanAIS class¶
A named tuple representing the input state of rolling_mean_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 3
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 6
nancnt method-wrapper¶
Alias for field number 4
pre_window_value method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
window method-wrapper¶
Alias for field number 5
RollMeanAOS class¶
A named tuple representing the output state of rolling_mean_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 0
nancnt method-wrapper¶
Alias for field number 1
value method-wrapper¶
Alias for field number 3
window_len method-wrapper¶
Alias for field number 2
RollOLSAIS class¶
RollOLSAIS(
i,
value1,
value2,
pre_window_value1,
pre_window_value2,
validcnt,
cumsum1,
cumsum2,
cumsum_sq1,
cumsum_prod,
nancnt,
window,
minp
)
A named tuple representing the input state of rolling_ols_acc_nb().
Superclasses
builtins.tuple
cumsum1 method-wrapper¶
Alias for field number 6
cumsum2 method-wrapper¶
Alias for field number 7
cumsum_prod method-wrapper¶
Alias for field number 9
cumsum_sq1 method-wrapper¶
Alias for field number 8
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 12
nancnt method-wrapper¶
Alias for field number 10
pre_window_value1 method-wrapper¶
Alias for field number 3
pre_window_value2 method-wrapper¶
Alias for field number 4
validcnt method-wrapper¶
Alias for field number 5
value1 method-wrapper¶
Alias for field number 1
value2 method-wrapper¶
Alias for field number 2
window method-wrapper¶
Alias for field number 11
RollOLSAOS class¶
RollOLSAOS(
validcnt,
cumsum1,
cumsum2,
cumsum_sq1,
cumsum_prod,
nancnt,
window_len,
slope_value,
intercept_value
)
A named tuple representing the output state of rolling_ols_acc_nb().
Superclasses
builtins.tuple
cumsum1 method-wrapper¶
Alias for field number 1
cumsum2 method-wrapper¶
Alias for field number 2
cumsum_prod method-wrapper¶
Alias for field number 4
cumsum_sq1 method-wrapper¶
Alias for field number 3
intercept_value method-wrapper¶
Alias for field number 8
nancnt method-wrapper¶
Alias for field number 5
slope_value method-wrapper¶
Alias for field number 7
validcnt method-wrapper¶
Alias for field number 0
window_len method-wrapper¶
Alias for field number 6
RollProdAIS class¶
A named tuple representing the input state of rolling_prod_acc_nb().
Superclasses
builtins.tuple
cumprod method-wrapper¶
Alias for field number 3
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 6
nancnt method-wrapper¶
Alias for field number 4
pre_window_value method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
window method-wrapper¶
Alias for field number 5
RollProdAOS class¶
A named tuple representing the output state of rolling_prod_acc_nb().
Superclasses
builtins.tuple
cumprod method-wrapper¶
Alias for field number 0
nancnt method-wrapper¶
Alias for field number 1
value method-wrapper¶
Alias for field number 3
window_len method-wrapper¶
Alias for field number 2
RollStdAIS class¶
A named tuple representing the input state of rolling_std_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 3
cumsum_sq method-wrapper¶
Alias for field number 4
ddof method-wrapper¶
Alias for field number 8
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 7
nancnt method-wrapper¶
Alias for field number 5
pre_window_value method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
window method-wrapper¶
Alias for field number 6
RollStdAOS class¶
A named tuple representing the output state of rolling_std_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 0
cumsum_sq method-wrapper¶
Alias for field number 1
nancnt method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 4
window_len method-wrapper¶
Alias for field number 3
RollSumAIS class¶
A named tuple representing the input state of rolling_sum_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 3
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 6
nancnt method-wrapper¶
Alias for field number 4
pre_window_value method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
window method-wrapper¶
Alias for field number 5
RollSumAOS class¶
A named tuple representing the output state of rolling_sum_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 0
nancnt method-wrapper¶
Alias for field number 1
value method-wrapper¶
Alias for field number 3
window_len method-wrapper¶
Alias for field number 2
RollZScoreAIS class¶
A named tuple representing the input state of rolling_zscore_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 3
cumsum_sq method-wrapper¶
Alias for field number 4
ddof method-wrapper¶
Alias for field number 8
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 7
nancnt method-wrapper¶
Alias for field number 5
pre_window_value method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
window method-wrapper¶
Alias for field number 6
RollZScoreAOS class¶
A named tuple representing the output state of rolling_zscore_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 0
cumsum_sq method-wrapper¶
Alias for field number 1
nancnt method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 4
window_len method-wrapper¶
Alias for field number 3
VidyaAIS class¶
VidyaAIS(
i,
prev_value,
value,
pre_window_prev_value,
pre_window_value,
pos_cumsum,
neg_cumsum,
prev_vidya,
nancnt,
window,
minp
)
A named tuple representing the input state of vidya_acc_nb().
Superclasses
builtins.tuple
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 10
nancnt method-wrapper¶
Alias for field number 8
neg_cumsum method-wrapper¶
Alias for field number 6
pos_cumsum method-wrapper¶
Alias for field number 5
pre_window_prev_value method-wrapper¶
Alias for field number 3
pre_window_value method-wrapper¶
Alias for field number 4
prev_value method-wrapper¶
Alias for field number 1
prev_vidya method-wrapper¶
Alias for field number 7
value method-wrapper¶
Alias for field number 2
window method-wrapper¶
Alias for field number 9
VidyaAOS class¶
A named tuple representing the output state of vidya_acc_nb().
Superclasses
builtins.tuple
cmo method-wrapper¶
Alias for field number 4
nancnt method-wrapper¶
Alias for field number 2
neg_cumsum method-wrapper¶
Alias for field number 1
pos_cumsum method-wrapper¶
Alias for field number 0
vidya method-wrapper¶
Alias for field number 5
window_len method-wrapper¶
Alias for field number 3
WMMeanAIS class¶
A named tuple representing the input state of wm_mean_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 3
i method-wrapper¶
Alias for field number 0
minp method-wrapper¶
Alias for field number 7
nancnt method-wrapper¶
Alias for field number 5
pre_window_value method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 1
wcumsum method-wrapper¶
Alias for field number 4
window method-wrapper¶
Alias for field number 6
WMMeanAOS class¶
A named tuple representing the output state of wm_mean_acc_nb().
Superclasses
builtins.tuple
cumsum method-wrapper¶
Alias for field number 0
nancnt method-wrapper¶
Alias for field number 2
value method-wrapper¶
Alias for field number 4
wcumsum method-wrapper¶
Alias for field number 1
window_len method-wrapper¶
Alias for field number 3