I copied some CS code from LEAN repo, with insignificant changes.
The idea is to trade diagonal call spreads. Profit by keeping the premium from selling the short leg, and also profit when the long leg goes up in value.
Problems:
- The algo gets a margin call and doesn't recover gracefully
- The algo buys the underlying.
- Backtest chart shows the exact opposite of what you'd expect, rising at 6/1/19 and 3/20/20, probably the result of the margin calls. GOOG underlying goes up dramatically in that time so diagonal call spreads would have done quite nicely except at the above mentioned dates.
Any ideas for how to fix any of the issues above? Once fixed it should be a very lucrative looking play.
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!