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

position.update_market_value shouldn't use midpoint #167

Closed
femtotrader opened this issue Jan 28, 2017 · 0 comments
Closed

position.update_market_value shouldn't use midpoint #167

femtotrader opened this issue Jan 28, 2017 · 0 comments

Comments

@femtotrader
Copy link
Contributor

femtotrader commented Jan 28, 2017

position.update_market_value currently use midpoint (ie midpoint = (bid + ask) // 2) to calculate market value of a position

midpoint = (bid + ask) // 2

When a position is long, market value should be calculated using bid price,
when a position is short, market value should be calculated using ask price.

When #166 will be merged, such improvement should be an easy task.

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