Skip to content

there are two fatal mistakes in this code #5

@Sordicus

Description

@Sordicus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions