-
Notifications
You must be signed in to change notification settings - Fork 213
Make the library more Options friendly #754
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
base: dev
Are you sure you want to change the base?
Conversation
The multiplier for Option contracts is not always 100. As an example, the multiplier for Bitcoin Option contracts is `1`.
Important Required App Permission UpdateNoise Reduction ImprovementsThis update requests write permissions for Commit Statuses in order to send updates directly to your PRs without adding comments that spam notifications. Visit our changelog to learn more. Click here to accept the updated permissions To accept the updated permissions, sufficient privileges are required |
There was a problem hiding this comment.
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/strategies/strategy_executor.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.
The multiplier for Option contracts is not always 100. As an example, the multiplier for Bitcoin Option contracts is `1`.
Method documentation has been updated with the description for the new Option contract multiplier.
In case of an Option order, get_increment() shall behave differently; negative in case of a buy order and untouched in case of sell order.
@grzesir |
This looks good except for the get increment part. Could you explain your reasoning there? |
Thanks a lot for your feedback @grzesir |
That makes sense, but how is that different from any other asset? |
Currently and in the context of |
@grzesir |
This pull request contains a number of changes to make the library more Options friendly:
Description by Korbit AI
What change is being made?
Modify the calculation of order value for options by multiplying with a generic multiplier instead of the fixed value of 100 in the
_on_filled_order
method ofstrategy_executor.py
.Why are these changes being made?
This change generalizes the code to accommodate different option contract sizes other than the fixed multiplier of 100, enhancing the flexibility and accuracy of the order value calculation for various option types. This approach is necessary to support assets in markets where the multiplier might not be 100, providing a more adaptable solution.