Hi Kevin ,
Thank you !!!
Have one more doubt .
Curently NSE has options ranging from weekely expiry dates till monthly expiry dates. So in a day there will be minimum 2 or 3 expiry dates . In this case ,
How to calculate implied_dirty_correlation in this case . Does the below remain the same
"
- For each day the average of implied volatility (IV) for ATM Call and ATM Put is calculated for BankNifty and its constituents
- Then, weighted average constituents volatility is calculated
- Finally, the implied correlation is calculated as the index implied volatility and weighted average constituents volatility"
Do we need to group by expiry date and date or use the same function irrespective of expiry dates.
Thank you !!!
WIth Warm Regards
Nandagopal
Hi Kevin ,
Thank you !!!
Have one more doubt .
Curently NSE has options ranging from weekely expiry dates till monthly expiry dates. So in a day there will be minimum 2 or 3 expiry dates . In this case ,
. Does the below remain the same
"
- For each day the average of implied volatility (IV) for ATM Call and ATM Put is calculated for BankNifty and its constituents
- Then, weighted average constituents volatility is calculated
- Finally, the implied correlation is calculated as the index implied volatility and weighted average constituents volatility"
For Point 1, Do we need to group by expiry date and date or use the same function irrespective of expiry dates.
Is it the average of all IV's on that day irrespective of expiry dates , traded on that day ?
or
we should take only the month end expiry dates
Thank you !!!
With Warm Regards
Nandagopal
Thank you !!!
WIth Warm Regards
Nandagopal
Hey Nandagopal,
As you correctly mentioned, in NSE, you will find both - the weekly and the monthly expiry options contracts for indices such as Nifty and Banknifty. However, when it comes to the individual stock derivatives, you will only find options contracts that have a monthly expiry.
Since the Dispersion trading strategy involves buying/selling of both - the index options, as well as its constituent stock's options, it would be best to stick with monthly options, or as you mentioned - options that have month-end expiry dates.
I hope this clarifies your doubt.
Hi Kevin ,
Thank you !!!
Have one more doubt . Kindly apologize for asking the same question .
ok to stick with month expiry dates . But have one doubt.
For eg: If expiry date is 31-Aug-2023 , then for today 07-July2023 , there will be IV's related to 27-Jul-2023 and 31-Aug-2023 expiry dates .
so now , should i take the average of all IV's on that day irrespective of expiry dates , traded on that day or should i group by expiry dates , trading date .
Is there a way i can set straddle , 2 months before expiry date.
This above answer will help to set a straddle in previous month itself .
Thank you !!!
With Warm Regards
Nandagopal
Hi Kevin ,
Thank you !!!
Have one more doubt . Kindly apologize for asking the same question .
ok to stick with month expiry dates . But have one doubt.
For eg: If expiry date is 31-Aug-2023 , then for today 07-July2023 , there will be IV's related to 27-Jul-2023 and 31-Aug-2023 expiry dates .
so now , should i take the average of all IV's on that day irrespective of expiry dates , traded on that day or should i group by expiry dates , trading date .
Is there a way i can set straddle , 1 month before expiry date. For eg :, for 31-Aug-2023 , can i set a straddle on 7-Jul-2023.
This above answer will help to set a straddle in previous month itself .
Thank you !!!
With Warm Regards
Nandagopal
Hi Nandagopal,
I am not sure if I understand the second part of the question - "should i take the average of all IV's on that day irrespective of expiry dates , traded on that day or should i group by expiry dates , trading date". It would be great if you could elaborate on the same with an example.
Thanks,
Akshay
Hi Akshay ,
For eg: If expiry date is 31-Aug-2023 , then for today 07-July2023 , there will be IV's related to 27-Jul-2023 and 31-Aug-2023 expiry dates .
so now , should i take the average of all IV's on that day irrespective of expiry dates like
HDFCBANK_IV = HDFCBANK_Opt.groupby(['Date'])['IV'].mean().to_frame()
or
should i group by expiry dates
HDFCBANK_IV = HDFCBANK_Opt.groupby(['Date','Expiry_Date'])['IV'].mean().to_frame()
where
Date - is the trading date
Thank you !!!
With Warm Regards
Nandagopal
9952035517
Hi Nandagopal,
You can group by expiry dates and then take the mean of all IVs.
Thanks,
Akshay
Hi Akshay ,
Thank You!!!
Then in that case for a single trading , I would be having the current month end Expiry date and Next month end Expiry date data . In that case how to modify the below function to find the signals:
def trading_signal(df):
df.index.column = 0
lookback = 5
# Moving Average
df['moving_average'] = df['implied_correlation'].rolling(lookback).mean()
# Moving Standard Deviation
df['moving_std_dev'] = df['implied_correlation'].rolling(lookback).std()
df['upper_band'] = df.moving_average + 0.5df.moving_std_dev
df['lower_band'] = df.moving_average - 0.5df.moving_std_dev
df['long_entry'] = df.implied_correlation < df.lower_band
df['long_exit'] = df.implied_correlation >= df.moving_average
df['short_entry'] = df.implied_correlation > df.upper_band
df['short_exit'] = df.implied_correlation <= df.moving_average
df['positions_long'] = np.nan
df.loc[df.long_entry, 'positions_long'] = 1
df.loc[df.long_exit, 'positions_long'] = 0
expiry_dates = HDFCBANK_Opt.Expiry.unique()
df.loc[df.index.isin(expiry_dates), 'positions_short'] = 0
df['positions_short'] = np.nan
df.loc[df.short_entry, 'positions_short'] = -1
df.loc[df.short_exit, 'positions_short'] = 0
df.loc[df.index.isin(expiry_dates), 'positions_short'] = 0
df = df.fillna(method='ffill')
df['positions'] = df.positions_long + df.positions_short
return df
df = trading_signal(df)
df.positions.tail()
Please help!!!
Thank you !!!
With Warm Regards
Nandagopal
Hi Nandagopal,
You can take the implied volatility as per your strategy. For example, if you want to deploy the straddle for August expiry you can mean IV as per the August data.
Hope this helps!
Thanks,
Akshay
Hi Akshay ,
As per the course it mean IV is from continuous data of Options , meaning one Trading date will have only one expiry month . Can we have a call . I am bit confused .
Thank you !!!
With Warm Regards
Nandagopal
9952035517
Hi Nandagopal,
Someone from the team will be reaching out regarding the same.
Thanks,
Akshay
Hi Akshay ,
I am yet to receive a call . Can please help on the same .
Thank you !!!
With Warm Regards
Nandagopal
Hi Nandagopal,
Hope your query was resolved over the call. Please do let us know if you have any queries/issues.
Thanks,
Akshay