Principle:TA Lib Ta lib python Function Registry Enumeration
| Knowledge Sources | |
|---|---|
| Domains | Technical_Analysis, Software_Architecture |
| Last Updated | 2026-02-09 22:00 GMT |
Overview
A registry pattern that provides enumeration of all available indicator functions and their categorization into functional groups for discovery and batch processing.
Description
The TA-Lib library includes 161 indicator functions organized into 10 functional groups. The registry pattern exposes two discovery functions:
- get_functions() — Returns a flat list of all 161 function names
- get_function_groups() — Returns a dict mapping group names to lists of function names
This enables:
- Discovery: Find available indicators by group
- Batch processing: Iterate over all indicators or specific groups
- Validation: Check if a given function name is supported
- Dynamic invocation: Combine with the Abstract API to compute any indicator by name
The 10 groups are: Cycle Indicators, Math Operators, Math Transform, Momentum Indicators, Overlap Studies, Pattern Recognition, Price Transform, Statistic Functions, Volatility Indicators, Volume Indicators.
Usage
Use this principle when you need to discover available indicators, iterate over groups, or build dynamic indicator selection interfaces.
Theoretical Basis
The registry follows a centralized catalog pattern:
# Abstract registry pattern
registry = {
'group_name': ['function_name_1', 'function_name_2', ...],
...
}
def list_all() -> list[str]:
return flatten(registry.values())
def list_by_group() -> dict[str, list[str]]:
return copy(registry)