Option Dispersion Trading

In "Options Trading Strategies In Python: Advanced" Course —> "Section 2: Dispersion Trading"

How to back test the strategy



Thank  you !!!

With Warm Regards

 

Hi Nandagopal,



We have covered the code for backtesting the Dispersion Trading Strategy in Section 2, Unit 6 of the Course on Options Trading Strategies In Python: Advanced.



Here's a link to the same.

Quantra by QuantInsti | Courses on Algorithmic and Quantitative Trading



I hope this helps.

 

Hi 



Thank you !!!



One more doubt . Nifty generally has 50 Constitutents . Will the Position change if we use all the  50 constitutents.



I Mean , will the below option position  change if we use more constitutents 

 

  1. '+1' for long on index straddle and short on index constituents straddle
  2. Vice-versa, '-1' for short on index straddle and long on index constituents straddle
  3. '0' is stored to exit the positions in index and index constituents

Hey Nandagopal,



In the code for Dispersion Trading Strategy, we have used the BankNifty index and its constituents.

As we know, the BankNifty index is composed of 12 constituent stocks and the top 5 stocks account for approx 80% weightage of the index.



If you wish to implement the same for the Nifty index, you would have to identify and shortlist the stocks which account for a similar weightage in Nifty. Also note, this process would be much more complex here as Nifty has 50 constituent stocks.



Coming to your question, the trading signals generated are not dependent on the number of constituent stocks you choose and thus, there would not be any changes regarding this aspect.



Feel free to go ahead and tweak the code as per your preference.

But please ensure you perform a thorough backtest of the trading strategy and take into account miscellaneous trading costs associated with the same, before taking any trading strategy live.



I hope this was helpful.

 

Hi Kevin ,



Thank you !!! It is long time reopening this post again . 



I have one more doubt . WIth the Current Market Conditions , Weekely options are also available . 



In our code we have used only 1 expiry date ATM to compute mean IV.  For each day the average of implied volatility (IV) for ATM Call and ATM Put is calculated for BankNifty and its constituents

    BankNifty_IV = BankNifty_Opt.groupby(['Date'])['IV'].mean().to_frame()

    HDFCBANK_IV = HDFCBANK_Opt.groupby(['Date'])['IV'].mean().to_frame()

    ICICIBANK_IV = ICICIBANK_Opt.groupby(['Date'])['IV'].mean().to_frame()

    KOTAKBANK_IV = KOTAKBANK_Opt.groupby(['Date'])['IV'].mean().to_frame()

    SBIN_IV = SBIN_Opt.groupby(['Date'])['IV'].mean().to_frame()

    AXISBANK_IV = AXISBANK_Opt.groupby(['Date'])['IV'].mean().to_frame()



so now , do we need to take average of implied volatility (IV) for ATM Call and ATM Put. This above code will contain ATM calls and ATM puts for weekely and Monthly expiry date on the same date . 



or



Do we need to take average of implied volatility (IV) for ATM Call and ATM Put for particular expiry date .



Thank you !!!

With Warm Regards

Nandagopal

Hi,



You will have to use monthly expiry date because weekly options are not available for stocks they are available for index. You can use this link to search for options.



Thanks,

Rushda