LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
Does anyone know how I can get the price of contracts on the day they are set to expire? For example, minute bar prices of a call option that has an expiration Friday 2018/01/26, on Friday 2018/01/26.
The current setup in the documents does not allow it and returns the Thursday before expiration.
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.
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.
Jing Wu
242.2k
,
Hi Houman Dehghan,
Here is my attempt to get the price of the contract at the expiry.
Use the delisting property to mark the expiration date (00:00 at expiry) - You need to specify the Time as the contract might appear in the delisting list more than once on the expiration date.
Create an empty list to append the minute contract price (Bid/Ask Price or the bar information).
When the length of the list exceeds the number of bars within a day, stop append the price then we will get a price list which contains only the price on the expiration date.
Repeat the above steps each time we get a new contract in the portfolio.
Please see the attached example for details
0
Edited by Jing Wu
Houman Dehghan
174
,
Hi Jing Wu,
Many thanks for your comment. Would this also work in the research platform?
0
Jing Wu
242.2k
,
It would be easier in research notebook as you could request the options history directly.
qb.GetOptionHistory(symbol, date)
0
Houman Dehghan
174
,
Unfortunately that does not seem correct. I think there is a bug somewhere, I have attached the notebook. The function returns the previous day values instead, 2018-01-18 instead of 2018-01-19.
I actually played around with the notebook a little bit, there are various days that come back empty. For example in the note book above if you try the Tuesday before expiration or even Wednesday it comes back empty.
Has anyone experienced the same issue?
0
Jared Broad
STAFF
,
Please send bug reports to support@quantconnect.com
0
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.
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.
Loading...
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!