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

Debug order execution with bid/ask price, instead of open price #544

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

haochili
Copy link
Collaborator

@haochili haochili commented Aug 29, 2024

Previously, backtesting order execution always use open price to update portfolio.
This change made the change to buy at ask and sell at bid.

Description by Korbit AI

What change is being made?

Modify the order execution logic to use bid/ask prices instead of the open price for market orders and update data aggregation to include bid/ask columns.

Why are these changes being made?

The change ensures more accurate order execution by using the bid price for sell orders and the ask price for buy orders, reflecting real market conditions better than using the open price. Additionally, the data aggregation logic is updated to handle bid/ask data, allowing for more comprehensive data analysis and backtesting.

@haochili haochili requested a review from grzesir as a code owner August 29, 2024 01:53
Copy link
Contributor

korbit-ai bot commented Aug 29, 2024

You've used up your 5 PR reviews for this month under the Korbit Starter Plan. You'll get 5 more reviews on September 20th, 2024 or you can upgrade to Pro for unlimited PR reviews and enhanced features in your Korbit Console.

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

Successfully merging this pull request may close these issues.

1 participant