Bamboo-TA is a personal library that consolidates various Technical Analysis (TA) indicators into one simple and modular package for analyzing financial market data. It is designed to help traders develop trading strategies based on candlestick data.
While this library includes popular TA indicators like MACD, RSI, SMA, EMA, it also provides lesser-known indicators like Waddah Attar Explosion and Bollinger Bands Trend Indicator. Bamboo-TA is complementary to other libraries like TA-lib, Pandas-ta, and qtpylib, and it is not intended to replace them.
If you're looking for a library to use for data analysis, backtesting, or integrating indicators into trading bots, Bamboo-TA is designed for simplicity and ease of use.
- Modular Indicators: Includes a wide range of trend, volatility, momentum, performance, volume, and other types of indicators.
- Complementary to Other Libraries: Works alongside popular TA libraries such as TA-lib and Pandas-ta.
- Focus on Algorithmic Trading: Useful for developing custom algorithmic trading strategies with backtesting capabilities.
- Personal Project: Built and maintained for personal use but shared with the community.
Install the latest stable version directly from PyPi:
pip install bamboo-ta
To install the bleeding-edge version from the GitHub repository:
pip install -U git+https://github.com/DutchCryptoDad/bamboo-ta.git@development
To start using Bamboo-TA, import the library in your Python scripts or notebooks:
import bamboo_ta as bta
import pandas as pd
import numpy as np
Make sure to format your DataFrame
correctly, like this:
df = pd.read_json("./BTC_USDT-1d.json")
df.columns = ['date', 'open', 'high', 'low', 'close', 'volume']
df['date'] = pd.to_datetime(df['date'], unit='ms')
You can apply indicators in various ways. Here's how to use Alligator Bands:
alligator_result = bta.alligator_bands(df, 'close', 13, 8, 5, jaw_shift=8, teeth_shift=5, lips_shift=3)
df['jaw'] = alligator_result['jaw']
df['teeth'] = alligator_result['teeth']
df['lips'] = alligator_result['lips']
You can also import and apply individual indicators. Here's how to the Exponential Moving Average::
from bamboo_ta.trend import exponential_moving_average
df['ema'] = bta.exponential_moving_average(df, "close", 21)
Explore the wide range of indicators:
- YouTube: Check out my YouTube channel for tutorials on Freqtrade, Tradingview, and tested trading strategies.
- Patreon: For exclusive trading algorithms, backtests, and strategy codes, support me on Patreon.
- Strategy League: View the results of my tested strategies at DutchAlgoTrading.com.
If you find Bamboo-TA useful, consider supporting the project:
Bamboo-TA is a personal project, and while I make every effort to ensure accuracy, I cannot guarantee the functionality of the indicators. They are tested against Binance (BTC/USDT) data and compared with similar indicators on TradingView.
I personally use these indicators to build my own trading strategies, for backtesting and manual & bot trading using the Freqtrade trading bot. So it is in my own personal best interest to make these indicators work as accurately as possible.
Suggestions and bug reports are welcome, but fixes will be handled on a best-effort basis. Please be patient!