You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This major release aims to modernize the API (it has not been touched for 3 years) and bring new features requested by users. Despite the breaking changes, it should be straightforward to migrate to the new version. To make transition easier, please follow guidelines below.
If indicator requires multiple input values to produce the first output value, the input and output lists will have different lengths as initial None values are not kept in the output list. While this does not limit usage of the indicators (input and output lists are simply aligned from right), it was often confusing for the users. Therefore I decided to align lengths of the lists and use None if output value cannot be calculated.
In case of indicator chaining (i.e. output of one indicator is an input of another) it happens that output and input value types are sometimes incompatible (e.g. OHLCV -> float). All indicators now accept a new parameter input_modifier which is a callable object (method, lambda, ...) that will always be applied before processing the input value.
Migration:
Some indicators contain input modifier already today but it is called value_extractor. If you were using value_extractor, just rename it to input_modifier.
Many indicators use a moving average sub-indicator within them. By now moving average type was always hardcoded (SMA, EMA, ...). Sometimes it's useful to let user choose the moving average type used in an indicator. All indicators using a moving average internally now have another parameter which specifies moving average type.
maybe add method should have been named append to have a similar interface than list, dequeue...
It could but Indicator is not a standard container, it is a generic Sequence, and the API is therefore defined according to that (meaning both add vs. append are fine).
New major release of talipp!
This major release aims to modernize the API (it has not been touched for 3 years) and bring new features requested by users. Despite the breaking changes, it should be straightforward to migrate to the new version. To make transition easier, please follow guidelines below.
Aggregate PR: #96
High-level scope
Parameter name unification
Parameter names have been unified across all indicators.
Example:
Before:
After:
Migration:
Since parameters were only renamed and none was removed, check the indicators' definition for the new name.
PR: #95
Align length of input and output lists
If indicator requires multiple input values to produce the first output value, the input and output lists will have different lengths as initial
None
values are not kept in the output list. While this does not limit usage of the indicators (input and output lists are simply aligned from right), it was often confusing for the users. Therefore I decided to align lengths of the lists and useNone
if output value cannot be calculated.Example:
Before:
After:
Migration:
Any custom code handling varying lengths of the input and output lists can be removed.
PR: #104
Input values modifiers
In case of indicator chaining (i.e. output of one indicator is an input of another) it happens that output and input value types are sometimes incompatible (e.g.
OHLCV
->float
). All indicators now accept a new parameterinput_modifier
which is a callable object (method, lambda, ...) that will always be applied before processing the input value.Example:
Migration:
Some indicators contain input modifier already today but it is called
value_extractor
. If you were usingvalue_extractor
, just rename it toinput_modifier
.PR: #97, #110
Customizable moving average sub-indicators
Many indicators use a moving average sub-indicator within them. By now moving average type was always hardcoded (SMA, EMA, ...). Sometimes it's useful to let user choose the moving average type used in an indicator. All indicators using a moving average internally now have another parameter which specifies moving average type.
Example:
PR: #99
New indicators added
Following indicators have been added:
Example:
PR: #108 (ZLEMA), #109 (T3)
Method deprecation
Following methods have become deprecated and replaced by new ones with the same signature:
Indicator.add_intput_value
->Indicator.add
Indicator.update_intput_value
->Indicator.update
Indicator.remo_intput_value
->Indicator.remove
Example:
Migration:
Even though previous methods still exist and point the new ones, it is recommended to rename the methods to new ones.
PR: #107
The text was updated successfully, but these errors were encountered: