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

Price vs. Reality #5

Open
pegahcarter opened this issue Nov 24, 2018 · 2 comments
Open

Price vs. Reality #5

pegahcarter opened this issue Nov 24, 2018 · 2 comments

Comments

@pegahcarter
Copy link

  • How do we guarantee the price we queried is the price we trade at?

  • Can we standardize our predictions where we add an assumed rate of price we queried compared to price we'll order at?
    - Is that assumed rate transferable across exchanges?

@0xmythril
Copy link

My 2cents:

You can't guarantee it, what you're discussing here is the concept of slippage. Manual execution traders would try to minimize this (and their performance would be judged based on how close they can get). Best you can do is use bid/ask data to construct your execution prices so that you already factor in the spread differential (instead of simply using the last price). But this makes it more complicated from a programming perspective.

On your second point, my suggestion is you could add in a trading cost parameter that you call "slippage" and that by default it would be 0% and then users can choose to opt to discount their execution price to charge this slippage e.g. 0.05%. Since either way you are just making assumptions and the value of slippage cost varies depending on many factors such as volatility in the market, liquidity at the specific exchange etc.

@pegahcarter
Copy link
Author

@sushiparlour thanks for the feedback! I agree with you on both points. I think factoring in exchange liquidity would be out of the current project scope so I'll keep that idea on the sidelines for now. Do you have experience calculating slippage? I could probably translate the math to work with Python.

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