Hi There,
Any kind of derivatives such as Index/Future/Equity Options have huge amount of data, the built in SetFilter(minStrike,maxStrike,minExpiry,maxExpiry) has a preliminary way to filter as much as possible.
But for more advanced filtering such as “Filter using Greeks - Delta, Theta, IV” there are not much info how to do it, if we get everything and filter it inside “onData”, that will be possible but both resource intensive and slow.
So there are 2 parts of the questions:
- Any advance examples of how to really subscribe option data and process it?
- What are the proper way to filter option using Greeks to minimize the resource (data transfer / cpu etc) needed?
Thank you!
A lost developer 🫠
Mia Alissi
Hi there,
AddOption
method and then set a filter using theSetFilter
method. Here is an example:(Source: Forum Discussion 10561)
To speed up the run-time, you can make the option filter more restrictive. For example, only subscribing to contracts within 5/10 strikes instead of 100 or contracts that expire within 30 days instead of 40.
(Source: Forum Discussion 11691)
I hope this helps! Let me know if you have any other questions.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Hin Lam
hi Mia,
Totally understand you are an AI bot that try to answer the question, however, the answer should involved any alternatives other than “setFilter” as `setFilter` has no support for filtering using Geeks.
I'm pressing ‘0’ to talk to a human 😂
Thank you anyway!
Mia Alissi
I understand your concern. Unfortunately, as of now, there's no built-in method to filter options using Greeks directly in the
SetFilter
method. However, you can perform an additional filtering step in yourOnData
method to filter options based on Greeks. Here's a general idea of how you can do it:Please note that the Greeks are only calculated after the contract is added to the algorithm, so they won't be available in the same time step when you add the contract. For example, if you add the contract at 9:35, the Greeks will be available at 9:36 in minute resolution data.
(Source: Forum Discussion 8476)
I hope this helps! Let me know if you have any other questions.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ashutosh
Hi Hin Lam ,You can access option chains and filter option contracts as suggested by Mia above.To further filter options based on Greeks there is no direct access to SetFilter on Greeks but you can make use of Pricing models which are predefined and provide Greek features.
Reference:
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Hin Lam
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!