The Gamma-Fluxer Credit Spread Overnight algorithm aims to profit from overnight price movements in NIFTY options by implementing credit spread strategies. The core strategy involves analyzing technical indicators and implied volatility skews to identify potential overbought or oversold conditions in the options market. The algorithm calculates various features, including realized volatility, implied volatility skews (both put and call), and relative price changes in the NIFTY spot price. These features are combined to generate alpha signals that represent the potential edge in the options market. The strategy leverages historical data, including options prices and implied volatilities at different strike prices, to construct a model capable of identifying profitable credit spread opportunities.
The algorithm generates trading signals based on two alpha factors ("alpha" and "alpha2") derived from implied volatility skews and realized volatility. A credit put spread is initiated when both alpha factors exceed a certain threshold (0.75 and 0.7), involving selling a put option and buying another put option with a lower strike price to cap potential losses. Conversely, a credit call spread is implemented when both alpha factors fall below specified thresholds (0.25 and 0.3), consisting of selling a call option and buying another call option with a higher strike price. Risk management involves setting a stop-loss based on a percentage of the margin required for the trade and potentially setting a target profit level, calculated as a percentage of the spread premium. The algorithm considers factors like market open status, trading hours, and expiry dates to avoid trading during unfavorable conditions.