You can use add_all_ta_features to perform feature engineering on a financial dataset by adding all available technical analysis indicators at once. You can specify the column names for open, high, low, close, and volume. Setting fillna=True will automatically fill the resulting NaN values.
Note: It is recommended to clean your data using ta.utils.dropna before adding features.
import pandas as pd
from ta import add_all_ta_features
from ta.utils import dropna
# Load datas
df = pd.read_csv('ta/tests/data/datas.csv', sep=',')
# Clean NaN values
df = dropna(df)
# Add ta features filling NaN values
df = add_all_ta_features(
df, open="Open", high="High", low="Low", close="Close", volume="Volume_BTC", fillna=True)