Skip to content

ProviderOptionContract does not seem to support greeks for when slice:False #41

@ffahimi

Description

@ffahimi

When you set the useSlice:False, then the provideroptioncontract is not able to handle greeks. Following error is an example:
Runtime Error: 'ProviderOptionContract' object has no attribute 'greeks'
at delta
return contract.greeks.delta
^^^^^^^^^^^^^^^
in ContractUtils.py: line 200
at
log_message += f"Delta: {[round(self.contractUtils.delta(c), 2) for c in contracts]}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^
in LimitOrderHandlerWithCombo.py: line 278
at logOrderExecution
log_message += f"Delta: {[round(self.contractUtils.delta(c), 2) for c in contracts]}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
in LimitOrderHandlerWithCombo.py: line 278
at makeLimitOrder
self.logOrderExecution(position, order, newLimitPrice)
in LimitOrderHandlerWithCombo.py: line 128
at call
self.makeLimitOrder(position, order)
in LimitOrderHandlerWithCombo.py: line 73
at Execute
self.limitOrderHandler.call(position, order)
in Base.py: line 99 (Open Stack Trace)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions