Historical Options Chain, greeks and IV

#1
Hi,

I am not a coder but I do know how to code in bits and pieces to make my quick & dirty application for any task that I am trying to automate. In 2016 I started reading about derivatives and wanted to trade options.

As options are non linear instruments I see that many things go into picking an option, like to decide when to sell/buy and what options to buy/sell we have to consider spot price/volatility, Greeks, time and IV etc along with appropriate strike. Based on this, I needed to calculate many things for options along with technical analysis of the spot to initiate a trade with high probability. Initially I used EXCEL to do all my calculations but it was very slow and as so many dimensions are to an option, I was not able to quickly update the sheets manually. So I decided to work on a web based app but could not complete. Recently I got some time and decided to complete the same.

I have built an app which can work on the historical EOD data for any stock (fetch automatically if not present already), its FnO derivatives and compute the Greeks, Implied volatility and the trend of volatility for every option (chain) and save in a database.

Right now I am regarding the IV and its trend for an option's lifetime and also the IV trend for x number of strike away from ATM to understand if it is trading at a premium or not and see if volatility will cool or not. These charts can help in analyzing the costliness of an option.
The reason for putting that importance on IV trend is because delta, gamma are dependent on the spot movement and position of spot wrt strike, theta is in one directional and rho does not even matter in such short periods of expiry. IV can really affect the premium which can be analysed in details.

As any type of chart and view can be built if we have the data, please share if you have any suggestions for manipulating the historical data and help me understand if there can be another view/chart that can visually assist to make decisions for initiating an options trade. I will implement the same in my study.

I am attaching some screenshots of my webapp. Currently it is hosted in my laptop, if it is useful, I can try to migrate online. Since the database is really huge, it will require some powerful servers.:dead:. Anyways right now I am storing the data for all FnO segment stocks (spot), all futures instruments, for options: BANKNIFTY, NIFTY, SBIN, INFY, RELIANCE, TCS, TATASTEEL, TATAMOTORS, MARUTI, PNB, FORTIS and DLF. However, it can be done for any FnO instrument.

1.jpg 2.jpg 3.jpg 4.jpg
 
Last edited:
#2
I have tweaked it a bit to calculate all the Greeks based on LTP instead of close and use 10% risk free rate instead of MIBOR to keep with the calculations of NSE.
 
#3
Hi,

I am not a coder but I do know how to code in bits and pieces to make my quick & dirty application for any task that I am trying to automate. In 2016 I started reading about derivatives and wanted to trade options.

As options are non linear instruments I see that many things go into picking an option, like to decide when to sell/buy and what options to buy/sell we have to consider spot price/volatility, Greeks, time and IV etc along with appropriate strike. Based on this, I needed to calculate many things for options along with technical analysis of the spot to initiate a trade with high probability. Initially I used EXCEL to do all my calculations but it was very slow and as so many dimensions are to an option, I was not able to quickly update the sheets manually. So I decided to work on a web based app but could not complete. Recently I got some time and decided to complete the same.

I have built an app which can work on the historical EOD data for any stock (fetch automatically if not present already), its FnO derivatives and compute the Greeks, Implied volatility and the trend of volatility for every option (chain) and save in a database.

Right now I am regarding the IV and its trend for an option's lifetime and also the IV trend for x number of strike away from ATM to understand if it is trading at a premium or not and see if volatility will cool or not. These charts can help in analyzing the costliness of an option.
The reason for putting that importance on IV trend is because delta, gamma are dependent on the spot movement and position of spot wrt strike, theta is in one directional and rho does not even matter in such short periods of expiry. IV can really affect the premium which can be analysed in details.

As any type of chart and view can be built if we have the data, please share if you have any suggestions for manipulating the historical data and help me understand if there can be another view/chart that can visually assist to make decisions for initiating an options trade. I will implement the same in my study.

I am attaching some screenshots of my webapp. Currently it is hosted in my laptop, if it is useful, I can try to migrate online. Since the database is really huge, it will require some powerful servers.:dead:. Anyways right now I am storing the data for all FnO segment stocks (spot), all futures instruments, for options: BANKNIFTY, NIFTY, SBIN, INFY, RELIANCE, TCS, TATASTEEL, TATAMOTORS, MARUTI, PNB, FORTIS and DLF. However, it can be done for any FnO instrument.

View attachment 24913 View attachment 24914 View attachment 24915 View attachment 24916
Can you add the Option IV ranking like the way it is here
http://www.traderslounge.in/implied-volatility-rank-nse-fno-stocks/
 
#4
Yes I can. I may create a new dashboard page with the same this weekend but in a different way. I fail to see it being of a lot of help if being used on just spot IVs. Let me share my thoughts on IVP/IVR.

Quoting: https://tastytrade.com/tt/blog/implied-volatility-rank-and-percentile
IVR tells us whether implied volatility is high or low in a specific underlying based on the past year of implied volatility (aka “IV”) data.
Implied Volatility Percentile (IVP), a totally different calculation, provides traders with another metric by which they can analyze the price of an option. IVP tells us the percentage of days over the last year that implied volatility traded below the current level.
However, it’s important to be consistent in utilizing these metrics across a portfolio. For example, it wouldn’t make a lot of sense to sell an option based on a high IVR, while buying another one against it based on a low IVP.
I do not see myself making decisions of whether to initiate a trade in a stock just by looking these spot IV calculated numbers. It is again just a general opinion of the public on spot, does not necessarily means which direction the spot will move.

I think I will find it helpful if these numbers are shared for every strike of every CE/PE. That will help understand after my study is concluded ( study to decide if I want to initiate a trade in this instrument or not) if I want to be a seller or buyer of CE/PE in the direction of my concluded analysis of stock movement based on the costliness. Now this general opinion of the public (IV) is a real time difference making factor in terms of how much money I should put on the table or how much I could gain.

However, the graph I already created depicting the IVs over the past period is a detailed strike analysis of the IV trend and reflects the costliness. It helps at the time of actually initiating a trade. I understand right now you have to click actually to get the entire graph however that is why I have highlighted automatically the options where there may be a large variation of the actual price of option as compared to the theoretical price. That gives the place to look at to open the graph and look more into the IV trend.

I may still add IVR and IVP to each individual strike price for every CE and PE.

Please share your thoughts. I may be wrong.
 

pannet1

Well-Known Member
#5
Very good effort.

What is the server side script used?

Hi,

I am not a coder but I do know how to code in bits and pieces to make my quick & dirty application for any task that I am trying to automate. In 2016 I started reading about derivatives and wanted to trade options.

As options are non linear instruments I see that many things go into picking an option, like to decide when to sell/buy and what options to buy/sell we have to consider spot price/volatility, Greeks, time and IV etc along with appropriate strike. Based on this, I needed to calculate many things for options along with technical analysis of the spot to initiate a trade with high probability. Initially I used EXCEL to do all my calculations but it was very slow and as so many dimensions are to an option, I was not able to quickly update the sheets manually. So I decided to work on a web based app but could not complete. Recently I got some time and decided to complete the same.

I have built an app which can work on the historical EOD data for any stock (fetch automatically if not present already), its FnO derivatives and compute the Greeks, Implied volatility and the trend of volatility for every option (chain) and save in a database.

Right now I am regarding the IV and its trend for an option's lifetime and also the IV trend for x number of strike away from ATM to understand if it is trading at a premium or not and see if volatility will cool or not. These charts can help in analyzing the costliness of an option.
The reason for putting that importance on IV trend is because delta, gamma are dependent on the spot movement and position of spot wrt strike, theta is in one directional and rho does not even matter in such short periods of expiry. IV can really affect the premium which can be analysed in details.

As any type of chart and view can be built if we have the data, please share if you have any suggestions for manipulating the historical data and help me understand if there can be another view/chart that can visually assist to make decisions for initiating an options trade. I will implement the same in my study.

I am attaching some screenshots of my webapp. Currently it is hosted in my laptop, if it is useful, I can try to migrate online. Since the database is really huge, it will require some powerful servers.:dead:. Anyways right now I am storing the data for all FnO segment stocks (spot), all futures instruments, for options: BANKNIFTY, NIFTY, SBIN, INFY, RELIANCE, TCS, TATASTEEL, TATAMOTORS, MARUTI, PNB, FORTIS and DLF. However, it can be done for any FnO instrument.

View attachment 24913 View attachment 24914 View attachment 24915 View attachment 24916
 
#6
Very good effort.

What is the server side script used?
Thanks
The script is PHP as it is quite versatile.
However the database is huge and it requires a significant chunk of processing to calculate all the options greeks for different expiry dates.

I will move to a Dedicated server online soon to accommodate all the FNO segment stocks if it is something useful for the rest.

Please share additional insights.
 

pannet1

Well-Known Member
#7
Thanks
The script is PHP as it is quite versatile.
However the database is huge and it requires a significant chunk of processing to calculate all the options greeks for different expiry dates.

I will move to a Dedicated server online soon to accommodate all the FNO segment stocks if it is something useful for the rest.

Please share additional insights.
i have a linux vps account and i can provide the bandwidth and storage for you. please DM me, if you are interested.
 
#10
@Rusty_Banks do you have any plans to add live P&L curve of various options strategies?
Thanks @TraderGYO for your question. The answer is: Yes, I will implement that. That is something already in the pipeline. I have a detailed tool in my mind that will give good insights on the custom options strategy build along with the other aspects/values/parameters about the strategy that is not visible generally. I see that such detailed tools are not available online anywhere, especially for Indian options.

Its just that I am also doing a full time very demanding job and also pursuing studies. On top of that as I am interested in options so I am reading books on that too. So all the time I get is on weekends. It seems that in this month we will take the charts online.

To Build:
Max Pain Analyser,
PCR Analyser,
Detailed Strategy Builder and Insights,
IVP/IVR of every option at every strike (Low priority since my chart already shows the past trend of IV visually)
Volatility Cone (Again, low priority as the charts are doing it)
Delta Neutral Opportunities, Calendar Spreads and other Arbitrage Finder
Finally making all of this real time.

Please share thoughts.
 

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?