Skip to main content

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

Project description

TechKit

PyPI version Python License: MIT 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

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.1.tar.gz (46.8 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.1-cp312-cp312-win_amd64.whl (301.7 kB view details)

Uploaded CPython 3.12Windows x86-64

techkit-1.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

techkit-1.2.1-cp312-cp312-macosx_11_0_arm64.whl (301.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

techkit-1.2.1-cp312-cp312-macosx_10_14_x86_64.whl (340.2 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

techkit-1.2.1-cp311-cp311-win_amd64.whl (298.7 kB view details)

Uploaded CPython 3.11Windows x86-64

techkit-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (444.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

techkit-1.2.1-cp311-cp311-macosx_11_0_arm64.whl (300.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

techkit-1.2.1-cp311-cp311-macosx_10_14_x86_64.whl (334.2 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

techkit-1.2.1-cp310-cp310-win_amd64.whl (298.7 kB view details)

Uploaded CPython 3.10Windows x86-64

techkit-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (442.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

techkit-1.2.1-cp310-cp310-macosx_11_0_arm64.whl (299.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

techkit-1.2.1-cp310-cp310-macosx_10_14_x86_64.whl (332.7 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: techkit-1.2.1.tar.gz
  • Upload date:
  • Size: 46.8 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.1.tar.gz
Algorithm Hash digest
SHA256 4532cf7d29f51cc5caf68327ece90008e3f632a0e674bde5cdb0012c86ba9f83
MD5 1f7c6b5c60ccc0cd0e6b1b669556dd15
BLAKE2b-256 b27d38f27e485e58891859ef6f1f9c67bcd5fbadb59c3ac13bdfd82d10f6961b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: techkit-1.2.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 301.7 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5d4b3373fb686cee0f9b13daa4c9e050a7e57aa666863a81ca9540ef25bc54db
MD5 73dbcf5b467a7de60cb07e11a80f75f0
BLAKE2b-256 f4d98fc4dd65bbf4180803e704a95196e3ec262e89deb40a50d8e298e72f5e0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de332b4b951d3154ab875a221ff3c159ddd15565b98c05ce0385de8acacf165c
MD5 a9a11b39f1c4e185c660619c221d9c37
BLAKE2b-256 5ab1e3591e24a3d6bbf739f51697686d8ac3721573f864784f0c2617ddf2e896

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 04971cc821dd6f8734b64a75a8d22adea653d5a4dba42c30da538f0757a328c4
MD5 a36dd9b9bd8562be8dd3911c2acf2da9
BLAKE2b-256 262e940858c204c556fdf2228048c5b07f764354f2efad43d21e96c9b72669cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d10f59218d0f7f618fc9dcbce70d323ac75aec6fc92c1027e4412e5e56caff0c
MD5 071c9782fc7178af700d61f8394298fb
BLAKE2b-256 aabe550ac1873e196fa4d9243fae834831e9bc6d610ab1abb588e2827272af1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: techkit-1.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 298.7 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f1cd379ec850b97fbc78bd948941e183952b61093b1d8e1de5c82e4f7b1d32c8
MD5 738a3a0b8368624982fe36a35333e97f
BLAKE2b-256 102858bd02a550262546734de0551d434cc0b79c8aa42d0609b757fdfe69696b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b33f261bbf2f3f1c3ba88d33a0382a7766261c82b8c127fc8f4ff18df7cec861
MD5 ed6e0cda67630a2fd4d533c6f54aaead
BLAKE2b-256 07696d42f242e36b79d28190d63f870ea7d7245fb202d49906e8d56490c8cbff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 886a06a055c0c9160a191958c2a6e5ebbab1c42db713a87e55b1f4e6c7eb0615
MD5 3c42aab0084d807a9713704e0f654c79
BLAKE2b-256 56becd372eec58968529847aab74f1adfa16fc15a97d155ac34d281ef11870ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d50e3cc3ccab983403b2f154d4e026f6f9a18c1dcbc9c888280b69f30207a68c
MD5 18b46f986e711a7b78a9683ad4d94451
BLAKE2b-256 1dbc51a7c8e77db4cf0f1e793a10e5d3a7eb414f0ca15c148df9ec82ad1ba5d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: techkit-1.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 298.7 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 298c3c054841af3bf70531c18c4fe63ca48e47fab87da55d01839dff16954fa1
MD5 81fe125ddfbf876338d8cd1bfe12be17
BLAKE2b-256 6c75e36eb24c31aed7dd593b1e6678e2b483006223985f852a8cbb1e9cfaeebb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8a6ba66378ae3f1613689ea7e699ccc17767a6e4168f7b5c359364d37049afe
MD5 6a83a375d12f274fbf9f30b70e704758
BLAKE2b-256 dbb3b2fd3f1f167b5037ba3298f59ec0d4563165f36b45aa4ff7c13f35c6418e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 836a158aab0e432254da01a14155465a8481f490360fd4c667de534190f499dc
MD5 70983bf8953232a2512182060953fdaa
BLAKE2b-256 a90e295e4acf9bf04111e163a5f8aa71a93db7fa101d229be205c3477eadb25c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for techkit-1.2.1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 19bcba22a5d6720e97faf15dcf6c48da1f1dbcc834aecdd19848844ad601bef4
MD5 2b4ef44a00681bfd941d2d1bc1fcda17
BLAKE2b-256 32b43fbb82525d6634877e71f148238ec46694684219492bd4635bcbed903f8e

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