Skip to main content

High-performance technical analysis library with 153 indicators, 100% TA-Lib compatible

Project description

TechKit

PyPI version Python License: MIT Documentation CI

TechKit is a high-performance technical analysis library for Python, featuring:

  • 🚀 153 Technical Indicators - Complete coverage of all TA-Lib indicators
  • Blazing Fast - C++ core with O(1) incremental updates
  • 🔄 100% TA-Lib Compatible - Drop-in replacement API
  • 📊 61 Candlestick Patterns - Full CDL pattern recognition
  • 🧵 Thread-Safe - Zero global state, parallel-ready
  • 📦 Zero Dependencies - Only NumPy required

Installation

pip install techkit

Platform Support

Platform Python Architecture
Linux 3.10-3.13 x86_64
macOS 3.10-3.13 x86_64, arm64
Windows 3.10-3.13 AMD64

Quick Start

Basic Usage

import numpy as np
from techkit import SMA, RSI, MACD, BBANDS

# Sample price data
prices = np.random.randn(100).cumsum() + 100

# Create indicators
sma = SMA(period=20)
rsi = RSI(period=14)
macd = MACD(fast=12, slow=26, signal=9)

# Calculate (batch)
sma_values = sma.calculate(prices)
rsi_values = rsi.calculate(prices)
macd_result = macd.calculate(prices)

print(f"SMA: {sma_values[-1]:.2f}")
print(f"RSI: {rsi_values[-1]:.2f}")
print(f"MACD: {macd_result.macd[-1]:.4f}")

Streaming / Incremental Updates

from techkit import SMA, RSI

sma = SMA(20)
rsi = RSI(14)

# Process bar by bar (O(1) per update)
for price in live_price_stream():
    sma_result = sma.update(price)
    rsi_result = rsi.update(price)
    
    if sma_result.valid and rsi_result.valid:
        print(f"SMA: {sma_result.value:.2f}, RSI: {rsi_result.value:.2f}")

TA-Lib Drop-in Replacement

# Before (TA-Lib)
import talib
sma = talib.SMA(prices, timeperiod=20)
rsi = talib.RSI(prices, timeperiod=14)
macd, signal, hist = talib.MACD(prices)

# After (TechKit) - Same API!
from techkit import talib_compat as ta
sma = ta.SMA(prices, timeperiod=20)
rsi = ta.RSI(prices, timeperiod=14)
macd, signal, hist = ta.MACD(prices)

Candlestick Patterns

from techkit import CDL_HAMMER, CDL_ENGULFING, CDL_MORNINGSTAR

# Detect patterns
hammer = CDL_HAMMER()
signals = hammer.calculate(open, high, low, close)

# Signals: +100 (bullish), -100 (bearish), 0 (none)
bullish_hammers = np.where(signals > 0)[0]

Indicator Chaining

from techkit import Chain, RSI, EMA, SMA

# Smoothed RSI: RSI(14) → EMA(9)
smoothed_rsi = Chain([RSI(14), EMA(9)])
result = smoothed_rsi.calculate(prices)

# Double smoothed: SMA(10) → SMA(5)
double_smooth = Chain([SMA(10), SMA(5)])
result = double_smooth.calculate(prices)

Pandas Integration

import pandas as pd
from techkit import talib_compat as ta

df = pd.read_csv('ohlcv.csv')

# Directly use DataFrame columns
df['SMA_20'] = ta.SMA(df['close'], timeperiod=20)
df['RSI_14'] = ta.RSI(df['close'], timeperiod=14)
df['ATR_14'] = ta.ATR(df['high'], df['low'], df['close'], timeperiod=14)

macd, signal, hist = ta.MACD(df['close'])
df['MACD'] = macd
df['MACD_Signal'] = signal
df['MACD_Hist'] = hist

📖 API Documentation

Full API documentation: techkit-docs.netlify.app/api/python-api.html


Indicator Categories

Moving Averages (9)

SMA, EMA, WMA, DEMA, TEMA, KAMA, TRIMA, T3, MA

Momentum Indicators (26)

RSI, MACD, STOCH, STOCHF, STOCHRSI, CCI, ADX, ADXR, MOM, ROC, ROCP, ROCR, ROCR100, WILLR, MFI, ULTOSC, TRIX, APO, PPO, CMO, DX, PLUS_DI, MINUS_DI, PLUS_DM, MINUS_DM, AROON, AROONOSC, BOP

