I had some general questions/observations and ideas related to the plans for options support. While I am a rusty developer, I have been tinkering with Quantconnect and learning the basics to backtest options strategies. All-in-all, the platform looks very promising for the type of trading that I like to do and the type of backtesting that I would like to accomplish. I was wondering if there were some plans for the following, as it moves out of beta testing:
- I have noticed that Greeks and Implied Vol is not currently supported in back testing. Obviously, there is a large need for this type of support for options backtesting. What are the plans to add this support?
- I trade multi-leg strategies. Are there thoughts on adding helper classes or support for them. One example is as follows:
I have been able to add multiple positions to at the same time, which is exactly what we need. However, after they are initiated, it is not clear how to easily or natively track the open positions. In my simple testing/development, I have put in the following code to individually find open contracts and then close them. This was purely for my tinkering, to learn the platform:
foreach (var security in Portfolio.Securities)
{
if (security.Value.Invested == true)
{
Liquidate(security.Value.Symbol);
}
}
The code above does work properly. However, it has led to some additional features or help class(es) that would be helpful if it was native. The helper classes would do the following:
- Enable the developer to look up positions, and pass back a list of the open positions and closed positions. We would be able to search for the open and closed positions
- Support a custom field that would help manage multi-leg positons. This field would be set by the developer when a position is opened, and allow the developer to easily determine which piece of the spread each option is associated with
For example, a butterfly is made up of three legs. The developer would execute the trade(s), and then be able to denote which strike is the upper, mid and lower contracts (or whatever label). When managing the trade, the developer would be able to evaluate and manage each leg separately. So if the developer wanted to roll down the upper strike (say from 2400 to 2390) we could look up the open, "upper" strike and then have the symbol in which to act on.
- Provide multi-leg (aggregated position) greeks. For example the combined delta for all open positions, including any stock and options. This could be recorded at the time of the trade opening and then a separate set of fields for the current greeks.
- Provide greeks for each individual position. Also, recorded at the time of the trading opening and then the current values. We would want both so we can compare the current greeks to the current values for rolling/adjustments.
- Record the price at which each leg was traded and the combined position.
Mauricio Hernández Durán
Hi Richard!
I've been tinkering with QC for options and have recently read about  the new options greeks model update and the helper classes to open different options strategies. However I haven't found any helper classes to manage open positions, which would be handy, For example: there's no helper classes to distinguish different strategies (i.e: Strangles) with the same expiration date. or roll up wings on Iron condors.
Derek Melchin
Hi Mauricio,
GitHub Issue #6659 will make it easier to manage open positions by being able to access the Symbol of each contract in the Option strategy legs. Subscribe to the issue to be notified when this functionality is available.
Best,
Derek Melchin
Want to invest in QuantConnect as we build the Linux of quant finance? Checkout our Wefunder campaign to join the revolution.
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.
Richard Clos
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!