Hi all,
I have an account also with CMLViz its a site for running backtests on option strategies. Lately, I wanted to see if I could make any money using bull call credit spread (or bull put credit spread) on moves of QQQ or whatever ticker.
But I can't get the quantconnect data version of the call contract to give the same results. Essentially for 1 year back, do sell 70 delta call and buy an 80 delta call on a given equity (QQQ in this example) and make money.
The CMLViz shows a profit % much higher. And the strikes are a little off despite the delta calculation. Not knowing what I am missing here. Performance should be 350% with 5 contracts.
I have attached only a subset of the above trades...
Date Description Size Symbol Expiration Strike Type Trade Price Profit/Loss Stock Price Adjusted Stock Price
6-Jan-2020 Open TechnicalOpen:Short Calls -10 QQQ Jan17`20 212.5 Call $4.31 $215.56 $214.03
6-Jan-2020 Open TechnicalOpen:Long Calls 10 QQQ Jan17`20 210.5 Call $5.94 $215.56 $214.03
17-Jan-2020 Close DaysToExpiration:Short Calls 10 QQQ Jan17`20 212.5 Call $10.84 -$6530 $223.38 $221.8
17-Jan-2020 Close DaysToExpiration:Long Calls -10 QQQ Jan17`20 210.5 Call $12.91 $6970 $223.38 $221.8
21-Jan-2020 Open TechnicalOpen:Short Calls -10 QQQ Jan31`20 220 Call $4.56 $223.28 $221.7
21-Jan-2020 Open TechnicalOpen:Long Calls 10 QQQ Jan31`20 217.5 Call $6.63 $223.28 $221.7
31-Jan-2020 Close DaysToExpiration:Short Calls 10 QQQ Jan31`20 220 Call $0.02 $4540 $219.07 $217.52
31-Jan-2020 Close DaysToExpiration:Long Calls -10 QQQ Jan31`20 217.5 Call $1.74 -$4890 $219.07 $217.52
3-Feb-2020 Open TechnicalOpen:Short Calls -10 QQQ Feb14`20 218 Call $6.2 $222.38 $220.8
3-Feb-2020 Open TechnicalOpen:Long Calls 10 QQQ Feb14`20 214.5 Call $9.05 $222.38 $220.8
14-Feb-2020 Close DaysToExpiration:Short Calls 10 QQQ Feb14`20 218 Call $16.48 -$10280 $234.64 $232.98
14-Feb-2020 Close DaysToExpiration:Long Calls -10 QQQ Feb14`20 214.5 Call $19.99 $10940 $234.64 $232.98
18-Feb-2020 Open TechnicalOpen:Short Calls -10 QQQ Feb28`20 231 Call $5.1 $234.73 $233.07
18-Feb-2020 Open TechnicalOpen:Long Calls 10 QQQ Feb28`20 229 Call $6.72 $234.73 $233.07
28-Feb-2020 Close DaysToExpiration:Short Calls 10 QQQ Feb28`20 231 Call $5100 $205.8 $204.34
28-Feb-2020 Close DaysToExpiration:Long Calls -10 QQQ Feb28`20 229 Call -$6720 $205.8 $204.34
23-Apr-2020 Open TechnicalOpen:Short Calls -10 QQQ May1`20 204 Call $9.25 $210.52 $209.47
23-Apr-2020 Open TechnicalOpen:Long Calls 10 QQQ May1`20 199 Call $13.18 $210.52 $209.47
1-May-2020 Close DaysToExpiration:Short Calls 10 QQQ May1`20 204 Call $8.3 $950 $212.74 $211.68
1-May-2020 Close DaysToExpiration:Long Calls -10 QQQ May1`20 199 Call $13.32 $140 $212.74 $211.68
4-May-2020 Open TechnicalOpen:Short Calls -10 QQQ May15`20 208 Call $9.86 $215.22 $214.15
4-May-2020 Open TechnicalOpen:Long Calls 10 QQQ May15`20 204 Call $13.02 $215.22 $214.15
15-May-2020 Close DaysToExpiration:Short Calls 10 QQQ May15`20 208 Call $15.13 -$5270 $223.27 $222.16
15-May-2020 Close DaysToExpiration:Long Calls -10 QQQ May15`20 204 Call $19.13 $6110 $223.27 $222.16
18-May-2020 Open TechnicalOpen:Short Calls -10 QQQ May29`20 222 Call $7.9 $227.43 $226.3
18-May-2020 Open TechnicalOpen:Long Calls 10 QQQ May29`20 217 Call $11.96 $227.43 $226.3
29-May-2020 Close DaysToExpiration:Short Calls 10 QQQ May29`20 222 Call $11.44 -$3540 $233.36 $232.2
29-May-2020 Close DaysToExpiration:Long Calls -10 QQQ May29`20 217 Call $16.36 $4400 $233.36 $232.2
1-Jun-2020 Open TechnicalOpen:Short Calls -10 QQQ Jun12`20 228 Call $8.4 $234.06 $232.9
1-Jun-2020 Open TechnicalOpen:Long Calls 10 QQQ Jun12`20 223 Call $12.53 $234.06 $232.9
12-Jun-2020 Close DaysToExpiration:Short Calls 10 QQQ Jun12`20 228 Call $8.33 $70 $235.88 $234.71
12-Jun-2020 Close DaysToExpiration:Long Calls -10 QQQ Jun12`20 223 Call $13.27 $740 $235.88 $234.71
15-Jun-2020 Open TechnicalOpen:Short Calls -10 QQQ Jun26`20 232 Call $9.16 $238.75 $237.56
15-Jun-2020 Open TechnicalOpen:Long Calls 10 QQQ Jun26`20 227.5 Call $12.66 $238.75 $237.56
26-Jun-2020 Close DaysToExpiration:Short Calls 10 QQQ Jun26`20 232 Call $8.09 $1070 $240.22 $239.44
26-Jun-2020 Close DaysToExpiration:Long Calls -10 QQQ Jun26`20 227.5 Call $12.68 $20 $240.22 $239.44
29-Jun-2020 Open TechnicalOpen:Short Calls -10 QQQ Jul10`20 237 Call $8.33 $242.84 $242.05
29-Jun-2020 Open TechnicalOpen:Long Calls 10 QQQ Jul10`20 232.5 Call $11.79 $242.84 $242.05
10-Jul-2020 Close DaysToExpiration:Short Calls 10 QQQ Jul10`20 237 Call $27.2 -$18870 $263.97 $263.11
10-Jul-2020 Close DaysToExpiration:Long Calls -10 QQQ Jul10`20 232.5 Call $31.68 $19890 $263.97 $263.11
13-Jul-2020 Open TechnicalOpen:Short Calls -10 QQQ Jul24`20 250 Call $12.14 $258.54 $257.7
13-Jul-2020 Open TechnicalOpen:Long Calls 10 QQQ Jul24`20 243 Call $17.72 $258.54 $257.7
24-Jul-2020 Close DaysToExpiration:Short Calls 10 QQQ Jul24`20 250 Call $5.44 $6700 $255.56 $254.73
24-Jul-2020 Close DaysToExpiration:Long Calls -10 QQQ Jul24`20 243 Call $12.36 -$5360 $255.56 $254.73
27-Jul-2020 Open TechnicalOpen:Short Calls -10 QQQ Aug7`20 253 Call $9.98 $260.12 $259.27
27-Jul-2020 Open TechnicalOpen:Long Calls 10 QQQ Aug7`20 248 Call $13.91 $260.12 $259.27
7-Aug-2020 Close DaysToExpiration:Short Calls 10 QQQ Aug7`20 253 Call $18.42 -$8440 $271.47 $270.59
7-Aug-2020 Close DaysToExpiration:Long Calls -10 QQQ Aug7`20 248 Call $23.42 $9510 $271.47 $270.59
And now here is the QuantCOnnect version I coded from scratch... does terrible and results not same... as I said... something is off:
.ekz.
I can help troubleshoot. What is the specific behaviour / strategy you Backtested in CML?
You mentioned: "For 1 year back, do sell 70 delta call and buy an 80 delta call on a given equity (QQQ in this example) and make money"
But more details would help. Can you share a link to the CML backtest itself? I backtest on optionstack and ORATs, but I am going to be signing up for CML as well.
.ekz.
Also, I think you meant Bullish Call debit spread. A call credit spread would be bearish.
Goldie Yalamanchi
Yes sorry I meant a bullish debit spread (call).
Sure here is the link...
https://pro.trademachine.com//index.php?share_key=20210105234627_c0sMcX0x3dcs0YJh.ekz.
TLDR: Trust QuantConnect, imo.
Hi Goldie Yalamanchi ,
I'm ramping up with QC, but I skimmed the code and took a look at this in CMLViz.
At first I thought the discrepancy might be because we are using intraday data on QC (with minute resolution), but with CMLViz we only have a single snapshot of the option chain for the each day (daily resolution)
So I backtested the strategy on OptionStack (OS), which also has daily resolution, and my OS results are closer to the results we are seeing in QuantConnect. In my image below, you will notice that the strategy does okay and then hits a big drop in August. Just like our QC strategy.
There could be a few reasons why CMLViz does not have this drop, but it’s hard to tell what they are doing behind the scenes.
It’s my first time using CMLViz, and the first thing i noticed is that there isn’t much granularity on how to pick strikes. Our vertical consists of a 70 delta and 80 delta, but there are times in an option chain you might not have exact deltas that match. For example You my have 69 delta and 71 delta. but not exact ’70’. In this scenario, what strike does CMLViz pick? Do they just skip the trade? We don’t know, and that can make all the difference.
In options backtesting platforms like OptionStack and ORATs (they both also only have daily option chain data), you specify a range. For example, in OptionStack, for the 70 delta, i put in a range of 69 - 70 delta (instead of just 70), and I specified that if there are multiple matches within this range, then select the best strike based on max return.
In QC, we have even much more control / granularity where we have minute resolution for our option chain, and at different times of day our option chain can look very different, but we can pick exactly what we want, with custom logic.
My advice would be to trust QC, where you have more data, and more control. However, if you really want your QC and CMLViz backtests to match, try to find out what exactly CMLViz is doing under the hood, so you can replicate it in QC.
Goldie Yalamanchi
Yes I think there maybe issue with the strikes on CMLViz. Anyways I was just doing a one month membership with them... but if their data is no good whats the point. I am inclined to think that based on optionstack gave you the same results as QC.
Goldie Yalamanchi
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!