Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orderbook #159

Closed
femtotrader opened this issue Jan 5, 2017 · 2 comments
Closed

Orderbook #159

femtotrader opened this issue Jan 5, 2017 · 2 comments

Comments

@femtotrader
Copy link
Contributor

femtotrader commented Jan 5, 2017

We should probably have some orderbook classes

First an AbstractOrderBook (abstract) class

An InfiniteDepthOrderBook class which inherit from this AbstractOrderBook
Such a class could have methods like bid, ask, spread (for a given volume)
which returns price and remaining volume (0 in case of infinite depth)

And an other class FiniteDepthOrderBook (for finite depth orderbooks)

There is some historical orderbook providers such as https://lobsterdata.com/info/DataSamples.php
so we could also have class to manage this also

Similiar question with zipline: quantopian/zipline#1616

@femtotrader
Copy link
Contributor Author

femtotrader commented Jan 26, 2017

This could remove the need of some odd calculus such as "midpoint".

midpoint = (bid + ask) // 2

See related issue: #167

@femtotrader
Copy link
Contributor Author

Instead of passing bid/ask to update_market_value

def update_market_value(self, bid, ask):

An orderbook could be passed (thanks to PriceHandler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants