Skip to content

Bug: create_last_snapshot returns invalid orderbook #271

@wellimbharath

Description

@wellimbharath

When you generate snapshot through elapse with a fixed set of bid and ask lenghts i.e while hbt.elapse(elapse_in_ns) == 0: the snapshots looks correct, but when you generate snapshot from create_last_snapshot(data_npz, tick_size=.01, lot_size=0.00001, initial_snapshot=None), its gives an incorrect orderbook at the end.

Sample npz file converted to csv: sample.csv

Tick Size : 0.01, Lot Size : 0.00001

The problem is the ask prices are much lower than bid prices on the final snapshot and they are still in the final snapshot for some reason, it should never happen, its only happening when doing the create_last_snapshot but not when its done over elapse. There must be some issue here which I am unable to figure out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions