Usage
Basic commands and recommended usage for custom and bulk processing.
General#
Version#
Prints out the version.
Versions ≤ 0.3.14b
Bugs encountered in 0.3.14b (or earlier) are no longer being addressd. Before making a bug report, validate that the bug does not exist.
Help#
Ways to utilize Python's help()
command for the library.
Indicators and Library Version#
Prints out the list of indicators.
Programming Conventions#
This library supports three programming conventions: Standard "TA Lib" Convention, Pandas "ta" DataFrame Extension Convention and the Pandas "ta" study() Convention.
Best Practice
For maximum control and flexibility, it is recommended to use the study()
method.
TA Lib
If TA Lib installed, TA Lib integrated indicators defaults to TA Lib, i.e. talib=True
.
Each "Programming Convention" showcases:
- The use of default and user specified parameters.
-
Enabling/disabling ta-lib.
Standard OHLCV Source Indicators Examples
ema()
- Default parameters
macd(fast=5, slow=20, talib=False)
- Disable TA Lib computation
-
Indicator chaining/composition.
Chained/Composed Indicators Examples
ohlc4()
- Source
ema(close=ohlc4)
- Use
ohlc4
as input instead ofclose
- Use
macd(close=ohlc4, fast=5, slow=20, talib=False)
- Disable TA Lib computation
NOTICE
Thanks to all those that have sponsored and dontated to the library in the past! Your support has been greatly appreciated!
However, future releases are on definite hold until 100+ donations of $150+ have been received via Buy Me a Coffee.
Help keep this library and application the best in it's class!
Example Setup Code#
Also examples assumes yfinance
returns at least the following column names: "Open", "High", "Low", "Close", and "Volume"; additional columns are not needed for the library.
yfinance
yfinance
must be installed to use df.ta.ticker()
method.
Standard Convention#
With the above "Example Setup Code", Standard Convention is similar to TA Lib but with lowercase indicator names. The Standard Convention requires more explicit handling of indicator inputs and outputs as well as concatenating to the DataFrame (if needed).
Standard OHLCV Source Indicators Examples
Chained/Composed Indicators Examples
DataFrame "ta" Extension Convention#
With the above "Example Setup Code", the DataFrame "ta" Extension Convention simplifies the number of steps to calculate and concatenate the indicators onto the df
.
Pandas "ta" DataFrame Columns
The DataFrame "ta" Extension assumes the following columns: "Open", "High", "Low", "Close", and "Volume" exist; additional columns are not needed for the library.
DataFrame Concatenation
DataFrame Concatenation is not automatic. Use append=True
, to concatenate the indicators to the df
.
Standard OHLCV Source Indicators Examples
Chained/Composed Indicators Examples
Pandas "ta" Study Convention#
With the above "Example Setup Code", the Pandas "ta" study()
Convention also assumes the following columns: "Open", "High", "Low", "Close", and "Volume" exist in the df
.
Standard OHLCV Source Indicators Examples
Column Prefixes/Suffixes
The study() also accepts prefix
and suffix
parameters for additional or simplified naming options. This is useful for indicator chaining to avoid overwriting the results of another indicator with a different source.
Chained/Composed Indicators Examples
Concatenating
The Pandas study() automatically concatenates to the DataFrame.
Multiprocessing
Multiprocessing is only available when using Pandas TA's df.ta.study()
method.