-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix options indicators data synchronization #8564
Fix options indicators data synchronization #8564
Conversation
…bols Use the new class as base for DualSymbolIndicator and OptionIndicatorBase. The OptionIndicatorBase can now detect when ready even if underlying and options market close is different when resolution is daily.
Also minor fixes
AutomaticIndicatorWarmupOptionIndicatorsMirrorContractsRegressionAlgorithm history count decreased because options indicators period is now 1 instead of 2
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.
Thank you, nice work 👍, minor improvement request shared
Any good reason as to why the ComputeIndicator method in OptionGreekIndicatorBase got sealed with the above change ? The ComputeIndicator method seems to have replaced the logic of the Calculate method which I was overriding in my custom classes to have my own time to expiration calculation. Now there is no straightforward way to override the time to expiration calculation in the custom greek classes derived from the Greek Indicators anymore...unless one implements their own OptionGreekIndicatorBase class but that's messy as then you will have to implement the full indicator classes for each greek as they will be deriving from that custom class...and at that point you might as well skip using QuantConnect Indicators and write your own indicators. Is it possible for you to unseal this method ? This has broken all my custom Greeks and IV classes. Thanks!! |
Also, I noticed that the ComputeIndicator in the ImpliedVolatility is unsealed so I can derive a custom class from ImpliedVolatility and use my own time to expiration calcs in the ImpliedVolatility indicator. But I am not allowed to do it for greeks ? That seems inconsistent... |
Hi @NoSealsInSealBeach |
Description
Introduce
MultiSymbolIndicator
class for indicators that work on multiple symbols.This class allows to detect when the indicator is ready to calculate, that is, when data for all symbols at the same time is available. For instance, if an indicator works with daily data for an option and it's underlying, and they have different market closes, daily data would come at different times of the day for the same date. When this happens, the indicator is able to detect that both symbols have data for the same date and is ready to calculate.
Options indicators, including implied volatility and greeks now are based on this class to handle cases like this.
Note:
AutomaticIndicatorWarmupOptionIndicatorsMirrorContractsRegressionAlgorithm
history count decreased because options indicators period is now 1 instead of 2.Lean/Indicators/OptionIndicatorBase.cs
Lines 128 to 129 in d8746ba
Related Issue
Motivation and Context
An example is RUT index, where market closes at 4pm for indices and at 4:15pm for its options.
Requires Documentation Change
How Has This Been Tested?
Unit tests.
Manual runs.
Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>