Skip to content

feat(indicators): add IndicatorFactory.from_fin_primitives - #915

Open
Mattbusel wants to merge 2 commits into
polakowo:masterfrom
tensorust-ai:feat/fin-primitives-indicators
Open

Mattbusel wants to merge 2 commits into
polakowo:masterfrom
tensorust-ai:feat/fin-primitives-indicators

Conversation

@Mattbusel

@Mattbusel Mattbusel commented Nov 15, 2026 •

Copy link
Copy Markdown

from_pandas_ta (factory.py line 3651) has to fall back to pandas-ta-classic because twopirllc/pandas-ta now returns 404 and PyPI pandas-ta only has 0.4.67b0/0.4.71b0 for Python >=3.12. This offers another option next to from_talib and from_pandas_ta. This adds IndicatorFactory.from_fin_primitives plus a vbt.fin_primitives shortcut next to them, wrapping fin-primitives (abi3 wheels for Windows, macOS and Linux, 743 indicators computed in exact decimal by a Rust core): parameters and defaults come from its catalogue, inputs (open/high/low/close/volume) are detected by probing the indicator the way parse_pandas_ta_config does (all 743 parse, e.g. ATR gets high, low, close), and rows with NaN inputs are skipped instead of raising. It also adds fin-primitives>=3.2 to [full], one sentence in the features doc, and tests that skip when it is not installed, with RSI, MACD and ATR matching reference implementations to 1e-10, the built-in vbt.ATR(ewm=False) and TA-Lib's RSI and SMA(TRANGE) exactly. pytest tests/ passes locally (1692 passed, 225 skipped) and the new code is black-clean at 120. I maintain fin-primitives (MIT), so I can keep the wrapper and the package in step.

Wrap fin-primitives indicators next to from_talib, from_pandas_ta and
from_ta, with a vbt.fin_primitives shortcut. Inputs (open, high, low,
close, volume) are detected by probing each indicator, parameters and
defaults come from the library catalogue, and rows with NaN inputs are
skipped. Adds fin-primitives to the full extra and tests for SMA, input
detection, NaN handling, tuple parameters and RSI/MACD/ATR parity with
reference implementations, the built-in ATR and TA-Lib when installed.
@mario4tier

mario4tier commented Nov 17, 2026 •

Copy link
Copy Markdown

In the ta-lib-python space, the wheels added a few years ago and >20K download per day tells us that is not that hard anymore to install/use...

For other language (e.g. C), ta-lib follows standard packaging best-practice, particularly since 2025. There is no indication whatsoever that it is "getting harder".

pandas-ta-classic is our recommended wrapper : https://ta-lib.org/install/#wrappers

@polakowo We invite prudence into adding new dependencies and have a peek at @Mattbusel AI-driven activities (>160 similar PR in two days in the financial/LLM space).

\Mario Fortier

Disclaimer: I am a TA-Lib.org maintainer

===

Update: My response above relates to his original post which its AI has since edited to remove some claims. I still advise prudence.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants