Alright, I've tried to fix some further bugs:
- In-the-money and out-the-money is now relative to option type
- Fixed some logic in the maturity declarations
- Fixed the way options are referred to
The way we can refer to options is now (when using "MONTHLY" options):
Order("SPY.CALL.1.0", 80*100);
which means: Buy 80 CALL contracts with the first in-the-money strike price with the maturity in this month.
Or, an example for "WEEKLY" options:
Order("SPY.PUT.-2.2", 80*100);
which means: Buy 80 PUT contracts with the second out-the-money strike price with the maturity in two weeks.
Another example:
Order("SPY.CALL.-2.0", 80*100);
which means: Buy 80 CALL contracts with the second out-the-money strike price with the maturity in this week.
As I'm currently doing my master's (Quant Finance of course), I won't be able to spend any more time on this framework. I hope it can suffice as a help (or inspiration) to the formal framework that Jared&Team are developing.
Mind you, however, that I'm calculating the theoretical price of European options. Calculating the price of American options is a bit more difficult. Maybe QuantConnect can reach out to iVolatility, which have a very good calculator for both option types. Maybe they are willing to share their code? (Even CBOE uses their calculator)
Anyway, I wish you guys good luck with the formal framework!
JP B
Jared Broad
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.
JP B
JP B
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!