Skip to content

Problem running the code #2

@Kalelv45

Description

@Kalelv45

On the second example. Can't find a way around it.
what did I miss?
File "", line 187, in
reward = get_reward(new_state, time_step, action, xdata, signal, terminal_state, i)

File "", line 106, in get_reward
bt = twp.Backtest(pd.Series(data=[x[0] for x in xdata]), signal)

File "/anaconda3/lib/python3.6/site-packages/bt/backtest.py", line 128, in init
if data.columns.duplicated().any():

File "/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py", line 3610, in getattr
return object.getattribute(self, name)

AttributeError: 'Series' object has no attribute 'columns'

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