Why Feature Extractor is not working in FinRL code?

118 Views Asked by At

I have this dataset:

df =

    date         open   high    low     close    volume        tic   day
0   2009-11-18  170.10  170.20  158.00  158.20  2730000.0      GRAE    2
1   2009-11-18  63.02   63.69   62.12   62.49   59540.0        SGBD    2
2   2009-11-18  50.23   50.81   50.05   50.47   3310000.0      SQPH    2
3   2009-11-19  158.10  167.90  152.00  164.00  1630000.0      GRAE    3
4   2009-11-19  62.21   63.47   61.89   62.09   69320.0        SGBD    3

While using the feature extractor block from here

https://github.com/AI4Finance-Foundation/FinRL/blob/master/Stock_NeurIPS2018_SB3.ipynb

fe = FeatureEngineer(
                    use_technical_indicator=True,
                    tech_indicator_list = INDICATORS,
                    use_vix=True,
                    use_turbulence=True,
                    user_defined_feature = False)



processed = fe.preprocess_data(df)

I get this error: KeyError: "None of [Index(['tic', 'date', 'macd'], dtype='object')] are in the [columns]"

I am not understanding how to solve this.

0

There are 0 best solutions below