Technical Analysis Library (TA-Lib) functions for DuckDB – 100+ indicators for financial market analysis
Maintainer(s):
neuesql
Installing and Loading
INSTALL talib FROM community;
LOAD talib;
Example
-- Moving averages and RSI on financial data
SELECT ta_sma([1.0, 2.0, 3.0, 4.0, 5.0], 3);
About talib
100+ TA-Lib technical analysis indicators as native DuckDB functions. Includes momentum (RSI, MACD, Stochastic), overlap studies (SMA, EMA, BBANDS), volatility (ATR, NATR), 49 candlestick pattern recognizers, volume indicators, cycle indicators, and math/statistics functions.
Functions are available in two modes:
- Scalar (ta_* prefix): operate on pre-collected lists
- Window/Aggregate (taw_* prefix): use OVER() for row-by-row computation
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| ta_acos | scalar | NULL | NULL | |
| ta_ad | scalar | NULL | NULL | |
| ta_adx | scalar | NULL | NULL | |
| ta_adxr | scalar | NULL | NULL | |
| ta_aroon | scalar | NULL | NULL | |
| ta_asin | scalar | NULL | NULL | |
| ta_atan | scalar | NULL | NULL | |
| ta_atr | scalar | NULL | NULL | |
| ta_avgprice | scalar | NULL | NULL | |
| ta_bbands | scalar | NULL | NULL | |
| ta_bop | scalar | NULL | NULL | |
| ta_cci | scalar | NULL | NULL | |
| ta_cdl2crows | scalar | NULL | NULL | |
| ta_cdl3blackcrows | scalar | NULL | NULL | |
| ta_cdl3inside | scalar | NULL | NULL | |
| ta_cdl3linestrike | scalar | NULL | NULL | |
| ta_cdl3outside | scalar | NULL | NULL | |
| ta_cdl3starsinsouth | scalar | NULL | NULL | |
| ta_cdl3whitesoldiers | scalar | NULL | NULL | |
| ta_cdladvanceblock | scalar | NULL | NULL | |
| ta_cdlbelthold | scalar | NULL | NULL | |
| ta_cdlbreakaway | scalar | NULL | NULL | |
| ta_cdlclosingmarubozu | scalar | NULL | NULL | |
| ta_cdlconcealbabyswall | scalar | NULL | NULL | |
| ta_cdlcounterattack | scalar | NULL | NULL | |
| ta_cdldoji | scalar | NULL | NULL | |
| ta_cdldojistar | scalar | NULL | NULL | |
| ta_cdldragonflydoji | scalar | NULL | NULL | |
| ta_cdlengulfing | scalar | NULL | NULL | |
| ta_cdlgapsidesidewhite | scalar | NULL | NULL | |
| ta_cdlgravestonedoji | scalar | NULL | NULL | |
| ta_cdlhammer | scalar | NULL | NULL | |
| ta_cdlhangingman | scalar | NULL | NULL | |
| ta_cdlharami | scalar | NULL | NULL | |
| ta_cdlharamicross | scalar | NULL | NULL | |
| ta_cdlhighwave | scalar | NULL | NULL | |
| ta_cdlhikkake | scalar | NULL | NULL | |
| ta_cdlhikkakemod | scalar | NULL | NULL | |
| ta_cdlhomingpigeon | scalar | NULL | NULL | |
| ta_cdlidentical3crows | scalar | NULL | NULL | |
| ta_cdlinneck | scalar | NULL | NULL | |
| ta_cdlinvertedhammer | scalar | NULL | NULL | |
| ta_cdlkicking | scalar | NULL | NULL | |
| ta_cdlkickingbylength | scalar | NULL | NULL | |
| ta_cdlladderbottom | scalar | NULL | NULL | |
| ta_cdllongleggeddoji | scalar | NULL | NULL | |
| ta_cdllongline | scalar | NULL | NULL | |
| ta_cdlmarubozu | scalar | NULL | NULL | |
| ta_cdlmatchinglow | scalar | NULL | NULL | |
| ta_cdlonneck | scalar | NULL | NULL | |
| ta_cdlpiercing | scalar | NULL | NULL | |
| ta_cdlrickshawman | scalar | NULL | NULL | |
| ta_cdlrisefall3methods | scalar | NULL | NULL | |
| ta_cdlseparatinglines | scalar | NULL | NULL | |
| ta_cdlshootingstar | scalar | NULL | NULL | |
| ta_cdlshortline | scalar | NULL | NULL | |
| ta_cdlspinningtop | scalar | NULL | NULL | |
| ta_cdlstalledpattern | scalar | NULL | NULL | |
| ta_cdlsticksandwich | scalar | NULL | NULL | |
| ta_cdltakuri | scalar | NULL | NULL | |
| ta_cdltasukigap | scalar | NULL | NULL | |
| ta_cdlthrusting | scalar | NULL | NULL | |
| ta_cdltristar | scalar | NULL | NULL | |
| ta_cdlunique3river | scalar | NULL | NULL | |
| ta_cdlupsidegap2crows | scalar | NULL | NULL | |
| ta_cdlxsidegap3methods | scalar | NULL | NULL | |
| ta_ceil | scalar | NULL | NULL | |
| ta_cmo | scalar | NULL | NULL | |
| ta_cos | scalar | NULL | NULL | |
| ta_cosh | scalar | NULL | NULL | |
| ta_dema | scalar | NULL | NULL | |
| ta_dx | scalar | NULL | NULL | |
| ta_ema | scalar | NULL | NULL | |
| ta_exp | scalar | NULL | NULL | |
| ta_floor | scalar | NULL | NULL | |
| ta_ht_dcperiod | scalar | NULL | NULL | |
| ta_ht_dcphase | scalar | NULL | NULL | |
| ta_ht_phasor | scalar | NULL | NULL | |
| ta_ht_sine | scalar | NULL | NULL | |
| ta_ht_trendline | scalar | NULL | NULL | |
| ta_ht_trendmode | scalar | NULL | NULL | |
| ta_kama | scalar | NULL | NULL | |
| ta_linearreg | scalar | NULL | NULL | |
| ta_linearreg_angle | scalar | NULL | NULL | |
| ta_linearreg_intercept | scalar | NULL | NULL | |
| ta_linearreg_slope | scalar | NULL | NULL | |
| ta_ln | scalar | NULL | NULL | |
| ta_log10 | scalar | NULL | NULL | |
| ta_macd | scalar | NULL | NULL | |
| ta_mama | scalar | NULL | NULL | |
| ta_max | scalar | NULL | NULL | |
| ta_maxindex | scalar | NULL | NULL | |
| ta_medprice | scalar | NULL | NULL | |
| ta_midpoint | scalar | NULL | NULL | |
| ta_midprice | scalar | NULL | NULL | |
| ta_min | scalar | NULL | NULL | |
| ta_minindex | scalar | NULL | NULL | |
| ta_minmax | scalar | NULL | NULL | |
| ta_minus_di | scalar | NULL | NULL | |
| ta_minus_dm | scalar | NULL | NULL | |
| ta_mom | scalar | NULL | NULL | |
| ta_natr | scalar | NULL | NULL | |
| ta_plus_di | scalar | NULL | NULL | |
| ta_plus_dm | scalar | NULL | NULL | |
| ta_roc | scalar | NULL | NULL | |
| ta_rocp | scalar | NULL | NULL | |
| ta_rocr | scalar | NULL | NULL | |
| ta_rocr100 | scalar | NULL | NULL | |
| ta_rsi | scalar | NULL | NULL | |
| ta_sin | scalar | NULL | NULL | |
| ta_sinh | scalar | NULL | NULL | |
| ta_sma | scalar | NULL | NULL | |
| ta_sqrt | scalar | NULL | NULL | |
| ta_stoch | scalar | NULL | NULL | |
| ta_sum | scalar | NULL | NULL | |
| ta_tan | scalar | NULL | NULL | |
| ta_tanh | scalar | NULL | NULL | |
| ta_tema | scalar | NULL | NULL | |
| ta_trange | scalar | NULL | NULL | |
| ta_trima | scalar | NULL | NULL | |
| ta_trix | scalar | NULL | NULL | |
| ta_tsf | scalar | NULL | NULL | |
| ta_typprice | scalar | NULL | NULL | |
| ta_wclprice | scalar | NULL | NULL | |
| ta_willr | scalar | NULL | NULL | |
| ta_wma | scalar | NULL | NULL | |
| taw_acos | aggregate | NULL | NULL | |
| taw_ad | aggregate | NULL | NULL | |
| taw_adx | aggregate | NULL | NULL | |
| taw_adxr | aggregate | NULL | NULL | |
| taw_asin | aggregate | NULL | NULL | |
| taw_atan | aggregate | NULL | NULL | |
| taw_atr | aggregate | NULL | NULL | |
| taw_avgprice | aggregate | NULL | NULL | |
| taw_bop | aggregate | NULL | NULL | |
| taw_cci | aggregate | NULL | NULL | |
| taw_cdl2crows | aggregate | NULL | NULL | |
| taw_cdl3blackcrows | aggregate | NULL | NULL | |
| taw_cdl3inside | aggregate | NULL | NULL | |
| taw_cdl3linestrike | aggregate | NULL | NULL | |
| taw_cdl3outside | aggregate | NULL | NULL | |
| taw_cdl3starsinsouth | aggregate | NULL | NULL | |
| taw_cdl3whitesoldiers | aggregate | NULL | NULL | |
| taw_cdladvanceblock | aggregate | NULL | NULL | |
| taw_cdlbelthold | aggregate | NULL | NULL | |
| taw_cdlbreakaway | aggregate | NULL | NULL | |
| taw_cdlclosingmarubozu | aggregate | NULL | NULL | |
| taw_cdlconcealbabyswall | aggregate | NULL | NULL | |
| taw_cdlcounterattack | aggregate | NULL | NULL | |
| taw_cdldoji | aggregate | NULL | NULL | |
| taw_cdldojistar | aggregate | NULL | NULL | |
| taw_cdldragonflydoji | aggregate | NULL | NULL | |
| taw_cdlengulfing | aggregate | NULL | NULL | |
| taw_cdlgapsidesidewhite | aggregate | NULL | NULL | |
| taw_cdlgravestonedoji | aggregate | NULL | NULL | |
| taw_cdlhammer | aggregate | NULL | NULL | |
| taw_cdlhangingman | aggregate | NULL | NULL | |
| taw_cdlharami | aggregate | NULL | NULL | |
| taw_cdlharamicross | aggregate | NULL | NULL | |
| taw_cdlhighwave | aggregate | NULL | NULL | |
| taw_cdlhikkake | aggregate | NULL | NULL | |
| taw_cdlhikkakemod | aggregate | NULL | NULL | |
| taw_cdlhomingpigeon | aggregate | NULL | NULL | |
| taw_cdlidentical3crows | aggregate | NULL | NULL | |
| taw_cdlinneck | aggregate | NULL | NULL | |
| taw_cdlinvertedhammer | aggregate | NULL | NULL | |
| taw_cdlkicking | aggregate | NULL | NULL | |
| taw_cdlkickingbylength | aggregate | NULL | NULL | |
| taw_cdlladderbottom | aggregate | NULL | NULL | |
| taw_cdllongleggeddoji | aggregate | NULL | NULL | |
| taw_cdllongline | aggregate | NULL | NULL | |
| taw_cdlmarubozu | aggregate | NULL | NULL | |
| taw_cdlmatchinglow | aggregate | NULL | NULL | |
| taw_cdlonneck | aggregate | NULL | NULL | |
| taw_cdlpiercing | aggregate | NULL | NULL | |
| taw_cdlrickshawman | aggregate | NULL | NULL | |
| taw_cdlrisefall3methods | aggregate | NULL | NULL | |
| taw_cdlseparatinglines | aggregate | NULL | NULL | |
| taw_cdlshootingstar | aggregate | NULL | NULL | |
| taw_cdlshortline | aggregate | NULL | NULL | |
| taw_cdlspinningtop | aggregate | NULL | NULL | |
| taw_cdlstalledpattern | aggregate | NULL | NULL | |
| taw_cdlsticksandwich | aggregate | NULL | NULL | |
| taw_cdltakuri | aggregate | NULL | NULL | |
| taw_cdltasukigap | aggregate | NULL | NULL | |
| taw_cdlthrusting | aggregate | NULL | NULL | |
| taw_cdltristar | aggregate | NULL | NULL | |
| taw_cdlunique3river | aggregate | NULL | NULL | |
| taw_cdlupsidegap2crows | aggregate | NULL | NULL | |
| taw_cdlxsidegap3methods | aggregate | NULL | NULL | |
| taw_ceil | aggregate | NULL | NULL | |
| taw_cmo | aggregate | NULL | NULL | |
| taw_cos | aggregate | NULL | NULL | |
| taw_cosh | aggregate | NULL | NULL | |
| taw_dema | aggregate | NULL | NULL | |
| taw_dx | aggregate | NULL | NULL | |
| taw_ema | aggregate | NULL | NULL | |
| taw_exp | aggregate | NULL | NULL | |
| taw_floor | aggregate | NULL | NULL | |
| taw_ht_dcperiod | aggregate | NULL | NULL | |
| taw_ht_dcphase | aggregate | NULL | NULL | |
| taw_ht_trendline | aggregate | NULL | NULL | |
| taw_ht_trendmode | aggregate | NULL | NULL | |
| taw_kama | aggregate | NULL | NULL | |
| taw_linearreg | aggregate | NULL | NULL | |
| taw_linearreg_angle | aggregate | NULL | NULL | |
| taw_linearreg_intercept | aggregate | NULL | NULL | |
| taw_linearreg_slope | aggregate | NULL | NULL | |
| taw_ln | aggregate | NULL | NULL | |
| taw_log10 | aggregate | NULL | NULL | |
| taw_max | aggregate | NULL | NULL | |
| taw_maxindex | aggregate | NULL | NULL | |
| taw_medprice | aggregate | NULL | NULL | |
| taw_midpoint | aggregate | NULL | NULL | |
| taw_midprice | aggregate | NULL | NULL | |
| taw_min | aggregate | NULL | NULL | |
| taw_minindex | aggregate | NULL | NULL | |
| taw_minus_di | aggregate | NULL | NULL | |
| taw_minus_dm | aggregate | NULL | NULL | |
| taw_mom | aggregate | NULL | NULL | |
| taw_natr | aggregate | NULL | NULL | |
| taw_plus_di | aggregate | NULL | NULL | |
| taw_plus_dm | aggregate | NULL | NULL | |
| taw_roc | aggregate | NULL | NULL | |
| taw_rocp | aggregate | NULL | NULL | |
| taw_rocr | aggregate | NULL | NULL | |
| taw_rocr100 | aggregate | NULL | NULL | |
| taw_rsi | aggregate | NULL | NULL | |
| taw_sin | aggregate | NULL | NULL | |
| taw_sinh | aggregate | NULL | NULL | |
| taw_sma | aggregate | NULL | NULL | |
| taw_sqrt | aggregate | NULL | NULL | |
| taw_sum | aggregate | NULL | NULL | |
| taw_tan | aggregate | NULL | NULL | |
| taw_tanh | aggregate | NULL | NULL | |
| taw_tema | aggregate | NULL | NULL | |
| taw_trange | aggregate | NULL | NULL | |
| taw_trima | aggregate | NULL | NULL | |
| taw_trix | aggregate | NULL | NULL | |
| taw_tsf | aggregate | NULL | NULL | |
| taw_typprice | aggregate | NULL | NULL | |
| taw_wclprice | aggregate | NULL | NULL | |
| taw_willr | aggregate | NULL | NULL | |
| taw_wma | aggregate | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.