Skip to content

Error when plotting a large amount of data #35

Closed
@thomasd3

Description

@thomasd3

I have a very simple test:

df=load_dataframe(r’./historical.xlsx')
df = df.set_index('date')

# the backtest is a strategy that does nothing for now
bt = Backtest(df, empty_strategy, cash=1, commission=.002)
bt.run()

# and the display simply
bt.plot()

with all the data, bt.plot() will fail with Javascript Error: Maximum call stack size exceeded.

if I add:

df = df[0:50000]

then the display works fine.

I have about 1.3M data points (and need them); is there a way to resample the data but ONLY for the display?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions