Skip to content

Releases

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 04:44

TA-Lib now comes from ta-lib 0.8.3, the official Rust port of TA-Lib. The build needs no C compiler.

New

  • 237 functions (161 before). TA-Lib 0.8 adds, for example, alma, hma, ichimoku, kdj, supertrend, vwap, zigzag and the swak_* filters.
  • Wheels for macOS on Apple silicon, in addition to Windows x64 and Linux x64.
  • The wheels include the TA-Lib licence (BSD-3-Clause) in LICENSES/TA-Lib.txt.

Breaking changes

  • hma is now TA-Lib's HMA. The parameter is timeperiod (was period), and the default is 20 (was 16). The values are those of the old WMA composition, within a relative 1e-12 (measured: 2.3e-14).
  • TA-Lib 0.8 changes these defaults:
    • apo and ppo: matype is 1, EMA (was 0, SMA).
    • bbands: timeperiod is 20 (was 5).
  • maxindex, minindex and minmaxindex: when two bars in the window have the same value, the result is the most recent bar (TA-Lib f68fe22b8).
  • Many other functions differ from 0.7.1 in the last digits, from TA-Lib 0.8's arithmetic. On the test data the largest difference is 1.5e-8 for adosc, whose values are in the millions, and at most 3e-11 for the others. Some give a value one row earlier or later after a NaN in the input.
  • Error messages name the return code of the crate, for example SMA: timeperiod=0: BadParam (bad parameter) (was TA_BAD_PARAM).

Correctness

Every function gives bit-identical values to TA-Lib's C library 0.8.3 on the same platform. The test data has 2 frames, float64 and float32 input, the default parameters and a short timeperiod. Windows, Linux and macOS each have their own reference data: the functions that call sin, exp or log follow the math library of the platform in the last bit.

There is one exception, on macOS only. There, the C library computes 12 math functions (acos, asin, atan, cos, cosh, exp, ln, log10, sin, sinh, tan, tanh) with Apple's vForce, and the crate computes them with the standard math library. For these 12 functions, the tests apply TA-Lib's own rule for this case: at most 8 ULP apart.

Speed

On one thread, against the previous release on 1M rows: ema 2.59 → 1.72 ms, atr 7.01 → 1.97 ms, macd 11.50 → 4.33 ms, 8 indicators in one select 49.0 → 28.7 ms. Most of this comes from TA-Lib 0.8. Against TA-Lib's C library at 0.8.3, the crate is as fast or faster. Details: ARCHITECTURE.md, section 6.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 15:19
Publish the wheel of a tag to PyPI, and follow the repository rename …

v0.3.1

Choose a tag to compare

@meet-brad-ch meet-brad-ch released this 11 Sep 21:12
Refresh the ta-lib-python comparison with the current build

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 20:35
Fail fast at the C boundary, and reserve what TA-Lib may write

Function::call refuses, with a message, what it used to accept or panic on: input
series of different lengths or the wrong count, an integer parameter that does not fit
32 bits, more rows than a C int counts, a negative lookback (parameter out of range,
named with its value), and an output range other than the one TA-Lib's lookback
promised. Unknown kwargs and a TA-Lib name without its prefix are errors too.

Each output is allocated once with room for as many rows as the input, the most TA-Lib's
contract lets it write, so the length is set on that contract rather than on a
per-function convention.

Number is the one representation of a parameter value, deserialized directly. The
function handle is a static reference, so Function is Send and Sync by construction.
The table caches its build result. Unused derives and one imitation error message go.

v0.2.0

Choose a tag to compare

@meet-brad-ch meet-brad-ch released this 11 Sep 16:51

Performance improvement.

v0.1.0

Choose a tag to compare

@meet-brad-ch meet-brad-ch released this 10 Sep 22:56

First release