Skip to content

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lumibot/strategies/strategy_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,9 @@ def _on_filled_order(self, position, order, price, quantity, multiplier):
# Calculate the value of the position
order_value = price * float(quantity)

# If option, multiply % of portfolio by 100
# If option, multiply % of portfolio by multiplier
if order.asset.asset_type == Asset.AssetType.OPTION:
order_value = order_value * 100
order_value = order_value * multiplier

# Calculate the percent of the portfolio that this position represents
percent_of_portfolio = order_value / portfolio_value
Expand Down