bta-lib 0.9.1 - Initial Relase
-
bta-lib
- Apandas
based Technical Analysis LibraryLinks
- Main Page: https://btalib.backtrader.com/
- Documentation: https://btalib.backtrader.com/introduction/
- Community: https://community.backtrader.com/category/10/bta-lib
- GitHub Repo: https://github.com/mementum/bta-lib
Installation
Via
pip
pip install bta-lib
Remember:
pandas
is a requirement. Read the docs!!! -
bta-lib
is a newpandas
based technical analysis library focused on being easy to use, reuse and with a framework to allow quick indicator prototyping and development.The repo
For those with no time to read and eger to click on GitHub links:
- The repo is at: bta-lib github repo - https://github.com/mementum/bta-lib
The rationale behind the library
In several threads here it was mentioned that plenty of the python-based (or with python bindings) technical analysis libraries populating GitHub are broken to a greater or lesser extent. Rather than broken one can also say that they contain
I3 Indicators
, i.e.: Improperly Implemented Indicators. Yes, eventa-lib
imho.Should you have interest in a practical example, the documentation contains a section named: I3 Indicators with a practical example featuring
ta-lib
and theMACD
The link: I3 Indicators - ta-lib and MACD - https://btalib.backtrader.com/i3indicators/
Hence the birth of this library, which in addition to the aforementioned goals, tries to offer correct implementations of the indicators (and a backwards compatibility flag to
ta-lib
where desired by the end user)What's in place so far:
-
The framework to make things palatable, i.e.: easy
-
A test framework to ensure things don't break when making changes
-
Full Documentation ... only missing the indicator development part
-
36
indicators which have been the basis to proof the framework is soundThe classic indicators such as
SMA
,EMA
,RSI
,Stochastic
,MACD
,ATR
were the first targets for the development (given that some of them are often improperly implemented)
The next steps
-
Develop extra indicators, to get close to
100
, roughly following theta-lib
API, except for candlestick pattern formation (longer term goal) -
Consider a couple of small internal enhancements to the API to address use cases in which the input naming is actually irrelevant for an indicator or n-plicated naming would be a feature
None of these changes will mean a change for the end user and would only "add" to the internal Indicator development facilities