Volatility (4)

ATR, NATR, BBANDS, TRANGE

Volume (4)

OBV, AD, ADOSC, MFI

Statistics (9)

STDDEV, VAR, LINEARREG, LINEARREG_SLOPE, LINEARREG_INTERCEPT, LINEARREG_ANGLE, TSF, BETA, CORREL

Price Transform (4)

AVGPRICE, MEDPRICE, TYPPRICE, WCLPRICE

Math (6)

MAX, MIN, SUM, MIDPOINT, MIDPRICE, MINMAX

Cycle / Hilbert Transform (6)

HT_DCPERIOD, HT_DCPHASE, HT_TRENDMODE, HT_TRENDLINE, HT_PHASOR, HT_SINE

Parabolic SAR (2)

SAR, SAREXT

Candlestick Patterns (61)

CDL_DOJI, CDL_HAMMER, CDL_ENGULFING, CDL_MORNINGSTAR, CDL_EVENINGSTAR, CDL_3WHITESOLDIERS, CDL_3BLACKCROWS, CDL_HARAMI, CDL_PIERCING, CDL_DARKCLOUDCOVER, and 51 more...

Advanced Analytics (17)

Risk Metrics: SharpeRatio, SortinoRatio, CalmarRatio, MaxDrawdown, HistoricalVaR, CVaR

Volatility Models: EWMAVolatility, RealizedVolatility, ParkinsonVolatility, GARCHVolatility

Structure Analysis: ZigZag, SwingHighLow, PivotPoints

Pattern Recognition: HarmonicPattern, ChartPattern

Performance

TechKit uses C++ with O(1) incremental computation:

Operation TechKit TA-Lib
Single update O(1) O(n)
Batch (1000 bars) ~0.1ms ~0.2ms
Memory per indicator O(period) O(n)

Benchmark Example

import time
import numpy as np
from techkit import SMA

prices = np.random.randn(1_000_000).cumsum() + 100

# Batch mode
start = time.time()
result = SMA(20).calculate(prices)
print(f"Batch (1M points): {time.time() - start:.3f}s")

# Streaming mode
sma = SMA(20)
start = time.time()
for price in prices[:100_000]:
    sma.update(price)
print(f"Streaming (100K points): {time.time() - start:.3f}s")

Version Information

import techkit

print(techkit.__version__)       # "1.2.1"
print(techkit.version())         # "1.2.1"
print(techkit.version_tuple())   # (1, 2, 1)

License

MIT License - see LICENSE for details.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

