Skip to content

Disable wait on order processing when backtesting - #785

Open
majdzadeh wants to merge 2 commits into
Lumiwealth:devfrom
majdzadeh:dev
Open

Disable wait on order processing when backtesting#785
majdzadeh wants to merge 2 commits into
Lumiwealth:devfrom
majdzadeh:dev

Conversation

@majdzadeh

@majdzadeh majdzadeh commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

Broker waits when processing orders only if it is not a backtesting broker.

Resolves #764

Description by Korbit AI

What change is being made?

Disable the wait for order registration and execution when running in a backtesting environment.

Why are these changes being made?

The waiting behavior is unnecessary and potentially disruptive during backtesting as it simulates synchronous order processing which doesn't apply in backtesting scenarios. Removing this wait improves the performance and accuracy of backtesting by aligning behavior with realistic, asynchronous order placement typically found in live environments.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Broker waits when processing orders only if it is not a backtesting
broker.

Resolves Lumiwealth#764

@korbit-ai korbit-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
lumibot/brokers/broker.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

A single `StrEnum` class is defined and imported by `Order` and `Asset`
classes.

Resolves Lumiwealth#788
@majdzadeh

Copy link
Copy Markdown
Contributor Author

@grzesir
Kindly take a look whenever you're free. Thanks.

@majdzadeh

Copy link
Copy Markdown
Contributor Author

@grzesir
Could you please check the PR?

@majdzadeh

Copy link
Copy Markdown
Contributor Author

@grzesir
May I know your review policy? It's been around 2 months that I have raised this PR which resolves an issue in the library and I see no traction.

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.

Probably invalid methods in the context of BacktestingBroker

1 participant