Skip to content

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

Open
haochili wants to merge 1 commit into
devfrom
enable_bidask_strategy
Open

Debug order execution with bid/ask price, instead of open price#544
haochili wants to merge 1 commit into
devfrom
enable_bidask_strategy

Conversation

@haochili

@haochili haochili commented Aug 29, 2024

Copy link
Copy Markdown
Collaborator

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
@korbit-ai

korbit-ai Bot commented Aug 29, 2024

Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Haochi Li <haochicheers@gmail.com>
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