You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, your columns "return" and "return next" are the wrong sign, because they are defined as open-close instead of close-open. Thus, when you define "label" with "if lambda x: 1 if x>0.0 else 0" you get the opposite of what you want.
Also, on input [8] you write:
df_oil = df.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
when it should be
df_oil = df**_oil**.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
this mistake completely deletes your original df_oil
The text was updated successfully, but these errors were encountered:
Firstly, your columns "return" and "return next" are the wrong sign, because they are defined as open-close instead of close-open. Thus, when you define "label" with "if lambda x: 1 if x>0.0 else 0" you get the opposite of what you want.
Also, on input [8] you write:
df_oil = df.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
when it should be
df_oil = df**_oil**.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
this mistake completely deletes your original df_oil
The text was updated successfully, but these errors were encountered: