While it is usually 100 stock in contract, but if I am not mistaken, this may change in case of a split event while the contract is not expired yet.
So can I somehow get current number of stocks in options contract in my code? I don't see any field for this in OptionContract class.
Louis Szeto
Hi Yuri
Do you mean the contract multiplier? You can get that from the ContractUnitOfTrade/ContractMultiplier property of the Option object:
Best
Louis
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.
Yuri Lopukhov
Louis Szeto from the looks of it it does not seem like this value is dynamic and will change after the split. What I mean is explained here:
more specifically this part:
For example, if you buy a call option that controls 100 shares of XYZ with a strike price of $75. If XYZ announces a 2:1 stock split, the contract would now control 200 shares with a strike price of $37.50. On the other hand, if the stock split is 3 for 2, the option would control 150 shares with a strike price of $50.
However, seeing how QuantConnect liquidates options positions before the split with message “options splits are not supported”, this is probably will not happen in live or backtesting anyway, not until options splits are supported.
Yuri Lopukhov
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!