Open untoreh opened 3 years ago
Kudos for testing this out!
Being able to run talib from within njited code would fit perfectly to the idea of vectorbt, but as you see it seems to require just too much of effort. Although the current implementation in vectorbt uses an ugly pythonic loop to run talib on each column and some other tricks, it can match or sometimes overtake a comparable indicator written in pure numba, so the performance is already pretty solid. Where it could truly shine is building complex things like indicators on top of other indicators, so that's definitely a direction I'd love to move in. I have opened an issue in TA-Lib and there are tips to make it compatible, right now I'm a bit too busy with other features though.
@untoreh great work. Have you maybe managed to get none-null elements/outputs eventually? Thank you.
@untoreh ... were you ever able to figure out how to get talib to work with numba?
@polakowo have you ever figured out how to build indicators on top of other indicators?
Following numba docs, this example with ADX appears to be working.
the cython version exposes only the relevant inputs, and does some checks so it's not 1:1.
I don't think the cython version can be called directly because it wraps the C code.
Null elements appear at the end because before calling the indicator function the lookback period should be computed (by another ta_lib function, which this example is lacking) and the out pointer passed to the indicator function should be shifted accordingly
sooo..it's not just an import away :(