techkit-1.2.7.tar.gz (50.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

techkit-1.2.7-cp312-cp312-win_amd64.whl (305.3 kB view details)

Uploaded CPython 3.12Windows x86-64

techkit-1.2.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (447.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

techkit-1.2.7-cp312-cp312-macosx_11_0_arm64.whl (304.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

techkit-1.2.7-cp312-cp312-macosx_10_14_x86_64.whl (343.8 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

techkit-1.2.7-cp311-cp311-win_amd64.whl (302.3 kB view details)

Uploaded CPython 3.11Windows x86-64

techkit-1.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (448.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

techkit-1.2.7-cp311-cp311-macosx_11_0_arm64.whl (304.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

techkit-1.2.7-cp311-cp311-macosx_10_14_x86_64.whl (337.8 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

techkit-1.2.7-cp310-cp310-win_amd64.whl (302.3 kB view details)

Uploaded CPython 3.10Windows x86-64

techkit-1.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (446.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

techkit-1.2.7-cp310-cp310-macosx_11_0_arm64.whl (302.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

techkit-1.2.7-cp310-cp310-macosx_10_14_x86_64.whl (336.3 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

Details for the file techkit-1.2.7.tar.gz.

File metadata

  • Download URL: techkit-1.2.7.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for techkit-1.2.7.tar.gz
Algorithm Hash digest
SHA256 0b40f9de36bf6c416aadcd5ee07f099f5f2cc04c8adc8273c2ae96359aacf89c
MD5 4810f8bb3d34607f4e3d84a70031f970
BLAKE2b-256 0ece21b23c1b95db7e19b0aaf302cb4ac5195c2f028d204f9a10695c39a9ae1a

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: techkit-1.2.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 305.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for techkit-1.2.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7ebddd0c20ba46e89f5f285fe2a6ff11c21db5fa21d136d439e1ba190ddc894f
MD5 5c381059cb62c9c650c16831aff2792b
BLAKE2b-256 c3324d89bc359713d798b0cd3db5cab0dd8ffb8ac040f0c59f8d8277ebb6cb48

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ecf8843c35ae7720c5e60287e04d38d2259919a6f9fc3d4e4a309ba45947535
MD5 46c5cdbec28ecc04dc53bea0ff4885e5
BLAKE2b-256 3c1c4328e9bbbc83986d3ed8062fdd443e54243f978952e6e96cbbe20d880320

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f62c6acf6d9ddb751b27b4ab80d76a455ba56fee1c35df66a752e06e5c4bea6e
MD5 160c9689532cdb2ec59103fdba438919
BLAKE2b-256 2746f4d404a9601ea7711ddea69747fd935d557b04c59e0be13bf5e1a8f43c2b

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp312-cp312-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a0d9c5a0e3be4d12f114c96c7c2d544391c37b70be771f433f8cda9943dd2723
MD5 40d0c2bd237e2622dfdf310b61d8d71c
BLAKE2b-256 e6a615c60a18e939af54f19eaf62b59ccd832d143646edf6c9c65d9073444710

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: techkit-1.2.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 302.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for techkit-1.2.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3122e735367bd4e9f6922556cee2088b49e70bbd59f75f277aeb35cb2e794bea
MD5 13ac69abf6eee0a7ff4df24a0e99f852
BLAKE2b-256 1649e67cbcbbcd53b8bcca4b6b807041363972bb3f8f4c3a12c125384c9c6add

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f665d76c5174c0b5855449d3fc6607d70b65376e1e3e4e7f5661ee8cbeb8826
MD5 feb9335ddc1abe9b7960a5011b623de1
BLAKE2b-256 f9db5dd4819db9d15369ba46af56e755f0504d900238029750b30a32e7db6bbf

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f53fef89494c1a053f28ea52fb9e800709504e7d2c7f320dcc8a5508f5982d1
MD5 0b8e8269ae1ff5d34e3d6bc9fcc3f47b
BLAKE2b-256 4fe6d1e027d09dcd41a66548de74c8a8c83b8f5873b358c2ad6fa7207303303b

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 314c064fdaf7dedf1e879389f2c2bfa581fa64b88aed76a392ede6cd2696ecb1
MD5 d434dab4db6883ae72057403d320c972
BLAKE2b-256 4427042601a70f88565e591b0a5a7372bbaa641087c29418aeaaabee4115a5c8

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: techkit-1.2.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 302.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for techkit-1.2.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 159a9fda8a7ea940ba0f39ff79359eb0de1cb31e5c0d540941d0b4a525ca07c3
MD5 e29bbab526cbc5bd69ba0666b567d27a
BLAKE2b-256 d84a7f7cf451e27eb561c651cb07f42fefa62cf0b4fc4518dc7aed87734164df

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 852117db77dc3d4cbf9c040e11b172d29e839902d89646cf710fa9f9ed8207f9
MD5 8bcd404a575a3a1e9d28bae99fe1de29
BLAKE2b-256 62f4187534a5f94bbd6f6f13add2ea0468f0a0c44b0a20e978a3ac66df5d9ffe

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb49161c91b7175353ec4a312015f6dfd911566ebb2e7121e09abe24834d1e3f
MD5 46ca6c9cc73fc37b339f1a7fbead5767
BLAKE2b-256 1d100e6754cb3c1e047fab93c2bb97d5c9a6b2d3d6ddc92c97d2a21b03567beb

See more details on using hashes here.

File details

Details for the file techkit-1.2.7-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for techkit-1.2.7-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 619c57d0b30ba6612a308996d1adc2a72685baf61d350115b2422f61dced1648
MD5 2d4cd3488735c2d631bdacad01959160
BLAKE2b-256 ff72bee212c612fcfd4b55357d8909cb863c84b7e7a532b6b2aa7ffbd71b91b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page