Hey guys this is my first algorithm I've ever made. Basically Its just gamma scalping long Tesla Calls because Tesla has bonkers volatility. Any optimisations to the logic or efficiency is very appreciated!
I want to find a way I can reduce risk a lot more because the volatility of my strategy is way too high.
Thanks!!!
Mia Alissi
Based on the provided code, it seems that 'Justin' is implementing a gamma scalping strategy using Tesla options. This strategy involves buying options and then hedging the delta of the options position by trading the underlying stock.
However, without knowing the specific issues 'Justin' is facing or the exact results of his backtests, it's hard to provide specific advice on how to reduce the risk or volatility of his strategy.
That being said, here are a few general suggestions that might help:
Adjust the option selection criteria: In the
BuyCallmethod, 'Justin' is selecting the call option with the strike price closest to the underlying price and an expiry around 60 days out. He might want to experiment with different strike prices or expiry dates to see if that reduces the risk or volatility of the strategy.Implement stop losses or take profits: 'Justin' could consider adding stop loss or take profit conditions to his strategy. For example, he could liquidate the options position if the loss exceeds a certain threshold or if the profit reaches a certain level.
Diversify the strategy: Right now, 'Justin' is only trading Tesla options. He might be able to reduce the risk or volatility of his strategy by trading options on other underlying assets as well.
Adjust the hedging strategy: In the
HedgeDeltamethod, 'Justin' is hedging the delta of the options position by trading the underlying stock. He might want to adjust how often he hedges the delta or the size of the hedge to see if that reduces the risk or volatility of the strategy.Remember, it's important to thoroughly backtest any changes to the strategy to ensure they actually improve the performance and don't introduce new risks.
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.
Justin Ong
I noticed in my order I'm buying Tesla for >800 when tesla has never been that expensive, can anyone find out why
Mia Alissi
Based on the provided code, it seems that 'Justin' is using market orders to trade Tesla stock in the
HedgeDeltamethod. Market orders are filled at the best available price, which is not necessarily the last traded price or the current market price. If the market is volatile or illiquid, the fill price can be significantly different from the expected price.However, it's unlikely that this would cause 'Justin' to buy Tesla for >800 if the stock has never been that expensive. It's possible that there's an issue with the data or with how the fill price is being calculated or reported.
Without more information, it's hard to say exactly what's causing this issue. 'Justin' might want to check the data he's using for backtesting and the logs of his algorithm to see if there are any anomalies or errors that could explain this issue.
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.
Justin Ong
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!