VIX-VXV-Ratio-Buschi
 English: 
This script shows the ratio between the VIX (implied volatility of SPX options over the next month) and the VXV (implied volatility of SPX options over the next three months).  Since in normal "Contango" mode, the VXV should be higher than the VIX, the crossing under 1.0 or maybe 0.95 after a volatility spike could be a sign for a calming market or at least a calming volatility.
 Deutsch:  
Dieses Skript zeigt das Verhältnis zwischen dem VIX (implizite Volatilität der SPX-Optionen über den nächsten Monat) und dem VXV (implizite Volatilität der SPX-Optionen über die nächsten drei Monate). Da im normalen "Contango"-Modus der VXV höher als der VIX liegen sollte, kann das Abfallen unter 1,0 oder 0,95 nach einer Volatilitätsspitze ein Anzeichen für einen ruhiger werdenden Markt oder zumindest eine ruhiger werdende Volatilität sein.
"implied"に関するスクリプトを検索
Kumo Implied VolatilityFrom ProRealCode www.prorealcode.com
"In my pursuit to quantify the Ichimoku indicator, I have tried to quantify implied volatility by measuring the Kumo thickness. Firstly, I took the absolute value of the distance between SpanA and SpanB, I then normalized the value and created standard deviation bands. Now I can compare the Kumo thickness with the average thickness over 200 periods. When the value goes above 100, it implies that the Kumo is thicker than 2 standard deviations of the average (there is therefore only a 5% chance that this happens). A reading over 100 might indicate trend exhaustion and a reading below 20 indicates low volatility and Kumo twists (I chose 20 only by observation and not statistical significance). Interestingly, this indicator sometime gives similar information to ADX. So far, the best use for this indicator is as a setup indicator for trend exhaustion or low volatility breakouts from Kumo twists. Extreme readings before Kumo breakouts looks interesting."
VIX Implied MovesKey Features: 
Three Timeframe Bands:
 
 Daily: Blue bands showing ±1σ expected move
 Weekly: Green bands showing ±1σ expected move
 30-Day: Red bands showing ±1σ expected move
 
 Calculation Methodology: 
 
 Uses VIX's annualized volatility converted to specific timeframes using square root of time rule
 Trading day convention (252 days/year)
 Band width = Price × (VIX/100) ÷ √(number of periods)
 
 Visual Features: 
 
 Colored semi-transparent backgrounds between bands
 Progressive line thickness (thinner for shorter timeframes)
 Real-time updates as VIX and ES prices change
 
 Example Calculation (VIX=20, ES=5000): 
 
 Daily move = 5000 × (20/100)/√252 ≈ ±63 points
 Weekly move = 5000 × (20/100)/√50 ≈ ±141 points
 Monthly move = 5000 × (20/100)/√21 ≈ ±218 points
 
This indicator helps visualize expected price ranges based on current volatility conditions, with wider bands indicating higher market uncertainty. The probabilistic ranges represent 68% confidence levels (1 standard deviation) derived from options pricing.
Wavetrend in Dynamic Zones with Kumo Implied VolatilityI was asked to do one of those, so here we go...
As always free and open source as it should be. Do not pay for such indicators! 
A WaveTrend Indicator or also widely known as "Market Cipher" is an Indicator that is based on Moving Averages, therefore its an "lagging indicator". Lagging indicators are best used in combination with leading indicators. In this script the "leading indicator" component are Daily, Weekly or Monthly Pivots . These Pivots can be used as dynamic Support and Resistance , Stoploss, Take Profit etc.
This indicator combination is best used in larger timeframes. For lower timeframes you might need to change settings to your liking.
The general Wavetrend settings are the same that are used in Market Cipher, Market Liberator and such popular indicators.
What are these circles?
-These are the WaveTrend Divergences. Red for Regular-Bearish. Orange for Hidden-Bearish. Green for Regular-Bullish. Aqua for Hidden-Bullish.
What are these white, orange and aqua triangles?
-These are the WaveTrend Pivots. A Pivot counter was added. Every time a pivot is lower than the previous one, an orange triangle is printed, every time a pivot is higher than the previous one an aqua triangle is printed. That mimics a very common way Wavetrend is being used for trading when using those other paid Wavetrend indicators.
What are these Orange and Aqua Zones?
-These are Dynamic Zones based on the indicator itself, they offer more information than static zones. Of course static lines are also included and can be adjusted.
What are the lines between the waves?
-This is a Kumo Cloud Implied Volatility indicator. It is color coded and can be used to indicate if a major market move/bottom/top happened.
What are those numbers on the right?
-The first number is a Bollinger Band indicator that shows if said Bollinger Band is in a state of Oversold/Overbought, the second number is the actual Bollinger Band Width that indicates if the Bollinger Band squeezes, normally that happens right before the market makes an explosive move.
Please keep in mind that this indicator is a tool and not a strategy, do not blindly trade signals, do your own research first! Use this indicator in conjunction with other indicators to get multiple confirmations.
VXN (NQ100 VIX) Implied Move Bands for NQ futures.A spin-off of my similar script for ES futures. This script uses the VXN Index instead of the VIX, which represents the 30-day implied volatility of Nasdaq-100 options and then uses that value to plot bands on the chart, helping traders identify price extremes as identified by the options market. Users can modify the moving average, bands multiplier, and number of lookback days used in the calculation to suit their trading style. 
OHLC Volatility Estimators by @Xel_arjonaDISCLAIMER:  
   The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets. 
   The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is by Creative-Commons as TradingView's regulations.   Any use, copy or re-use of this code should mention it's origin as it's authorship. 
 WARNING NOTICE! 
    THE INCLUDED FUNCTION MUST BE CONSIDERED AS DEBUGING CODE    The models included in the function have been taken from openly sources on the web so they could have some errors as in the calculation scheme and/or in it's programatic scheme.  Debugging are welcome.
 WHAT'S THIS?  
   Here's a full collection of candle based (compressed tick) Volatility Estimators given as a function, openly available for free, it can print IMPLIED VOLATILITY by an external symbol ticker like INDEX:VIX.
Models included in the volatility calculation function:
 
 CLOSE TO CLOSE:    This is the classic estimator by rule, sometimes referred as  HISTORICAL VOLATILITY  and is the must common, accepted and widely used out there.  Is based on traditional Standard Deviation method derived from the logarithm return of current close from yesterday's.
 ELASTIC WEIGHTED MOVING AVERAGE:    This estimator has been used by RiskMetriks®.  It's calculation is based on an ElasticWeightedMovingAverage Standard Deviation method derived from the logarithm return of current close from yesterday's.  It can be viewed or named as an  EXPONENTIAL HISTORICAL VOLATILITY  model.
 PARKINSON'S:    The Parkinson number, or High Low Range Volatility, developed by the physicist, Michael Parkinson, in 1980 aims to estimate the Volatility of returns for a random walk using the high and low in any particular period. IVolatility.com calculates daily Parkinson values. Prices are observed on a fixed time interval. n=10, 20, 30, 60, 90, 120, 150, 180 days.
 ROGERS-SATCHELL:    The Rogers-Satchell function is a volatility estimator that outperforms other estimators when the underlying follows a  Geometric Brownian Motion  (GBM) with a drift (historical data mean returns different from zero).   As a result, it provides a better volatility estimation when the underlying is trending.   However, this Rogers-Satchell estimator does not account for jumps in price (Gaps). It assumes no opening jump.   The function uses the open, close, high, and low price series in its calculation and it has only one parameter, which is the period to use to estimate the volatility.
 YANG-ZHANG:    Yang and Zhang were the first to derive an historical volatility estimator that has a minimum estimation error, is independent of the drift, and independent of opening gaps. This estimator is maximally 14 times more efficient than the close-to-close estimator.
 LOGARITHMIC GARMAN-KLASS:    The former is a pinescript transcript of the model defined as in  iVolatility . The metric used is a combination of the overnight, high/low and open/close range. Such a volatility metric is a more efficient measure of the degree of volatility during a given day. This metric is always positive.
 
My scriptImplied Volatility vs Historical Volatility
**Uncheck Plot box**
 
 IV > HV  =  Overvalued
 IV = HV =  Fair Value
 IV > HV =   Undervalued
 
 
 1.	Pair with IV Rank: Use IV vs HV to confirm the setup, but IV Rank (50+, 70+) tells you how “high” IV is relative to its own history.
 2.	Timeframe: Use daily charts — IV is not meaningful on intraday timeframes.
 3.	Avoid noise: Use a smoothed HV (e.g., 20-day) and don’t chase small crossovers — look for clear divergence.
Implied TargetThis script attempts to estimate the targets that the current price may reach based on an exponentially weighted volatility model. 
Overall, with the assumption of normal distribution of log return, which might not always hold true, it calculates the estimated range within which the current candles will close. One, two, and three sigma will give the probability of around 68%, 95% and 99% respectively.
This can be used to give you a better sense of what is possible with the current level of volatility , thus assist in risk management and position sizing. 
Like with any indicators, it is recommended that you use this script as a confirmation to your strategy, and not take the estimated range blindly to carry out, for instance, mean-reversion trade. Again, it is merely an estimation with volatility at its core. 
May you be on the right side of the trade.
My setup [Pro] (fadi)My Setup   is a powerful TradingView indicator that visualizes your trading strategy, helping you find high-probability setups with precision and discipline. It combines Higher Timeframe (HTF) context with Lower Timeframe (LTF) entries on a single chart, streamlining your trading process.
 What It Does 
 
  Tracks your chosen timeframe and its paired higher timeframe for custom trade setups, so you don’t have to stay glued to the screen.
  Plots clear Entry, Stop Loss, and Take Profit levels when your conditions align.
  Customizes to your strategy with HTF triggers (e.g., sweeps, liquidity grabs) and LTF entries (e.g., Order Blocks, FVGs, Breakers).
  Ensures discipline by only showing setups that meet all your rules, eliminating emotional trading and FOMO.
  Backtest your edge by visualizing past setups to refine entries, stops, and confluences.
 
 How It Works 
 
  Set Your HTF Trigger: Choose a market event like a sweep of a high/low, pivot point, or liquidity grab on the paired higher timeframe (e.g., 1H for a 5m chart).
  
  Define Your LTF Entry: Select your entry model from a range of institutional concepts, such as Order Block, Fair Value Gap (FVG), Inverted FVG (iFVG), Breaker Block, Unicorn Model, and more, on the chart’s timeframe.
  
  Add Confluence Filters: Stack conditions like requiring an FVG + Breaker for higher-probability setups.
  
  See It on Your Chart: When a setup forms, it’s instantly plotted with Entry, Stop Loss, and Take Profit levels based on your Risk-to-Reward ratio.
 
  
 Key Features 
 
  Multi-Timeframe Sync: Pair your chart’s timeframe (e.g., 5m) with a higher timeframe (e.g., 1H) for seamless analysis.
  Institutional Tools: Supports a comprehensive suite of ICT concepts, including Order Blocks, FVGs, iFVGs, Breakers, Unicorn Model, and additional entry models.
  Custom Risk Management: Set your Stop Loss and Take Profit levels with fixed R:R or measured moves using large range of entry and stop levels.
  Session Filtering: Limit setups to specific trading sessions (e.g., London, New York) with timezone support.
  Visual Clarity: Displays HTF candles and key levels on your chart for context, with customizable colors and styles.
  Alerts: Get notified the moment a valid setup appears, even on live candles.
 
 Who It’s For 
 
  Traders who want to systematize their ICT-based strategy on a single chart.
  Those seeking to trade with discipline and avoid impulsive decisions.
  Anyone looking to backtest and optimize their setups with clear, visual feedback.
  Busy traders who need a tool to track their chart while they focus on life.
 
Why Choose My Setup  ?
 
  Save Time: Let the indicator track your chart and its paired timeframe.
  Trade Confidently: Only take A+ setups that match your exact rules.
  Learn and Improve: Analyze historical setups to refine your strategy.
 
 Disclaimer of Warranties and Limitation of Liability for  [My Setup  ] 
Please read this disclaimer carefully before using the  [My Setup  ] indicator (hereafter referred to as "the Software").
 1. No Financial Advice 
The Software is provided for educational and informational purposes only. The data, calculations, and signals generated by the Software are not, and should not be interpreted as, financial advice, investment advice, trading advice, or a recommendation or solicitation to buy, sell, or hold any security or financial instrument.
 2. Assumption of Risk You acknowledge that trading and investing are inherently risky  activities that carry a high potential for significant financial loss. All actions you take in the market, including but not limited to trade execution and risk management, are your sole responsibility. You agree to use the Software at your own sole risk. The creator shall not be held responsible or liable for any financial losses or damages you may incur as a result of using the Software.
 3. No Warranty; "AS IS" Provision 
The Software is provided "AS IS" and "AS AVAILABLE", without any warranties of any kind, either express or implied. The creator disclaims all warranties, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, accuracy, timeliness, completeness, and non-infringement.
The creator does not warrant that the Software will be error-free, uninterrupted, secure, or free of bugs, viruses, or other harmful components. You acknowledge that software is never wholly free from defects, and you are responsible for implementing your own procedures for data accuracy and security.
 4. Limitation of Liability 
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL THE CREATOR, FADI ZEIDAN, BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This limitation of liability applies to any and all damages, including but not limited to:
Direct, indirect, incidental, special, consequential, or exemplary damages.
Loss of profits, revenue, data, or use.
Financial losses resulting from trading decisions made based on the Software.
Damages arising from software defects, interruptions, or inaccuracies.
 5. Indemnification 
You agree to indemnify, defend, and hold harmless the creator, Fadi Zeidan, from and against any and all claims, liabilities, damages, losses, or expenses, including reasonable attorneys' fees and costs, arising out of or in any way connected with your access to or use of the Software.
 6. Acknowledgment and Agreement 
By accessing, installing, or using the  [My Setup  ] indicator, you acknowledge that you have read, understood, and agree to be bound by the terms of this disclaimer. If you do not agree with these terms, you must not use the Software.
Prometheus Black-Scholes Option PricesThe Black-Scholes Model is an option pricing model developed my Fischer Black and Myron Scholes in 1973 at MIT. This is regarded as the most accurate pricing model and is still used today all over the world. This script is a simulated Black-Scholes model pricing model, I will get into why I say simulated.
 What is an option? 
An option is the right, but not the obligation, to buy or sell 100 shares of a certain stock, for calls or puts respective, at a certain price, on a certain date (assuming European style options, American options can be exercised early). The reason these agreements, these  contracts  exist is to provide traders with leverage. Buying 1 contract to represent 100 shares of the underlying, more often than not, at a cheaper price. That is why the price of the option, the  premium , is a small number. If an option costs $1.00 we pay $100.00 for it because 100 shares * 1 dollar per share = 100 dollars for all the shares. When a trader purchases a call on stock XYZ with a strike of $105 while XYZ stock is trading at $100, if XYZ stock moves up to $110 dollars before expiration the option has $5 of intrinsic value. You have the right to buy something at $105 when it is trading at $110. That agreement is way more valuable now, as a result the options premium would increase. That is a quick overview about how options are traded, let's get into calculating them.
 Inputs for the Black-Scholes model 
To calculate the price of an option we need to know 5 things:
Current Price of the asset
Strike Price of the option
Time Till Expiration
Risk-Free Interest rate
Volatility
The price of a European call option 𝐶 is given by:
𝐶 = 𝑆0 * Φ(𝑑1) − 𝐾 * 𝑒^(−𝑟 * 𝑇) * Φ(𝑑2)
where:
𝑆0 is the current price of the underlying asset.
𝐾 is the strike price of the option.
𝑟 is the risk-free interest rate.
𝑇 is the time to expiration.
Φ is the cumulative distribution function of the standard normal distribution.
𝑑1 and 𝑑2 are calculated as:
𝑑1 = (ln(𝑆0 / 𝐾) + (𝑟 + (𝜎^2 / 2)) * 𝑇) / (𝜎 * sqrt(𝑇)) 
𝑑2= 𝑑1 - (𝜎 * sqrt(𝑇)) 
𝜎 is the volatility of the underlying asset.
The price of a European put option 𝑃 is given by:
𝑃 = 𝐾 * 𝑒^(−𝑟 * 𝑇) * Φ(−𝑑2) − 𝑆0 * Φ(−𝑑1)
where 𝑑1 and 𝑑2 are as defined above.
Key Assumptions of the Black-Scholes Model
The price of the underlying asset follows a lognormal distribution.
There are no transaction costs or taxes.
The risk-free interest rate and volatility of the underlying asset are constant.
The underlying asset does not pay dividends during the life of the option.
The markets are efficient, meaning that all known information is already reflected in the prices.
Options can only be exercised at expiration (European-style options).
 Understanding the Script 
  
Here I have arrows pointing to specific spots on the table. They point to  Historical Volatility  and  Inputted DTE .  Inputted DTE  is a value the user may input to calculate premium for options that expire in that many days.  Historical Volatility , is the value calculated by this code. 
 length = 252 // One year of trading days
hv = ta.stdev(math.log(close / close ), length) * math.sqrt(365) 
And then made daily like the Black-Scholes model needs from this step in the code.
 hv_daily = request.security(syminfo.tickerid, "1D", hv) 
The user has the option to input their own volatility to the Script. I will get into why that may be advantageous in a moment. If the user chooses to do so the Script will change which value it is using as so.
 hv_in_use = which_sig == false ? hv_daily : sig 
  
There is a lot going on in this image but bare with me, it will all make sense by the end. The column to the far left of both the green and maroon colored columns represent the strike price of the contract, if the numbers are white that means the contract is out of the money, gray means in the money. If you remember from the calculation this represents the price to buy or sell shares at, for calls or puts respective. The column second from the left shows a value for  Simulated Market Price . This is a necessary part of this script so we can show changes in implied volatility. See, when we go to our brokerages and look at options prices, sure the price was calculated by a pricing model, but that is rarely the true price of the model. Market participant sentiment affects this value as their estimates for future volatility,  Implied Volatility  changes. 
For example, if a call option is supposed to be worth $1.00 from the pricing model, however everyone is bullish on the stock and wants to buy calls, the premium may go to $1.20 from $1.00 because participants juice up the  Implied Volatility . Higher  Implied Volatility  generally means higher premium, given enough time to expiration. Buying an option at $0.80 when it should be worth $1.00 due to changes in sentiment is a big part of the Quant Trading industry.
Of course I don't have access to an actual exchange so get prices, so I modeled participant decisions by adding or subtracting a small random value on the "perfect premium" from the Black-Scholes model, and solving for implied volatility using the Newton-Raphson method.
It is like when we have  speed = distance / time  if we know  speed  and  time , we can solve for  distance . 
This is what models the changing  Implied Volatility  in the table. The other column in the table, 3rd from the left, is the Black-Scholes model price without the changes of a random number. Finally, the 4th column from the left is that  Implied Volatility  value we calculated with the modified option price. 
 More on Implied Volatility 
 Implied Volatility  represents the future expected volatility of an asset. As it is the value in the future it is not know like Historical Volatility, only projected. We provide the user with the option to enter their own  Implied Volatility  to start with for better modeling of options close to expiration. If you want to model options 1 day from expiration you will probably have to enter a higher  Implied Volatility  so that way the prices will be higher. Since the underlying is so close to expiration they are traded so much and traders manipulate their  Implied Volatility , increasing their value. Be safe while trading these!
Thank you all for clicking on my indicator and reading this description! Happy coding, Happy trading, Be safe!
Good reference: www.investopedia.com
BSM OPM 1973 w/ Continuous Dividend Yield [Loxx]Generalized Black-Scholes-Merton w/ Analytical Greeks is an adaptation of the Black-Scholes-Merton Option Pricing Model including Analytical Greeks and implied volatility calculations. The following information is an excerpt from Espen Gaarder Haug's book "Option Pricing Formulas". The options sensitivities (Greeks) are the partial derivatives of the Black-Scholes-Merton ( BSM ) formula. Analytical Greeks for our purposes here are broken down into various categories:
 Delta Greeks: Delta, DDeltaDvol, Elasticity 
 
 Gamma Greeks: Gamma, GammaP, DGammaDSpot/speed, DGammaDvol/Zomma
 Vega Greeks: Vega , DVegaDvol/Vomma, VegaP
 Theta Greeks: Theta
 Rate/Carry Greeks: Rho, Rho futures option, Carry Rho, Phi/Rho2
 Probability Greeks: StrikeDelta, Risk Neutral Density
 
(See the code for more details)
 Black-Scholes-Merton Option Pricing 
The Black-Scholes-Merton model can be "generalized" by incorporating a cost-of-carry rate b. This model can be used to price European options on stocks, stocks paying a continuous dividend yield, options on futures, and currency options:
 c = S * e^((b - r) * T) * N(d1) - X * e^(-r * T) * N(d2) 
 p = X * e^(-r * T) * N(-d2) - S * e^((b - r) * T) * N(-d1) 
where
 d1 = (log(S / X) + (b + v^2 / 2) * T) / (v * T^0.5) 
 d2 = d1 - v * T^0.5 
b = r ... gives the Black and Scholes (1973) stock option model.
b = r — q ... gives the Merton (1973) stock option model with continuous dividend yield q.   <== this is the one used for this indicator! 
b = 0 ... gives the Black (1976) futures option model.
b = 0 and r = 0 ... gives the Asay (1982) margined futures option model.
b = r — rf ... gives the Garman and Kohlhagen (1983) currency option model.
 Inputs 
S = Stock price.
X = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
d = dividend yield 
v = Volatility of the underlying asset price
cnd (x) = The cumulative normal distribution function
nd(x) = The standard normal density function
convertingToCCRate(r, cmp ) = Rate compounder
gImpliedVolatilityNR(string CallPutFlag, float S, float x, float T, float r, float b, float cm , float epsilon) = Implied volatility via Newton Raphson
gBlackScholesImpVolBisection(string CallPutFlag, float S, float x, float T, float r, float b, float cm ) = implied volatility via bisection
 Implied Volatility: The Bisection Method 
The Newton-Raphson method requires knowledge of the partial derivative of the option pricing formula with respect to volatility ( vega ) when searching for the implied volatility . For some options (exotic and American options in particular), vega is not known analytically. The bisection method is an even simpler method to estimate implied volatility when vega is unknown. The bisection method requires two initial volatility estimates (seed values):
1. A "low" estimate of the implied volatility , al, corresponding to an option value, CL
2. A "high" volatility estimate, aH, corresponding to an option value, CH
The option market price, Cm , lies between CL and cH . The bisection estimate is given as the linear interpolation between the two estimates:
 v(i + 1) = v(L) + (c(m) - c(L)) * (v(H) - v(L)) / (c(H) - c(L)) 
Replace v(L) with v(i + 1) if c(v(i + 1)) < c(m), or else replace v(H) with v(i + 1) if c(v(i + 1)) > c(m) until |c(m) - c(v(i + 1))| <= E, at which point v(i + 1) is the implied volatility and E is the desired degree of accuracy.
 Implied Volatility: Newton-Raphson Method 
The Newton-Raphson method is an efficient way to find the implied volatility of an option contract. It is nothing more than a simple iteration technique for solving one-dimensional nonlinear equations (any introductory textbook in calculus will offer an intuitive explanation). The method seldom uses more than two to three iterations before it converges to the implied volatility . Let
 v(i + 1) = v(i) + (c(v(i)) - c(m)) / (dc / dv (i)) 
until |c(m) - c(v(i + 1))| <= E at which point v(i + 1) is the implied volatility , E is the desired degree of accuracy, c(m) is the market price of the option, and dc/ dv (i) is the vega of the option evaluaated at v(i) (the sensitivity of the option value for a small change in volatility ).
 Things to know 
 
 Only works on the daily timeframe and for the current source price.
 You can adjust the text size to fit the screen
Generalized Black-Scholes-Merton w/ Analytical Greeks [Loxx]Generalized Black-Scholes-Merton w/ Analytical Greeks   is an adaptation of the Black-Scholes-Merton Option Pricing Model including Analytical Greeks  and implied volatility calculations. The following information is an excerpt from Espen Gaarder Haug's book "Option Pricing Formulas". The options sensitivities (Greeks) are the partial derivatives of the Black-Scholes-Merton (BSM) formula. Analytical Greeks for our purposes here are broken down into various categories:
 
 Delta Greeks: Delta, DDeltaDvol, Elasticity
 Gamma Greeks: Gamma, GammaP, DGammaDSpot/speed, DGammaDvol/Zomma
 Vega Greeks: Vega,  DVegaDvol/Vomma, VegaP
 Theta Greeks: Theta
 Rate/Carry Greeks: Rho, Rho futures option, Carry Rho, Phi/Rho2
 Probability Greeks: StrikeDelta, Risk Neutral Density
 
(See the code for more details)
 Black-Scholes-Merton Option Pricing 
The BSM formula and its binomial counterpart may easily be the most used "probability model/tool" in everyday use — even if we con- sider all other scientific disciplines. Literally tens of thousands of people, including traders, market makers, and salespeople, use option formulas several times a day. Hardly any other area has seen such dramatic growth as the options and derivatives businesses. In this chapter we look at the various versions of the basic option formula. In 1997 Myron Scholes and Robert Merton were awarded the Nobel Prize (The Bank of Sweden Prize in Economic Sciences in Memory of Alfred Nobel). Unfortunately, Fischer Black died of cancer in 1995 before he also would have received the prize.
It is worth mentioning that it was not the option formula itself that Myron Scholes and Robert Merton were awarded the Nobel Prize for, the formula was actually already invented, but rather for the way they derived it — the replicating portfolio argument, continuous- time dynamic delta hedging, as well as making the formula consistent with the capital asset pricing model (CAPM). The continuous dynamic replication argument is unfortunately far from robust. The popularity among traders for using option formulas heavily relies on hedging options with options and on the top of this dynamic delta hedging, see Higgins (1902), Nelson (1904), Mello and Neuhaus (1998), Derman and Taleb (2005), as well as Haug (2006) for more details on this topic. In any case, this book is about option formulas and not so much about how to derive them.
Provided here are the various versions of the Black-Scholes-Merton formula presented in the literature. All formulas in this section are originally derived based on the underlying asset S follows a geometric Brownian motion
 dS = mu * S * dt + v * S * dz 
where t is the expected instantaneous rate of return on the underlying asset, a is the instantaneous volatility of the rate of return, and dz is a Wiener process.
The formula derived by Black and Scholes (1973) can be used to value a European option on a stock that does not pay dividends before the option's expiration date. Letting c and p denote the price of European call and put options, respectively, the formula states that
 c = S * N(d1) - X * e^(-r * T) * N(d2) 
 p = X * e^(-r * T) * N(d2) - S * N(d1) 
where
 d1 = (log(S / X) + (r + v^2 / 2) * T) / (v * T^0.5) 
 d2 = (log(S / X) + (r - v^2 / 2) * T) / (v * T^0.5) = d1 - v * T^0.5 
 Inputs 
S = Stock price.
X = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
b = Cost of carry
v = Volatility of the underlying asset price
cnd (x) = The cumulative normal distribution function
nd(x) = The standard normal density function
convertingToCCRate(r, cmp ) = Rate compounder
gImpliedVolatilityNR(string CallPutFlag, float S, float x, float T, float r, float b, float cm , float epsilon) = Implied volatility via Newton Raphson
gBlackScholesImpVolBisection(string CallPutFlag, float S, float x, float T, float r, float b, float cm ) = implied volatility via bisection
 Implied Volatility: The Bisection Method 
The Newton-Raphson method requires knowledge of the partial derivative of the option pricing formula with respect to volatility ( vega ) when searching for the implied volatility . For some options (exotic and American options in particular), vega is not known analytically. The bisection method is an even simpler method to estimate implied volatility when vega is unknown. The bisection method requires two initial volatility estimates (seed values):
1. A "low" estimate of the implied volatility , al, corresponding to an option value, CL
2. A "high" volatility estimate, aH, corresponding to an option value, CH
The option market price, Cm , lies between CL and cH . The bisection estimate is given as the linear interpolation between the two estimates:
 v(i + 1) = v(L) + (c(m) - c(L)) * (v(H) - v(L)) / (c(H) - c(L)) 
Replace v(L) with v(i + 1) if c(v(i + 1)) < c(m), or else replace v(H) with v(i + 1) if c(v(i + 1)) > c(m) until |c(m) - c(v(i + 1))| <= E, at which point v(i + 1) is the implied volatility and E is the desired degree of accuracy.
 Implied Volatility: Newton-Raphson Method 
The Newton-Raphson method is an efficient way to find the implied volatility of an option contract. It is nothing more than a simple iteration technique for solving one-dimensional nonlinear equations (any introductory textbook in calculus will offer an intuitive explanation). The method seldom uses more than two to three iterations before it converges to the implied volatility . Let
 v(i + 1) = v(i) + (c(v(i)) - c(m)) / (dc / dv (i)) 
until |c(m) - c(v(i + 1))| <= E at which point v(i + 1) is the implied volatility , E is the desired degree of accuracy, c(m) is the market price of the option, and dc/ dv (i) is the vega of the option evaluaated at v(i) (the sensitivity of the option value for a small change in volatility ).
 Things to know 
 
 Only works on the daily timeframe and for the current source price.
 You can adjust the text size to fit the screen
IV Rank and Percentile"All stocks in the market have unique personalities in terms of implied volatility (their option prices). For example, one stock might have an implied volatility of 30%, while another has an implied volatility of 50%. Even more, the 30% IV stock might usually trade with 20% IV, in which case 30% is high. On the other hand, the 50% IV stock might usually trade with 75% IV, in which case 50% is low.
So, how do we determine whether a stock's option prices (IV) are relatively high or low?
The solution is to compare each stock's IV against its historical IV levels. We can accomplish this by converting a stock's current IV into a rank or percentile.
Implied Volatility Rank (IV Rank) Explained
Implied volatility rank (IV rank) compares a stock's current IV to its IV range over a certain time period (typically one year).
Here's the formula for one-year IV rank:
(Current IV - 1 Year Low IV) / (1 Year High IV - 1 Year Low IV) * 100
For example, the IV rank for a 20% IV stock with a one-year IV range between 15% and 35% would be:
(20% - 15%) / (35% - 15%) = 25%
An IV rank of 25% means that the difference between the current IV and the low IV is only 25% of the entire IV range over the past year, which means the current IV is closer to the low end of historical levels of implied volatility.
Furthermore, an IV rank of 0% indicates that the current IV is the very bottom of the one-year range, and an IV rank of 100% indicates that the current IV is at the top of the one-year range.
Implied Volatility Percentile (IV Percentile) Explained
Implied volatility percentile (IV percentile) tells you the percentage of days in the past that a stock's IV was lower than its current IV.
Here's the formula for calculating a one-year IV percentile:
Number of trading days below current IV / 252 * 100
As an example, let's say a stock's current IV is 35%, and in 180 of the past 252 days, the stock's IV has been below 35%. In this case, the stock's 35% implied volatility represents an IV percentile equal to:
180/252 * 100 = 71.42%
An IV percentile of 71.42% tells us that the stock's IV has been below 35% approximately 71% of the time over the past year.
Applications of IV Rank and IV Percentile
Why does it help to know whether a stock's current implied volatility is relatively high or low? Well, many traders use IV rank or IV percentile as a way to determine appropriate strategies for that stock.
For example, if a stock's IV rank is 90%, then a trader might look to implement strategies that profit from a decrease in the stock's implied volatility, as the IV rank of 90% indicates that the stock's current IV is at the top of its range over the past year (for a one-year IV rank).
On the other hand, if a stock's IV rank is 0%, then traders might look to implement strategies that profit from an increase in implied volatility, as the IV rank of 0% indicates the stock's current implied volatility is at the bottom of its range over the past year."
This script approximates IV by using the VIX products, which calculate the 30-day implied volatility of the specified security.
*Includes an option for repainting -- default value is true, meaning the script will repaint the current bar.
False = Not Repainting = Value for the current bar is not repainted, but all past values are offset by 1 bar.
True = Repainting = Value for the current bar is repainted, but all past values are correct and not offset by 1 bar.
In both cases, all of the historical values are correct, it is just a matter of whether you prefer the current bar to be realistically painted and the historical bars offset by 1, or the current bar to be repainted and the historical data to match their respective price bars.
As explained by TradingView,`f_security()` is for coders who want to offer their users a repainting/no-repainting version of the HTF data.
Z-Score Normalized Volatility IndicesVolatility is one of the most important measures in financial markets, reflecting the extent of variation in asset prices over time. It is commonly viewed as a risk indicator, with higher volatility signifying greater uncertainty and potential for price swings, which can affect investment decisions. Understanding volatility and its dynamics is crucial for risk management and forecasting in both traditional and alternative asset classes.
Z-Score Normalization in Volatility Analysis
The Z-score is a statistical tool that quantifies how many standard deviations a given data point is from the mean of the dataset. It is calculated as:
Z = \frac{X - \mu}{\sigma}
Where X is the value of the data point, \mu is the mean of the dataset, and \sigma is the standard deviation of the dataset. In the context of volatility indices, the Z-score allows for the normalization of these values, enabling their comparison regardless of the original scale. This is particularly useful when analyzing volatility across multiple assets or asset classes.
This script utilizes the Z-score to normalize various volatility indices:
	
1.	VIX (CBOE Volatility Index): A widely used indicator that measures the implied volatility of S&P 500 options. It is considered a barometer of market fear and uncertainty (Whaley, 2000).
	
2.	VIX3M: Represents the 3-month implied volatility of the S&P 500 options, providing insight into medium-term volatility expectations.
	
3.	VIX9D: The implied volatility for a 9-day S&P 500 options contract, which reflects short-term volatility expectations.
	
4.	VVIX: The volatility of the VIX itself, which measures the uncertainty in the expectations of future volatility.
	
5.	VXN: The Nasdaq-100 volatility index, representing implied volatility in the Nasdaq-100 options.
	
6.	RVX: The Russell 2000 volatility index, tracking the implied volatility of options on the Russell 2000 Index.
	
7.	VXD: Volatility for the Dow Jones Industrial Average.
	
8.	MOVE: The implied volatility index for U.S. Treasury bonds, offering insight into expectations for interest rate volatility.
	
9.	BVIX: Volatility of Bitcoin options, a useful indicator for understanding the risk in the cryptocurrency market.
	
10.	GVZ: Volatility index for gold futures, reflecting the risk perception of gold prices.
	
11.	OVX: Measures implied volatility for crude oil futures.
Volatility Clustering and Z-Score
The concept of volatility clustering—where high volatility tends to be followed by more high volatility—is well documented in financial literature. This phenomenon is fundamental in volatility modeling and highlights the persistence of periods of heightened market uncertainty (Bollerslev, 1986).
Moreover, studies by Andersen et al. (2012) explore how implied volatility indices, like the VIX, serve as predictors for future realized volatility, underlining the relationship between expected volatility and actual market behavior. The Z-score normalization process helps in making volatility data comparable across different asset classes, enabling more effective decision-making in volatility-based strategies.
Applications in Trading and Risk Management
By using Z-score normalization, traders can more easily assess deviations from the mean in volatility, helping to identify periods when volatility is unusually high or low. This can be used to adjust risk exposure or to implement volatility-based trading strategies, such as mean reversion strategies. Research suggests that volatility mean-reversion is a reliable pattern that can be exploited for profit (Christensen & Prabhala, 1998).
References:
	
•	Andersen, T. G., Bollerslev, T., Diebold, F. X., & Vega, C. (2012). Realized volatility and correlation dynamics: A long-run approach. Journal of Financial Economics, 104(3), 385-406.
	
•	Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307-327.
	
•	Christensen, B. J., & Prabhala, N. R. (1998). The relation between implied and realized volatility. Journal of Financial Economics, 50(2), 125-150.
	
•	Whaley, R. E. (2000). Derivatives on market volatility and the VIX index. Journal of Derivatives, 8(1), 71-84.
Adaptive Sharp Momentum█  Introduction 
The Adaptive Sharp Momentum Study has the following all-in-one features:
 • A noise-free, trend-following indicator. 
 • Automatically detects implied tops and bottoms within fast price cycles.
 • It identifies price consolidations and periods of indecision; often challenging to spot.
 • Includes a unique feature for detecting directional price squeezes.
 • An integrated volatility measure helps avoid false signals and clarifies trend direction.
 • Lastly, it alerts traders when a volume climax is likely reached during a move.
This study primarily focuses on capturing momentum while concurrently alerting traders to shifting market dynamics, thereby aiding in the decision to either extend a position’s duration or optimize exit timing. The set of analytical tools, deployed alongside the trend-following indicator, are integrated to reflect the concepts outlined above. Furthermore, this framework utilizes distinctive methods for trend identification, consolidation recognition, directional squeeze assessment, and volume climax analysis—approaches that are not currently documented in publicly available resources.
█  Explanation of Core Components 
 1. Trend Following  Consolidated  Adaptive Moving Average: 
At the core of the study is the Jurik Adaptive Average Curve, a fast-response adaptive moving average refined with an adaptive Relative Strength Index (RSX) function, known as Jurik RSX. This curve displays three trend modes—bullish, bearish, and indecisive—each customizable in color. 
Users can adjust parameters such as the Phase and Consolidation Period:
 • Phase: Influences the timing of trend signals, accommodating various trading styles. A lower phase value can produce leading signals, while a higher value may result in lagging signals.
 • Consolidation Period: Helps filter out false signals. Optimize this period based on the time frame and instrument.
 • Momentum Slope Threshold: As mentioned earlier, the Jurik moving average values are consolidated against the Dynamic Jurik RSX. Crossing the slope threshold of the Jurik RSX will trigger consolidation.
 The main curve in the middle represents the overall trend. The issue with moving averages is that they work well in trends but when market is in consolidation, many false signals can be generated. The consolidation period acts as a second fast signal curve that helps eliminate the false signals generated through the standard adaptive moving average. This is basically done by measuring the momentum of the move itself through the Jurik RSX. There are other tools in this study that should also help the trader avoid false signals which will be fully described below.  
 2. Implied Tops and Bottoms
The study also detects Implied Tops and Bottoms during market cycles using the Composite Momentum and Projections. It offers three detection modes:
 • Strong Signals: Indicate significant potential reversal points.
 • Medium Signals: Typically displayed near the end of a trend, suggesting traders should prepare to exit.
 • Rolling Signals: Alert traders to set tight stop losses to secure profits, as the market may be approaching a turning point.
 By default, the colors of Rolling Signals and Medium Signals are the same for simplicity. 
Note the following:
 • The fast and slow period have the most effect on implied tops and bottoms detection.
 • Adjusting the main period will also have an overall effect.
 The above chart shows rolling tops, rolling bottoms, strong tops, and strong bottoms. A rolling top of bottom indicate an increase in momentum in that direction and thus a tight stoploss would be recommended, while a strong top/bottom indicates that an exit is warranted. 
 3. Consolidation and Volatility
If enabled, '+' will appear above the ceiling and floor plots if consolidation is detected. Consolidation is detected by using lookback function that determine if price is below a threshold or not. If below, then consolidation would be confirmed. This is accomplished by adjusting the ' Price Consolidation Threshold ' period
 The above chart demonstrates detection of consolidation on a 1-minute chart. Also, note the ceiling and floor plot, it expands when volatility is high. 
Consolidation detection helps weed out long and short signals indicated by the main curve. 
 4. Directional Squeeze
Another unique feature of this indicator is the detection of directional price squeeze. Directional squeeze is defined as a price push in the direction indicated by momentum whether upward or downward. This is different from the common squeeze indicators found on the web since this one is detecting a directional push. 
The Directional Squeeze feature, indicated by up and down triangles above the main curve, highlights strong trends in the market's current direction:
 • Trend Continuation: Allows traders to stay in profitable trades longer during strong trending markets.
 • Multiple Modes: Offers single-bar (short-term) and longer-term squeezes. Single-bar squeezes can signal potential market reversals, while longer-term squeezes are useful in sustained trends.
 Be mindful that under certain conditions, the directional squeeze could be directionless(sideways) if consolidation is outlined by the indicator. This is another useful feature the trader could utilize. The chart above mostly demonstrates directional squeeze but directionless can also be observed. 
 5. Volume Volatility and Volume Climax Detection
An essential feature of the Adaptive Sharp Momentum Study is its ability to measure Volume Volatility and detect Volume Climax moments:
 • Volume Volatility Measure: Integrated into the study to help avoid false signals by assessing the strength of market moves. It provides better clarity on trend direction by indicating when the market is experiencing significant volume changes.
 • Volume Climax Alerts: The study alerts traders when a volume climax is likely reached during a move, which is helpful for identifying potential reversal points or the culmination of a trend. Brighter confirmation signal dots indicate these climaxes, helping traders make timely entry/exit decisions.
 • Adjustable Parameters: Traders can set the Volume Volatility Threshold and adjust the Volume Lookback Period to tailor the sensitivity of volume climax detection according to their trading strategy.
 5. The indicator contains other useful features:
 • Cycles: Helps determine when to enter long or short trades based on upward or downward market cycles. It also aids in recognizing retracement levels during a trend, allowing traders to capitalize on brief counter-trend movements. Those cycles can be observed as the up and down gray lines on the chart.
 • Real-Time Table: The table is another visual aid that summarizes the status of each feature in real-time. 
█  How to Use this Study Effectively 
The main curve in the middle is your final decision point. Prior to entering a trade look for the following:
 • Is the market in consolidation? If yes, then you'd be advised not to enter the trade until the study clearly shows no consolidation
 • Is the ceil or floor plots showing a strong top or bottom, or even a volume climax in the direction to intend to enter? If yes, then either ensure you enter at a tight stop or don't enter
 • Is there an indication of a directional squeeze with no consolidation or volume climax? Then this would be an ideal place to enter. Be mindful though that entering directional squeeze too late is not recommended.
 • Once you are in the trade, look at consolidation, implied tops and bottoms, and volume climax to determine exit point. You will quickly realize if you entered a trade prematurely.
 • Utilize the directional squeeze and the prevalent trend to help you stay in the trade longer.
 • Adjust your stop losses depending on whether you are seeing a rolling implied top/bottom or a strong top/bottom. 
 • Also, at volume climaxes, be ready to exit. The approach with volume climax detection should be the same as the implied tops/bottoms.
Below is a chart demonstrating trading on a 1-minute chart. The study could be used for any time frame:
 ** Important Note ** 
This study relies on volume readings. Incorrect evaluation will be concluded without proper volume data. 
█  How the Adaptive Sharp Momentum Works? 
 ---Main Curve - Jurik Moving Average and RSX--- 
The Jurik Moving Average (JMA) and the Jurik RSX with Fisher transform (Relative Strength Index Extended) are technical tools designed to enhance data processing efficiency. The JMA uses an adaptive smoothing algorithm to dynamically adjust to market conditions, reducing lag while maintaining high responsiveness to price changes. the JMA incorporates a mechanism that determines smoothness based on input volatility. The RSX, on the other hand, tracks relative strength without introducing the overshoots and noise commonly seen in other momentum indicators. It achieves this by applying a yet another JMA smoothing function that ensures stability and consistency, making it a better candidate for identifying shifts. 
 This is a unique approach, but can simply be equated to two moving averages crossing over, except in this case, the RSX is crossing over with the JMA. 
The process of determining market trends and consolidation for the main curve revolves around evaluating multiple conditions and rankings of indicators such as Jurik RSX, Fisher Transform, and Volume-based metrics (Adaptive On Balance Volume and Price Volatility). Here's how consolidation and trends are identified:
 1. Trend Override Logic:  The core logic evaluates whether specific conditions override the default trend determined by the JMA.
 • Bearish Overrides: A trend is classified as bearish if specific conditions involving negative slopes of the RSX, bearish Fisher Transform readings, and other auxiliary rankings (AOBV trend rank or volatility ranks) are met.
 • Bullish Overrides: Similarly, bullish trends are determined by the presence of positive RSX slopes, bullish Fisher readings, and supporting AOBV and volatility ranks.
 • Neutral Overrides: If neither bullish nor bearish overrides dominate, and conflicting conditions are detected (e.g., a bearish Fisher with a bullish OBV), the trend can be overridden to neutral.
 2. Dynamic Slope and Rank Analysis: RSX and Jurik Slopes: The slopes of the RSX and Jurik indicators play an important role. Increasing slopes suggest bullish momentum, while decreasing slopes imply bearish momentum.
 3. Narrow Spread Analysis: Consolidation zones are identified by examining conditions like narrow spreads in price action and mixed indicator signals (e.g., a positive RSX slope alongside a neutral or bearish AOBV). 
 • When consolidation is detected, the system looks for confirming signals (AOBV or Fisher alignment) to determine whether the next move is likely to be bullish or bearish.
 4.Fallback Logic:
If no explicit conditions are met for bullish, bearish, or neutral trends, the system defaults to comparing the current and previous values of the Jurik Moving Average. If the JMA is rising, the trend is set to bullish; otherwise, it defaults to bearish.
 The process of consolidating The RSX with JMA, attempts to confirm the trend suggested by the Jurik moving average. As shown above, several factors play into this, but it is mostly motivated by the RSX and its slope 
 -- Detecting Tops and Bottoms -- 
 •  Composite Momentum  
The Composite Momentum indicator analyzes the market's directional strength to identify implied tops and bottoms, especially at extreme values. It evaluates momentum by categorizing it into ranges that reflect moderate or strong trends for both bullish and bearish conditions. When momentum exceeds a positive threshold, it indicates a strong top, whereas values below a negative threshold then it's a strong bottom. 
 •  Laguerre Dynamic Projection Bands 
The Laguerre Dynamic Projection Bands focuses on price positioning within calculated dynamic boundaries. By applying linear regression, it projects upper and lower price bands, which serve as potential resistance and support levels. The oscillator value ranges from 0 to 100, representing the relative position of the current price. A value above 70 indicates the price is near a projected top, while a value below 30 suggests proximity to a projected bottom. Through custom Laguerre smoothing, the setup ensures that its signals remain stable and actionable.
 •  How They Work Together 
The Composite Momentum and Projection Oscillator complement each other in detecting market tops and bottoms. The Projection Oscillator provides an early indication when price nears a critical level, while the Composite Momentum confirms whether the momentum supports the formation of a significant top or bottom. 
 -- Consolidation Detection, Volatility, and Volume Climax Detection -- 
 •  Summary of Consolidation Detection: 
Consolidation is identified through a combination of statistical and smoothing applied to price data. The approach calculates deviations around the main plot using squared price inputs, smoothed averages, and adaptive multipliers. These deviations form dynamic upper and lower boundaries that adapt to changing market conditions. The system further evaluates these boundaries against historical bars to calculate a volume percentage, which indicates how often recent price action remains within these bands. A low percentage suggests consolidation, characterized by reduced volatility and price movement confined within a tighter range.
The bands around the main plot are derived from the calculated maximum deviations, creating adaptive ceilings and floors that expand or contract based on market dynamics. The Ceiling and Floor plots represent the outermost boundaries, while additional retracement plots are drawn based on the Composite Momentum wave rank. For example, during an uptrend, the retrace levels adjust upward in fractional steps relative to the deviation, signaling possible resistance levels. In downtrends, similar logic applies in reverse to determine support levels. These bands visually represent the volatility envelope and help contextualize price movements relative to expected ranges. Whenever, low volatility is detected, a visual "+" indicator is added to the plot to highlight that the market is likely in consolidation mode.
 •  How the Adaptive OBV Applies the Same Logic: 
The Adaptive On-Balance Volume (OBV) uses a similar mechanism to detect volume climaxes by analyzing deviations in volume data. Instead of price, the OBV logic applies the squared input and smoothing methods to volume flows. By comparing these deviations to historical norms, the system identifies periods of high or low volatility in volume, which often coincide with potential breakouts or consolidation zones. 
 •  How They Work Together 
The consolidation detection process and the adaptive bands work in tandem to provide traders with a clear visualization of market conditions. When consolidation is detected, the dynamic bands narrow and a "+" sign is visualized, signaling reduced volatility and potential breakout opportunities. Similarly, volume-based analysis through the adaptive OBV helps confirm whether a breakout is accompanied by significant volume, adding confidence to trade decisions. Together, they enable anticipation of market shifts.
 -- Directional Squeeze -- 
A directional price squeeze refers to a market condition where price compresses in a particular direction. This provides traders with an opportunity to stay in trades longer by aligning with the prevailing directional bias. This unique concept generates dynamic limits based on lookback period. Their convergence upward or downward is typically a strong indication of a price push toward the respective direction.
In this approach, the system looks at the highest and lowest values of a smoothed momentum reading over a recent period and measures the distance between them. Instead of relying on a static “overbought” or “oversold” line, it calculates new boundaries as a fraction of that distance, scaling the thresholds to match the price behavior. When these dynamically adjusted limits converge, it suggests a “directional squeeze”—meaning price is moving within a more compressed or focused range. Because these boundaries adapt to the market’s own highs and lows, they provide a more responsive indication of when price may be shifting into or out of a strong directional move.
 •  Determining the Directional Squeeze 
Directional squeeze is identified using dynamic limits derived from two key factors:
Schaff Trend Cycle (STC) for single-bar squeezes. and the Slow RSI (SRSI) for multi-bar or longer-term squeezes. Both are utilizing a custom alpha factor for adaptability and conformance with the JMA and Dynamic RSX studies.
 •  Directional Trend Confirmation: 
If the SRSI or STC approaches the limits, additional conditions such as Fisher RSX (momentum signals) and AOBV (volume signals) and the trend already established by the JMA are aligned. If so, then a squeezed in that trend directional is established. 
█  Why These Components All Work Together? 
The Adaptive Sharp Momentum Study integrates multiple components to provide a framework for analyzing market dynamics. Each feature addresses specific challenges in trading:
 • Core Trend Identification:
The Jurik Adaptive Moving Average (JMA) and Jurik RSX ensure better trend detection by reducing noise and dynamically confirming momentum, thus minimizing lag and false signals.
 • Implied Tops and Bottoms:
The combination of Composite Momentum and Laguerre Dynamic Projection Bands highlights critical turning points. This dual-layered approach identifies potential reversals and key support/resistance levels with improved clarity.
 • Consolidation and Volatility:
Adaptive ceilings, floors, and consolidation detection filter out indecisive market phases. This helps avoid unreliable signals and provides a better perspective on potential breakouts or continuations.
 • Directional Squeeze:
The Directional Squeeze feature identifies directional bias in price compression. Its dynamic thresholds adapt to market conditions, aiding in the assessment of strong directional moves.
 • Volume Climax:
Volume volatility and climax detection highlight key moments of market activity, aiding in the evaluation of trend strength and potential turning points.
 • Integrated Framework:
The integration of these components creates a system where each element complements the others. 
This study offers a methodical approach to analyzing trends, momentum, and volatility while filtering noise. It is a tool designed to assist traders in navigating complex market conditions.
█ Disclaimer
This script is provided for educational and informational purposes only and should not be considered financial advice. Trading financial instruments carries a high level of risk and may not be suitable for all investors. Before using this script, please consult with a qualified financial advisor to ensure it aligns with your individual circumstances. The author does not guarantee the accuracy or completeness of the script and is not responsible for any losses or damages that may occur from its use. Use this script at your own risk.
Volatility Risk Premium GOLD & SILVER 1.0ENGLISH 
This indicator (V-R-P) calculates the (one month) Volatility Risk Premium for GOLD and SILVER. 
V-R-P is the premium hedgers pay for over Realized Volatility for GOLD and SILVER options.
The premium stems from hedgers paying to insure their portfolios, and manifests itself in the differential between the price at which options are sold (Implied Volatility) and the volatility GOLD and SILVER ultimately realize (Realized Volatility).
I am using 30-day Implied Volatility (IV) and 21-day Realized Volatility (HV) as the basis for my calculation, as one month of IV is based on 30 calendaristic days and one month of HV is based on 21 trading days.
At first, the indicator appears blank and a label instructs you to choose which index you want the V-R-P to plot on the chart. Use the indicator settings (the sprocket) to choose one of the precious metals (or both).
Together with the V-R-P line, the indicator will show its one year moving average within a range of +/- 15% (which you can change) for benchmarking purposes. We should consider this range the “normalized” V-R-P for the actual period.
The Zero Line is also marked on the indicator.
 Interpretation 
When V-R-P is within the “normalized” range, … well... volatility and uncertainty, as it’s seen by the option market, is “normal”. We have a “premium” of volatility which should be considered normal.
When V-R-P is above the “normalized” range, the volatility premium is high. This means that investors are willing to pay more for options because they see an increasing uncertainty in markets.
When V-R-P is below the “normalized” range but positive (above the Zero line), the premium investors are willing to pay for risk is low, meaning they see decreasing uncertainty and risks in the market, but not by much.
When V-R-P is negative (below the Zero line), we have COMPLACENCY. This means investors see upcoming risk as being lower than what happened in the market in the recent past (within the last 30 days).
 CONCEPTS :
 Volatility Risk Premium 
The volatility risk premium (V-R-P) is the notion that implied volatility (IV) tends to be higher than realized volatility (HV) as market participants tend to overestimate the likelihood of a significant market crash. 
This overestimation may account for an increase in demand for options as protection against an equity portfolio. Basically, this heightened perception of risk may lead to a higher willingness to pay for these options to hedge a portfolio. 
In other words, investors are willing to pay a premium for options to have protection against significant market crashes even if statistically the probability of these crashes is lesser or even negligible.
Therefore, the tendency of implied volatility is to be higher than realized volatility, thus V-R-P being positive.
 Realized/Historical Volatility 
Historical Volatility (HV) is the statistical measure of the dispersion of returns for an index over a given period of time.
Historical volatility is a well-known concept in finance, but there is confusion in how exactly it is calculated. Different sources may use slightly different historical volatility formulas.
For calculating Historical Volatility I am using the most common approach: annualized standard deviation of logarithmic returns, based on daily closing prices.
Implied Volatility
Implied Volatility (IV) is the market's forecast of a likely movement in the price of the index and it is expressed annualized, using percentages and standard deviations over a specified time horizon (usually 30 days).
IV is used to price options contracts where high implied volatility results in options with higher premiums and vice versa. Also, options supply and demand and time value are major determining factors for calculating Implied Volatility.
Implied Volatility usually increases in bearish markets and decreases when the market is bullish.
For determining GOLD and SILVER implied volatility I used their volatility indices: GVZ and VXSLV (30-day IV) provided by CBOE.
 Warning 
Please be aware that because CBOE doesn’t provide real-time data in Tradingview, my V-R-P calculation is also delayed, so you shouldn’t use it in the first 15 minutes after the opening.
This indicator is calibrated for a daily time frame.
----------------------------------------------------------------------
 ESPAŇOL 
Este indicador (V-R-P) calcula la Prima de Riesgo de Volatilidad (de un mes) para GOLD y SILVER.
V-R-P es la prima que pagan los hedgers sobre la Volatilidad Realizada para las opciones de GOLD y SILVER.
La prima proviene de los hedgers que pagan para asegurar sus carteras y se manifiesta en el diferencial entre el precio al que se venden las opciones (Volatilidad Implícita) y la volatilidad que finalmente se realiza en el ORO y la PLATA (Volatilidad Realizada).
Estoy utilizando la Volatilidad Implícita (IV) de 30 días y la Volatilidad Realizada (HV) de 21 días como base para mi cálculo, ya que un mes de IV se basa en 30 días calendario y un mes de HV se basa en 21 días de negociación.
Al principio, el indicador aparece en blanco y una etiqueta le indica que elija qué índice desea que el V-R-P represente en el gráfico. Use la configuración del indicador (la rueda dentada) para elegir uno de los metales preciosos (o ambos).
Junto con la línea V-R-P, el indicador mostrará su promedio móvil de un año dentro de un rango de +/- 15% (que puede cambiar) con fines de evaluación comparativa. Deberíamos considerar este rango como el V-R-P "normalizado" para el período real.
La línea Cero también está marcada en el indicador.
 Interpretación 
Cuando el V-R-P está dentro del rango "normalizado",... bueno... la volatilidad y la incertidumbre, como las ve el mercado de opciones, es "normal". Tenemos una “prima” de volatilidad que debería considerarse normal.
Cuando V-R-P está por encima del rango "normalizado", la prima de volatilidad es alta. Esto significa que los inversores están dispuestos a pagar más por las opciones porque ven una creciente incertidumbre en los mercados.
Cuando el V-R-P está por debajo del rango "normalizado" pero es positivo (por encima de la línea Cero), la prima que los inversores están dispuestos a pagar por el riesgo es baja, lo que significa que ven una disminución, pero no pronunciada, de la incertidumbre y los riesgos en el mercado.
Cuando V-R-P es negativo (por debajo de la línea Cero), tenemos COMPLACENCIA. Esto significa que los inversores ven el riesgo próximo como menor que lo que sucedió en el mercado en el pasado reciente (en los últimos 30 días).
 
 CONCEPTOS :
 Prima de Riesgo de Volatilidad 
La Prima de Riesgo de Volatilidad (V-R-P) es la noción de que la Volatilidad Implícita (IV) tiende a ser más alta que la Volatilidad Realizada (HV) ya que los participantes del mercado tienden a sobrestimar la probabilidad de una caída significativa del mercado.
Esta sobreestimación puede explicar un aumento en la demanda de opciones como protección contra una cartera de acciones. Básicamente, esta mayor percepción de riesgo puede conducir a una mayor disposición a pagar por estas opciones para cubrir una cartera.
En otras palabras, los inversores están dispuestos a pagar una prima por las opciones para tener protección contra caídas significativas del mercado, incluso si estadísticamente la probabilidad de estas caídas es menor o insignificante.
Por lo tanto, la tendencia de la Volatilidad Implícita es de ser mayor que la Volatilidad Realizada, por lo cual el V-R-P es positivo.
 Volatilidad Realizada/Histórica 
La Volatilidad Histórica (HV) es la medida estadística de la dispersión de los rendimientos de un índice durante un período de tiempo determinado.
La Volatilidad Histórica es un concepto bien conocido en finanzas, pero existe confusión sobre cómo se calcula exactamente. Varias fuentes pueden usar fórmulas de Volatilidad Histórica ligeramente diferentes.
Para calcular la Volatilidad Histórica, utilicé el enfoque más común: desviación estándar anualizada de rendimientos logarítmicos, basada en los precios de cierre diarios.
 Volatilidad Implícita 
La Volatilidad Implícita (IV) es la previsión del mercado de un posible movimiento en el precio del índice y se expresa anualizada, utilizando porcentajes y desviaciones estándar en un horizonte de tiempo específico (generalmente 30 días).
IV se utiliza para cotizar contratos de opciones donde la alta Volatilidad Implícita da como resultado opciones con primas más altas y viceversa. Además, la oferta y la demanda de opciones y el valor temporal son factores determinantes importantes para calcular la Volatilidad Implícita.
La Volatilidad Implícita generalmente aumenta en los mercados bajistas y disminuye cuando el mercado es alcista.
Para determinar la Volatilidad Implícita de GOLD y SILVER utilicé sus índices de volatilidad: GVZ y VXSLV (30 días IV) proporcionados por CBOE.
 Precaución 
Tenga en cuenta que debido a que CBOE no proporciona datos en tiempo real en Tradingview, mi cálculo de V-R-P también se retrasa, y por este motivo no se recomienda usar en los primeros 15 minutos desde la apertura.
Este indicador está calibrado para un marco de tiempo diario.
Volatility Risk Premium (VRP) 1.0ENGLISH 
This indicator (V-R-P) calculates the (one month) Volatility Risk Premium for S&P500 and Nasdaq-100. 
V-R-P is the premium hedgers pay for over Realized Volatility for S&P500 and Nasdaq-100 index options.
The premium stems from hedgers paying to insure their portfolios, and manifests itself in the differential between the price at which options are sold (Implied Volatility) and the volatility the S&P500 and Nasdaq-100 ultimately realize (Realized Volatility).
I am using 30-day Implied Volatility (IV) and 21-day Realized Volatility (HV) as the basis for my calculation, as one month of IV is based on 30 calendaristic days and one month of HV is based on 21 trading days.
At first, the indicator appears blank and a label instructs you to choose which index you want the V-R-P to plot on the chart. Use the indicator settings (the sprocket) to choose one of the indices (or both).
Together with the V-R-P line, the indicator will show its one year moving average within a range of +/- 15% (which you can change) for benchmarking purposes. We should consider this range the “normalized” V-R-P for the actual period.
The Zero Line is also marked on the indicator.
 Interpretation 
When V-R-P is within the “normalized” range, … well... volatility and uncertainty, as it’s seen by the option market, is “normal”. We have a “premium” of volatility which should be considered normal.
When V-R-P is above the “normalized” range, the volatility premium is high. This means that investors are willing to pay more for options because they see an increasing uncertainty in markets.
When V-R-P is below the “normalized” range but positive (above the Zero line), the premium investors are willing to pay for risk is low, meaning they see decreasing uncertainty and risks in the market, but not by much.
When V-R-P is negative (below the Zero line), we have COMPLACENCY. This means investors see upcoming risk as being lower than what happened in the market in the recent past (within the last 30 days).
 CONCEPTS: 
 Volatility Risk Premium 
The volatility risk premium (V-R-P) is the notion that implied volatility (IV) tends to be higher than realized volatility (HV) as market participants tend to overestimate the likelihood of a significant market crash.
This overestimation may account for an increase in demand for options as protection against an equity portfolio. Basically, this heightened perception of risk may lead to a higher willingness to pay for these options to hedge a portfolio. 
In other words, investors are willing to pay a premium for options to have protection against significant market crashes even if statistically the probability of these crashes is lesser or even negligible.
Therefore, the tendency of implied volatility is to be higher than realized volatility, thus V-R-P being positive.
 Realized/Historical Volatility 
Historical Volatility (HV) is the statistical measure of the dispersion of returns for an index over a given period of time.
Historical volatility is a well-known concept in finance, but there is confusion in how exactly it is calculated. Different sources may use slightly different historical volatility formulas.
For calculating Historical Volatility I am using the most common approach: annualized standard deviation of logarithmic returns, based on daily closing prices.
 Implied Volatility 
Implied Volatility (IV) is the market's forecast of a likely movement in the price of the index and it is expressed annualized, using percentages and standard deviations over a specified time horizon (usually 30 days).
IV is used to price options contracts where high implied volatility results in options with higher premiums and vice versa. Also, options supply and demand and time value are major determining factors for calculating Implied Volatility.
Implied Volatility usually increases in bearish markets and decreases when the market is bullish.
For determining S&P500 and Nasdaq-100 implied volatility I used their volatility indices: VIX and VXN (30-day IV) provided by CBOE.
 Warning 
 
 Please be aware that because CBOE doesn’t provide real-time data in Tradingview, my V-R-P calculation is also delayed, so you shouldn’t use it in the first 15 minutes after the opening.
 This indicator is calibrated for a daily time frame.
 
 ESPAŇOL 
Este indicador (V-R-P) calcula la Prima de Riesgo de Volatilidad (de un mes) para S&P500 y Nasdaq-100.
V-R-P es la prima que pagan los hedgers sobre la Volatilidad Realizada para las opciones de los índices S&P500 y Nasdaq-100.
La prima proviene de los hedgers que pagan para asegurar sus carteras y se manifiesta en el diferencial entre el precio al que se venden las opciones (Volatilidad Implícita) y la volatilidad que finalmente se realiza en el S&P500 y el Nasdaq-100 (Volatilidad Realizada).
Estoy utilizando la Volatilidad Implícita (IV) de 30 días y la Volatilidad Realizada (HV) de 21 días como base para mi cálculo, ya que un mes de IV se basa en 30 días calendario y un mes de HV se basa en 21 días de negociación.
Al principio, el indicador aparece en blanco y una etiqueta le indica que elija qué índice desea que el V-R-P represente en el gráfico. Use la configuración del indicador (la rueda dentada) para elegir uno de los índices (o ambos).
Junto con la línea V-R-P, el indicador mostrará su promedio móvil de un año dentro de un rango de +/- 15% (que puede cambiar) con fines de evaluación comparativa. Deberíamos considerar este rango como el V-R-P "normalizado" para el período real.
La línea Cero también está marcada en el indicador.
 Interpretación 
Cuando el V-R-P está dentro del rango "normalizado",... bueno... la volatilidad y la incertidumbre, como las ve el mercado de opciones, es "normal". Tenemos una “prima” de volatilidad que debería considerarse normal.
Cuando V-R-P está por encima del rango "normalizado", la prima de volatilidad es alta. Esto significa que los inversores están dispuestos a pagar más por las opciones porque ven una creciente incertidumbre en los mercados.
Cuando el V-R-P está por debajo del rango "normalizado" pero es positivo (por encima de la línea Cero), la prima que los inversores están dispuestos a pagar por el riesgo es baja, lo que significa que ven una disminución, pero no pronunciada, de la incertidumbre y los riesgos en el mercado.
Cuando V-R-P es negativo (por debajo de la línea Cero), tenemos COMPLACENCIA. Esto significa que los inversores ven el riesgo próximo como menor que lo que sucedió en el mercado en el pasado reciente (en los últimos 30 días).
 
 CONCEPTOS: 
 Prima de Riesgo de Volatilidad 
La Prima de Riesgo de Volatilidad (V-R-P) es la noción de que la Volatilidad Implícita (IV) tiende a ser más alta que la Volatilidad Realizada (HV) ya que los participantes del mercado tienden a sobrestimar la probabilidad de una caída significativa del mercado.
Esta sobreestimación puede explicar un aumento en la demanda de opciones como protección contra una cartera de acciones. Básicamente, esta mayor percepción de riesgo puede conducir a una mayor disposición a pagar por estas opciones para cubrir una cartera.
En otras palabras, los inversores están dispuestos a pagar una prima por las opciones para tener protección contra caídas significativas del mercado, incluso si estadísticamente la probabilidad de estas caídas es menor o insignificante.
Por lo tanto, la tendencia de la Volatilidad Implícita es de ser mayor que la Volatilidad Realizada, por lo cual el V-R-P es positivo.
 Volatilidad Realizada/Histórica 
La Volatilidad Histórica (HV) es la medida estadística de la dispersión de los rendimientos de un índice durante un período de tiempo determinado.
La Volatilidad Histórica es un concepto bien conocido en finanzas, pero existe confusión sobre cómo se calcula exactamente. Varias fuentes pueden usar fórmulas de Volatilidad Histórica ligeramente diferentes.
Para calcular la Volatilidad Histórica, utilicé el enfoque más común: desviación estándar anualizada de rendimientos logarítmicos, basada en los precios de cierre diarios.
 Volatilidad Implícita 
La Volatilidad Implícita (IV) es la previsión del mercado de un posible movimiento en el precio del índice y se expresa anualizada, utilizando porcentajes y desviaciones estándar en un horizonte de tiempo específico (generalmente 30 días).
IV se utiliza para cotizar contratos de opciones donde la alta Volatilidad Implícita da como resultado opciones con primas más altas y viceversa. Además, la oferta y la demanda de opciones y el valor temporal son factores determinantes importantes para calcular la Volatilidad Implícita.
La Volatilidad Implícita generalmente aumenta en los mercados bajistas y disminuye cuando el mercado es alcista.
Para determinar la Volatilidad Implícita de S&P500 y Nasdaq-100 utilicé sus índices de volatilidad: VIX y VXN (30 días IV) proporcionados por CBOE.
 Precaución 
 
 Tenga en cuenta que debido a que CBOE no proporciona datos en tiempo real en Tradingview, mi cálculo de V-R-P también se retrasa, y por este motivo no se recomienda usar en los primeros 15 minutos desde la apertura.
 Este indicador está calibrado para un marco de tiempo diario.
Crypto Options Greeks & Volatility Analyzer [BackQuant]Crypto Options Greeks & Volatility Analyzer  
 Overview 
The Crypto Options Greeks & Volatility Analyzer is a comprehensive analytical tool that calculates Black-Scholes option Greeks up to the third order for Bitcoin and Ethereum options. It integrates implied volatility data from VOLMEX indices and provides multiple visualization layers for options risk analysis.
 Quick Introduction to Options Trading 
Options are financial derivatives that give the holder the right, but not the obligation, to buy or sell an underlying asset at a predetermined price (strike price) within a specific time period (expiration date). Understanding options requires grasping two fundamental concepts:
 Call Options : Give the right to buy the underlying asset at the strike price. Calls increase in value when the underlying price rises above the strike price.
 Put Options : Give the right to sell the underlying asset at the strike price. Puts increase in value when the underlying price falls below the strike price.
 The Language of Options: Greeks 
Options traders use "Greeks" - mathematical measures that describe how an option's price changes in response to various factors:
 
 Delta : How much the option price moves for each $1 change in the underlying
 Gamma : How fast delta changes as the underlying moves
 Theta : Daily time decay - how much value erodes each day
 Vega : Sensitivity to implied volatility changes
 Rho : Sensitivity to interest rate changes
 
 
These Greeks are essential for understanding risk. Just as a pilot needs instruments to fly safely, options traders need Greeks to navigate market conditions and manage positions effectively.
 Why Volatility Matters 
Implied volatility (IV) represents the market's expectation of future price movement. High IV means:
 
 Options are more expensive (higher premiums)
 Market expects larger price swings
 Better for option sellers
 
Low IV means:
 
 Options are cheaper
 Market expects smaller moves
 Better for option buyers
 
 
This indicator helps you visualize and quantify these critical concepts in real-time.
  Back to the Indicator 
 Key Features & Components 
 1. Complete Greeks Calculations 
The indicator computes all standard Greeks using the Black-Scholes-Merton model adapted for cryptocurrency markets:
 First Order Greeks: 
 
 Delta (Δ) : Measures the rate of change of option price with respect to underlying price movement. Ranges from 0 to 1 for calls and -1 to 0 for puts.
 Vega (ν) : Sensitivity to implied volatility changes, expressed as price change per 1% change in IV.
 Theta (Θ) : Time decay measured in dollars per day, showing how much value erodes with each passing day.
 Rho (ρ) : Interest rate sensitivity, measuring price change per 1% change in risk-free rate.
 
 
 Second Order Greeks: 
 
 Gamma (Γ) : Rate of change of delta with respect to underlying price, indicating how quickly delta will change.
 Vanna : Cross-derivative measuring delta's sensitivity to volatility changes and vega's sensitivity to price changes.
 Charm : Delta decay over time, showing how delta changes as expiration approaches.
 Vomma (Volga) : Vega's sensitivity to volatility changes, important for volatility trading strategies.
 
 
 Third Order Greeks: 
 
 Speed : Rate of change of gamma with respect to underlying price (∂Γ/∂S).
 Zomma : Gamma's sensitivity to volatility changes (∂Γ/∂σ).
 Color : Gamma decay over time (∂Γ/∂T).
 Ultima : Third-order volatility sensitivity (∂²ν/∂σ²).
 
 
 2. Implied Volatility Analysis 
The indicator includes a sophisticated IV ranking system that analyzes current implied volatility relative to its recent history:
 IV Rank : Percentile ranking of current IV within its 30-day range (0-100%)
 IV Percentile : Percentage of days in the lookback period where IV was lower than current
 IV Regime Classification : Very Low, Low, High, or Very High
 Color-Coded Headers : Visual indication of volatility regime in the Greeks table
Trading regime suggestions based on IV rank:
 
 IV Rank > 75%: "Favor selling options" (high premium environment)
 IV Rank 50-75%: "Neutral / Sell spreads"
 IV Rank 25-50%: "Neutral / Buy spreads"
 IV Rank < 25%: "Favor buying options" (low premium environment)
 
 
 3. Gamma Zones Visualization 
Gamma zones display horizontal price levels where gamma exposure is highest:
 Purple horizontal lines  indicate gamma concentration areas
 Opacity scaling : Darker shading represents higher gamma values
 Percentage labels : Shows gamma intensity relative to ATM gamma
 Customizable zones : 3-10 price levels can be analyzed
These zones are critical for understanding:
 
 Pin risk around expiration
 Potential for explosive price movements
 Optimal strike selection for gamma trading
 Market maker hedging flows
 
 
 4. Probability Cones (Expected Move) 
The probability cones project expected price ranges based on current implied volatility:
 1 Standard Deviation (68% probability) : Shown with dashed green/red lines
 2 Standard Deviations (95% probability) : Shown with dotted green/red lines
 Time-scaled projection : Cones widen as expiration approaches
 Lognormal distribution : Accounts for positive skew in asset prices
Applications:
Strike selection for credit spreads
Identifying high-probability profit zones
Setting realistic price targets
Risk management for undefined risk strategies
 5. Breakeven Analysis 
The indicator plots key price levels for options positions:
 White line : Strike price
 Green line : Call breakeven (Strike + Premium)
 Red line : Put breakeven (Strike - Premium)
These levels update dynamically as option premiums change with market conditions.
 6. Payoff Structure Visualization 
Optional P&L labels display profit/loss at expiration for various price levels:
Shows P&L at -2 sigma, -1 sigma, ATM, +1 sigma, and +2 sigma price levels
Separate calculations for calls and puts
Helps visualize option payoff diagrams directly on the chart
Updates based on current option premiums
 Configuration Options 
 Calculation Parameters 
 Asset Selection : BTC or ETH (limited by VOLMEX IV data availability)
 Expiry Options : 1D, 7D, 14D, 30D, 60D, 90D, 180D
 Strike Mode : ATM (uses current spot) or Custom (manual strike input)
 Risk-Free Rate : Adjustable annual rate for discounting calculations
 Display Settings 
 Greeks Display : Toggle first, second, and third-order Greeks independently
 Visual Elements : Enable/disable probability cones, gamma zones, P&L labels
 Table Customization : Position (6 options) and text size (4 sizes)
 Price Levels : Show/hide strike and breakeven lines
 Technical Implementation 
 Data Sources 
 Spot Prices :  INDEX:BTCUSD  and  INDEX:ETHUSD  for underlying prices
 Implied Volatility :  VOLMEX:BVIV  (Bitcoin) and  VOLMEX:EVIV  (Ethereum) indices
 Real-Time Updates : All calculations update with each price tick
 Mathematical Framework 
The indicator implements the full Black-Scholes-Merton model:
Standard normal distribution approximations using Abramowitz and Stegun method
Proper annualization factors (365-day year)
Continuous compounding for interest rate calculations
Lognormal price distribution assumptions
 Alert Conditions 
Four categories of automated alerts:
 
 Price-Based : Underlying crossing strike price
 Gamma-Based : 50% surge detection for explosive moves
 Moneyness : Deep ITM alerts when |delta| > 0.9
 Time/Volatility : Near expiration and vega spike warnings
 
 
 Practical Applications 
 For Options Traders 
 
 Monitor all Greeks in real-time for active positions
 Identify optimal entry/exit points using IV rank
 Visualize risk through probability cones and gamma zones
 Track time decay and plan rolls
 
 For Volatility Traders 
 
 Compare IV across different expiries
 Identify mean reversion opportunities
 Monitor vega exposure across strikes
 Track higher-order volatility sensitivities
 
 Conclusion 
The Crypto Options Greeks & Volatility Analyzer transforms complex mathematical models into actionable visual insights. By combining institutional-grade Greeks calculations with intuitive overlays like probability cones and gamma zones, it bridges the gap between theoretical options knowledge and practical trading application.
Whether you're:
 
 A directional trader using options for leverage
 A volatility trader capturing IV mean reversion
 A hedger managing portfolio risk
 Or simply learning about options mechanics
 
This tool provides the quantitative foundation needed for informed decision-making in cryptocurrency options markets.
Remember that options trading involves substantial risk and complexity. The Greeks and visualizations provided by this indicator are tools for analysis - they should be combined with proper risk management, position sizing, and a thorough understanding of options strategies.
As crypto options markets continue to mature and grow, having professional-grade analytics becomes increasingly important. This indicator ensures you're equipped with the same analytical capabilities used by institutional traders, adapted specifically for the unique characteristics of 24/7 cryptocurrency markets.
Support and Resistance levels from Options DataINTRODUCTION 
This script is designed to visualize key support and resistance levels derived from options data on TradingView charts. It overlays lines, labels, and boxes to highlight levels such as Put Walls (gamma support), Call Walls (gamma resistance), Gamma Flip points, Vanna levels, and more. 
These levels are intended to help traders identify potential areas of price magnetism, reversal, or breakout based on options market dynamics. All calculations and visualizations are based on user-provided data pasted into the input field, as Pine Script cannot directly fetch external options data due to platform limitations (explained below).
 For convenience, my website allows users to interact with a bot that will generate the string for up to 30 tickers at once getting nearly real-time data on demand (data is cached for 15min). With the output string pasted into this indicator, it's a bliss to shuffle through your portfolio and see those levels for each ticker. 
The script is open-source under TradingView's terms, allowing users to study, modify, and improve it. It draws inspiration from common options-derived metrics like gamma exposure and vanna, which are widely discussed in financial literature. No external code is copied without rights; all logic is original or based on standard mathematical formulas.
 How the Options Levels Are Calculated 
The levels displayed by this script are not computed within Pine Script itself—instead, they rely on pre-calculated values provided by the user (via a pasted data string). These values are derived from options chain data fetched from financial APIs (e.g., using libraries like yfinance in Python). Here's a step-by-step overview of how these levels are generally calculated externally before being input into the script:
 Fetching Options Data: 
Historical and current options chain data for a ticker (e.g., strikes, open interest, volume, implied volatility, expirations) is retrieved for near-term expirations (e.g., up to 90 days).
Current stock price is obtained from recent history.
 Gamma Support (Put Wall) and Resistance (Call Wall): 
Gamma Calculation: For each option, gamma (the rate of change of delta) is computed using the Black-Scholes formula:
gamma = N'(d1) / (S * sigma * sqrt(T))
where S is the stock price, K is the strike, T is time to expiration (in years), sigma is implied volatility, r is the risk-free rate (e.g., 0.0445), and N'(d1) is the normal probability density function.
Weighted gamma is multiplied by open interest and aggregated by strike.
The Put Wall is the strike below the current price with the highest weighted gamma from puts (acting as support).
The Call Wall is the strike above the current price with the highest weighted gamma from calls (acting as resistance).
Short-term versions focus on strikes closer to the money (e.g., within 10-15% of the price).
 Gamma Flip Level: 
Net dealer gamma exposure (GEX) is calculated across all strikes:
GEX = sum (gamma * OI * 100 * S^2 * sign * decay)
where sign is +1 for calls/-1 for puts, and decay is 1 / sqrt(T).
The flip point is the price where net GEX changes sign (from positive to negative or vice versa), interpolated between strikes.
 Vanna Levels: 
Vanna (sensitivity of delta to volatility) is calculated:
vanna = -N'(d1) * d2 / sigma
where d2 = d1 - sigma * sqrt(T).
Weighted by open interest, the highest positive and negative vanna strikes are identified.
 Other Levels: 
 
 S1/R1: Significant strikes with high combined open interest and volume (80% OI + 20% volume), below/above price for support/resistance.
 Implied Move: ATM implied volatility scaled by S * sigma * sqrt(d/365) (e.g., for 7 days).
 Call/Put Ratio: Total call contracts divided by put contracts (OI + volume).
 IV Percentage: Average ATM implied volatility.
 Options Activity Level: Average contracts per unique strike, binned into levels (0-4).
 Stop Loss: Dynamically set below the lowest support (e.g., Put Wall, Gamma Flip), adjusted by IV (tighter in low IV).
 Fib Target: 1.618 extension from Put Wall to Call Wall range.
 Previous day levels are stored for comparison (e.g., to detect Call Wall movement >2.5% for alerts).
 
 Effect as Support and Resistance in Technical Trading 
Options levels like gamma walls influence price action due to market maker hedging:
 
 Put Wall (Gamma Support): High put gamma below price creates a "magnet" effect—market makers buy stock as price falls, providing support. Traders might look for bounces here as entry points for longs.
 Call Wall (Gamma Resistance): High call gamma above price leads to selling pressure from hedging, acting as resistance. Rejections here could signal trims, sells or even shorts.
 Gamma Flip: Where gamma exposure flips sign, often a volatility pivot—crossing it can accelerate moves (bullish above, bearish below).
 Vanna Levels: Positive/negative vanna indicate volatility sensitivity; crosses may signal regime shifts.
 Implied Move: Shows expected range; prices outside suggest overextension.
 S1/R1 and Fib Target: Volume/OI clusters act as classic S/R; Fib extensions project upside targets post-breakout.
 
In trading, these are not guarantees—combine with TA (e.g., volume, trends). High activity levels imply stronger effects; low CP ratio suggests bearish sentiment. Alerts trigger on proximities/crosses for awareness, not advice.
 Limitations of the TradingView Platform for Data Pulling 
TradingView's Pine Script is sandboxed for security and performance:
No direct internet access or API calls (e.g., can't fetch yfinance data in-script).
Limited to chart data/symbol info; no real-time options chains.
Inputs are static per load; updates require manual pasting.
Caching isn't persistent across sessions.
This prevents dynamic data pulling, ensuring scripts remain lightweight but requiring external tools for fresh data.
 Creative Solution for On-Demand Data Pulling 
To overcome these limitations, users can use external tools or scripts (e.g., Python-based) to fetch and compute levels on demand. The tool processes tickers, generates a formatted string (e.g., "TICKER:level1,level2,...;TIMESTAMP:unix;"), and users paste it into the script's input. This keeps data fresh without violating platform rules, as computation happens off-platform. For example, run a local script to query APIs and output the string—adaptable for any ticker.
Script Functionality Breakdown
Inputs: Custom data string (parsed for levels/timestamp); toggles for short-term/previous/Vanna/stop loss; style options (colors, transparency).
Parsing: Extracts levels for the chart symbol; gets timestamp for "updated ago" display.
Drawing: Lines/labels for levels; boxes for gamma zones/implied move; clears old elements on updates.
Info Panel: Top-right summary with metrics (CP ratio, IV, distances, activity); emojis for quick status.
Alerts: Conditions for proximities, crosses, bounces (e.g., 0.5% bounce from Put Wall).
Performance: Uses vars for persistence; efficient for real-time.
This script is educational—test thoroughly. Not financial advice; past performance isn't indicative of future results. Feedback welcome via TradingView comments.
Options Chart+ [Pt]█ Introduction   
Since the launch of options data support on TradingView, the landscape for retail options traders has started to shift. But until now, no tool in the public TradingView library has offered a full-featured, visual-first interface for reading option strike activity directly from your chart.
 www.tradingview.com 
 Options Chart+   changes that — bringing an institutional-style strike analysis interface to TradingView.
It reads the option chain for any symbol and expiry, dynamically builds a strike-by-strike volume and price table, highlights top areas of market activity, and helps you interpret directional sentiment through both total and skew-adjusted implied moves.
────────────────────────────  
 █ What Is Options Chart+  ?   
Options Chart+   is a  premium script  for analyzing call and put option volumes and pricing for any option chain that's readily available on TradingView.
It provides a real-time, on-chart display of:  
-  Strike-Level Volume and Price Table   
-  Gradient Heatmaps for Volume Activity   
-  Overlayed Top Strikes on the Chart   
-  Implied Move and Directional Bias Metrics   
By visualizing where options traders are concentrating their positioning, this tool helps uncover potential support/resistance zones, directional bets, and key gamma levels — all from the flow.
────────────────────────────  
 █ Key Features   
 Visual Option Chain Table   
- Centers around the current price  
- Real-time volume and price per strike  
- Clean formatting with total summaries  
 Gradient Volume Coloring   
- Highlights activity using customizable color gradients  
- Makes volume spikes obvious at a glance  
 Top Strike Overlays   
- Automatically highlights top volume call/put strikes  
- Overlays labeled lines on the chart for price context  
 Implied Move and Directional Bias   
- ATM straddle =  Total Implied Move   
- Volume-weighted extrinsics =  Directional Implied Move (DIM)   
- Shows skew-based bias: bullish or bearish  
────────────────────────────  
 █ Inputs & Customization   
 Option Expiry Date (YYMMDD):  Must match valid options for the symbol  
 Strike Increment:  Matches strike spacing (e.g., 1, 2.5, 5)  
 Reference Strike Denominator:  Rounds the center strike  
 Volume Timeframe:  Any valid chart timeframe  
 Gradient Volume Coloring:  Toggle on/off  
 Call/Put Volume Colors:  Fully customizable  
 Draw Top Strike Lines:  Enables chart overlays  
 Start / End Offset:  Customize overlay length  
 Font Size:  Auto, Tiny, Small, or Normal  
 Delayed Data Warning:  Adds footnote in the table  
 Reset Button:  Re-centers the tool if price moves too far  
────────────────────────────  
 █ Use Cases   
 1. Spotting High-Interest Strikes   
Use gradient heatmaps and overlays to see where volume is clustering.  
 Example:  Heavy calls at 4200 may act as a magnet or gamma level — perfect for breakout or fade setups.
 2. Interpreting Sentiment with DIM   
Gauge where the flow is leaning directionally.  
 Example:  Bullish DIM = call extrinsics outweigh puts → sentiment skewed bullish.
 3. Sizing Risk Around Implied Movement   
Use Total Implied Move to set range boundaries.  
 Example:  Avoid selling premium inside the expected move unless risk is tight.
 4. Combining Volume and Price Action   
Overlay strikes with price structure for confluence trades.  
 Example:  A heavy put strike with price holding = potential bounce zone.
 5. Structuring Straddles or Strangles   
Use volume skew to inform multi-leg positions.  
 Example:  If call side is bid up, lean strangle wider to the upside.
────────────────────────────  
 █ Known Limitations   
-  Invalid Expiry or Strike Inputs Will Error   
You are responsible for selecting a valid expiry and strike increment that matches the symbol’s listed options.
-  Options Data Must Be Available   
This tool depends on TradingView's options feed. If you do not have access (delayed or real-time), the script will fail to load.
-  Strike Range is Limited   
Renders ~20 strikes max to preserve clarity. If price moves beyond that, use the  Reset Indicator  input.
────────────────────────────  
 █ Final Thoughts   
 Options Chart+   is built for traders who operate on flow, structure, and sentiment. It lets you trade with confidence by showing where the real positioning is happening — visually, clearly, and in real-time.
If you:  
- Think in terms of  option flow   
- Trade around  volume levels or gamma exposure   
- Want  faster access to skew and sentiment   
- Or just need  clarity over chaos  in an options chain...  
This tool is for you.
EM Range (VIX1D PrevClose • Close & Hi/Lo, N-Day View)What this indicator does
This study projects a one-day expected move (EM) from the CBOE:VIX1D using a simple 1-σ model with 252 trading days. It visualizes the possible intraday range from three anchors and also gives a T+1 forecast using today’s real-time VIX1D:
	•	PrevClose ±σ (solid) – a symmetric bracket around yesterday’s close.
	•	Low → Upper (dashed) – the upper bound implied from today’s low.
	•	High → Lower (dashed) – the lower bound implied from today’s high.
	•	NextDay (solid, optional) – tomorrow’s expected bracket built from the current price using today’s VIX1D (intraday it updates; after the daily close it freezes to the daily close).
All ranges are plotted in points, not percentages.
How it’s computed
Let σ = (VIX1D/100)/sqrt(252) * multiplier.
	•	PrevClose bands: prevClose * (1 ± σ) using yesterday’s VIX1D close.
	•	Low → Upper: todayLow * (1 + σ) using yesterday’s VIX1D close.
	•	High → Lower: todayHigh * (1 − σ) using yesterday’s VIX1D close.
	•	NextDay (T+1): currentPrice * (1 ± σ_today) where σ_today uses today’s VIX1D (real-time via 15m/30m/60m fallbacks; after session close it uses the daily close).
What you’ll see on the chart
	•	Two solid lines (PrevClose ±σ), two dashed lines (from Low/High).
	•	Optional blue solid lines for NextDay ±σ (toggle).
	•	Lines are per-day segments (not infinite). Yesterday’s dashed lines are carried into today for quick context; other lines do not carry across days.
	•	Colors are fully configurable; defaults use a deep, high-contrast palette tuned for dark backgrounds.
N-Day history (no over-extension)
Use “Show last N days” to display previous sessions. Historical lines are drawn only within their own day (clean separation of regimes).
Compact table (top-right by default)
The on-chart table shows concise, single-line rows:
	•	VIX1D−1: yesterday’s VIX1D close | ±EM (points) from PrevClose
	•	VIX1D (RT): today’s real-time VIX1D | ±EM (points) from current price
	•	Prev ±σ: numeric   around PrevClose
	•	L → Upper: today’s low and its implied upper bound
	•	H → Lower: today’s high and its implied lower bound
	•	NextDay: tomorrow’s implied   from current price
	•	>±σ: count of daily closes that finished outside PrevClose ±σ over the last N−1 completed days (with up/down breakdown)
Inputs & options
	•	VIX1D symbol: default CBOE:VIX1D.
	•	σ multiplier: default 1.0 (try 0.5 / 1.5 / 2.0 based on your risk model).
	•	Show last N days: how many sessions to render (incl. today).
	•	Show NextDay lines (blue): on/off toggle.
	•	Line width and color pickers for each band type.
	•	Table position: top/bottom, left/right.
Works on…
	•	Any instrument priced in points (stocks, ETFs, futures incl. ES).
	•	Any timeframe. For the T+1 forecast, the price anchor is real-time on intraday charts; on higher timeframes it uses an intraday proxy (60-minute) intraday and switches to the daily close after session end.
Notes & good practice
	•	VIX1D is an implied daily move proxy; it’s not a guarantee. Treat bands as probabilistic, not absolute barriers.
	•	The outside-±σ close count is a quick sanity check on how often price exceeds the one-day expectation—useful for regime awareness and sizing.
	•	If your market isn’t well-described by VIX1D (e.g., non-US hours or crypto), consider substituting a more relevant vol index.
Disclaimer: This tool is for research/education only and is not financial advice. Always manage risk.
Volatility Cone [Loxx]When it comes to forecasting volatility, it seems that the old axiom about weather is applicable: "Everyone talks about it, but no one can do much about it!" Volatility cones are a tool that may be useful in one’s attempt to do something about predicting the future volatility of an asset. 
A "volatility cone" is a plot of the range of volatilities within a fixed probability band around the true parameter, as a function of sample length. Volatility cone is a visualization tool for the display of historical volatility term structure. It was introduced by Burghardt and Lane in early 1990 and is popular in the option trading community. This is mostly a static indicator due to processor load and is restricted to the daily time frame. 
 Why cones? 
When we enter the options arena, in an effort to "trade volatility," we want to be able to compare current levels of implied volatility with recent historical volatility in an effort to assess the relative value of the option(s) under consideration Volatility cones can be an effective tool to help us with this assessment. A volatility cone is an analytical application designed to help determine if the current levels of historical or implied volatilities for a given underlying, its options, or any of the new volatility instruments, such as VolContractTM futures, VIX futures, or VXX and VXZ ETNs, are likely to persist in the future. As such, volatility cones are intended to help the user assess the likely volatility that an underlying will go on to display over a certain period. Those who employ volatility cones as a diagnostic tool are relying upon the principle of "reversion to the mean." This means that unusually high levels of volatility are expected to drift or move lower (revert) to their average (mean) levels, while relatively low volatility readings are expected to rise, eventually, to more "normal" values.
 How to use 
Suppose you want to analyze an options contract expiring in 3-months and this current option has an current implied volatility 25.5%. Suppose also that realized volatility (y-axis) at the 3-month mark (90 on the x-axis) is 45%, median in 35%, the 25th percentile is 30%, and the low is 25%. Comparing this range to the implied volatility you would maybe conclude that this is a relatively "cheap" option contract. To help you visualize implied volatility on the chart given an expiration date in bars, the indicator includes the ability to enter up to three expirations in bars and each expirations current implied volatility 
By ascertaining the various historical levels of volatility corresponding to a given time horizon for the options futures under consideration, we’re better prepared to judge the relative "cheapness" or "expensiveness" of the instrument.
 Volatility options 
 Close-to-Close 
Close-to-Close volatility is a classic and most commonly used volatility measure, sometimes referred to as historical volatility .
Volatility is an indicator of the speed of a stock price change. A stock with high volatility is one where the price changes rapidly and with a bigger amplitude. The more volatile a stock is, the riskier it is.
Close-to-close historical volatility calculated using only stock's closing prices. It is the simplest volatility estimator. But in many cases, it is not precise enough. Stock prices could jump considerably during a trading session, and return to the open value at the end. That means that a big amount of price information is not taken into account by close-to-close volatility .
Despite its drawbacks, Close-to-Close volatility is still useful in cases where the instrument doesn't have intraday prices. For example, mutual funds calculate their net asset values daily or weekly, and thus their prices are not suitable for more sophisticated volatility estimators.
 Parkinson 
Parkinson volatility is a volatility measure that uses the stock’s high and low price of the day.
The main difference between regular volatility and Parkinson volatility is that the latter uses high and low prices for a day, rather than only the closing price. That is useful as close to close prices could show little difference while large price movements could have happened during the day. Thus Parkinson's volatility is considered to be more precise and requires less data for calculation than the close-close volatility. One drawback of this estimator is that it doesn't take into account price movements after market close. Hence it systematically undervalues volatility.  That drawback is taken into account in the Garman-Klass's volatility estimator.
 Garman-Klass 
Garman Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing price. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change is a process of continuous diffusion (geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremums.
Researchers Rogers and Satchel have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
 Rogers-Satchell 
Rogers-Satchell is an estimator for measuring the volatility of securities with an average return not equal to zero.
Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates drift term (mean return not equal to zero). As a result, it provides a better volatility estimation when the underlying is trending.
The main disadvantage of this method is that it does not take into account price movements between trading sessions. It means an underestimation of volatility since price jumps periodically occur in the market precisely at the moments between sessions.
A more comprehensive estimator that also considers the gaps between sessions was developed based on the Rogers-Satchel formula in the 2000s by Yang-Zhang. See Yang Zhang Volatility for more detail.
 Yang-Zhang 
Yang Zhang is a historical volatility estimator that handles both opening jumps and the drift and has a minimum estimation error.
We can think of the Yang-Zhang volatility as the combination of the overnight (close-to-open volatility ) and a weighted average of the Rogers-Satchell volatility and the day’s open-to-close volatility . It considered being 14 times more efficient than the close-to-close estimator.
 Garman-Klass-Yang-Zhang 
Garman Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing price. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change is a process of continuous diffusion (geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremums.
Researchers Rogers and Satchel have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
 Exponential Weighted Moving Average 
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, the main applications being technical analysis and volatility modeling.
The moving average is designed as such that older observations are given lower weights. The weights fall exponentially as the data point gets older – hence the name exponentially weighted.
The only decision a user of the EWMA must make is the parameter lambda. The parameter decides how important the current observation is in the calculation of the EWMA. The higher the value of lambda, the more closely the EWMA tracks the original time series.
 Standard Deviation of Log Returns 
This is the simplest calculation of volatility . It's the standard deviation of ln(close/close(1))
 Sampling periods used 
5, 10, 20, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, and 360
 Historical Volatility plot 
Purple outer lines: High and low volatility values corresponding to x-axis time
Blue inner lines: 25th and 75th percentiles of volatility corresponding to x-axis time 
Green line: Median volatility values corresponding to x-axis time
White dashed line: Realized volatility corresponding to x-axis time
 Additional things to know 
Due to UI constraints on TradingView it will be easier to visualize this indicator by double-clicking the bottom pane where it appears and then expanded the y- and x-axis to view the entire chart. 
You can click on each point on the graph to see what the volatility of that point is. 
Option expiration dates will show up as large dots on the graph. You can input your own values in the settings.
Black Scholes Option Pricing Model w/ Greeks [Loxx]The Black Scholes Merton model 
If you are new to options I strongly advise you to profit from  Robert Shiller's lecture on same . It combines practical market insights with a strong authoritative grasp of key models in option theory. He explains many of the areas covered below and in the following pages with a lot intuition and relatable anecdotage. We start here with Black Scholes Merton which is probably the most popular option pricing framework, due largely to its simplicity and ease in terms of implementation. The closed-form solution is efficient in terms of speed and always compares favorably relative to any numerical technique.  The Black–Scholes–Merton model  is a mathematical go-to model for estimating the value of European calls and puts. In the early 1970’s, Myron Scholes, and Fisher Black made an important breakthrough in the pricing of complex financial instruments. Robert Merton simultaneously was working on the same problem and applied the term Black-Scholes model to describe new generation of pricing. The Black Scholes (1973) contribution developed insights originally proposed by Bachelier 70 years before. In 1997, Myron Scholes and Robert Merton received the Nobel Prize for Economics. Tragically, Fisher Black died in 1995. The Black–Scholes formula presents a theoretical estimate (or model estimate) of the price of European-style options independently of the risk of the underlying security. Future payoffs from options can be discounted using the risk-neutral rate. Earlier academic work on options (e.g., Malkiel and Quandt 1968, 1969) had contemplated using either empirical, econometric analyses or elaborate theoretical models that possessed parameters whose values could not be calibrated directly. In contrast, Black, Scholes, and Merton’s parameters were at their core simple and did not involve references to utility or to the shifting risk appetite of investors. Below, we present a standard type formula, where: c = Call option value, p = Put option value, S=Current stock (or other underlying) price, K or X=Strike price, r=Risk-free interest rate, q = dividend yield, T=Time to maturity and N denotes taking the normal cumulative probability. b = (r - q) = cost of carry. (via  VinegarHill-Financelab )
 Things to know 
 
 This can only be used on the daily timeframe
 You must select the option type and the greeks you wish to show
 This indicator is a work in process, functions may be updated in the future. I will also be adding additional greeks as I code them or they become available in finance literature. This indictor contains 18 greeks. Many more will be added later.
 
 Inputs 
 
 Spot price: select from 33 different types of price inputs
 Calculation Steps: how many iterations to be used in the BS model. In practice, this number would be anywhere from 5000 to 15000, for our purposes here, this is limited to 300
 Strike Price: the strike price of the option you're wishing to model
 % Implied Volatility: here you can manually enter implied volatility
 Historical Volatility Period: the input period for historical volatility ; historical volatility isn't used in the BS process, this is to serve as a sort of benchmark for the implied volatility ,
 Historical Volatility Type: choose from various types of implied volatility , search my indicators for details on each of these
 Option Base Currency: this is to calculate the risk-free rate, this is used if you wish to automatically calculate the risk-free rate instead of using the manual input. this uses the 10 year bold yield of the corresponding country
 % Manual Risk-free Rate: here you can manually enter the risk-free rate
 Use manual input for Risk-free Rate? : choose manual or automatic for risk-free rate
 % Manual Yearly Dividend Yield: here you can manually enter the yearly dividend yield
 Adjust for Dividends?: choose if you even want to use use dividends
 Automatically Calculate Yearly Dividend Yield? choose if you want to use automatic vs manual dividend yield calculation
 Time Now Type: choose how you want to calculate time right now, see the tool tip
 Days in Year: choose how many days in the year, 365 for all days, 252 for trading days, etc
 Hours Per Day: how many hours per day? 24, 8 working hours, or 6.5 trading hours
 Expiry date settings: here you can specify the exact time the option expires
 
 The Black Scholes Greeks 
The Option Greek formulae express the change in the option price with respect to a parameter change taking as fixed all the other inputs. ( Haug explores multiple  parameter changes at once .) One significant use of Greek measures is to calibrate risk exposure. A market-making financial institution with a portfolio of options, for instance, would want a snap shot of its exposure to asset price, interest rates, dividend fluctuations. It would try to establish impacts of volatility and time decay. In the formulae below, the Greeks merely evaluate change to only one input at a time. In reality, we might expect a conflagration of changes in interest rates and stock prices etc. (via  VigengarHill-Financelab )
 First-order Greeks 
 Delta:   Delta measures the rate of change of the theoretical option value with respect to changes in the underlying asset's price. Delta is the first derivative of the value 
 Vega:   Vegameasures sensitivity to volatility. Vega is the derivative of the option value with respect to the volatility of the underlying asset.
 Theta:  Theta measures the sensitivity of the value of the derivative to the passage of time (see Option time value): the "time decay."
 Rho:   Rho measures sensitivity to the interest rate: it is the derivative of the option value with respect to the risk free interest rate (for the relevant outstanding term).
 Lambda:   Lambda, Omega, or elasticity is the percentage change in option value per percentage change in the underlying price, a measure of leverage, sometimes called gearing.
 Epsilon:   Epsilon, also known as psi, is the percentage change in option value per percentage change in the underlying dividend yield, a measure of the dividend risk. The dividend yield impact is in practice determined using a 10% increase in those yields. Obviously, this sensitivity can only be applied to derivative instruments of equity products.
 Second-order Greeks 
 Gamma:   Measures the rate of change in the delta with respect to changes in the underlying price. Gamma is the second derivative of the value function with respect to the underlying price.
 Vanna:   Vanna, also referred to as DvegaDspot and DdeltaDvol, is a second order derivative of the option value, once to the underlying spot price and once to volatility. It is mathematically equivalent to DdeltaDvol, the sensitivity of the option delta with respect to change in volatility; or alternatively, the partial of vega with respect to the underlying instrument's price. Vanna can be a useful sensitivity to monitor when maintaining a delta- or vega-hedged portfolio as vanna will help the trader to anticipate changes to the effectiveness of a delta-hedge as volatility changes or the effectiveness of a vega-hedge against change in the underlying spot price.
 Charm:   Charm or delta decay  measures the instantaneous rate of change of delta over the passage of time.
 Vomma:   Vomma, volga, vega convexity, or DvegaDvol measures second order sensitivity to volatility. Vomma is the second derivative of the option value with respect to the volatility, or, stated another way, vomma measures the rate of change to vega as volatility changes.
 Veta:   Veta or DvegaDtime measures the rate of change in the vega with respect to the passage of time. Veta is the second derivative of the value function; once to volatility and once to time.
 Vera:  Vera (sometimes rhova) measures the rate of change in rho with respect to volatility. Vera is the second derivative of the value function; once to volatility and once to interest rate.
 Third-order Greeks 
 Speed:   Speed measures the rate of change in Gamma with respect to changes in the underlying price.
 Zomma:   Zomma measures the rate of change of gamma with respect to changes in volatility.
 Color:   Color, gamma decay or DgammaDtime measures the rate of change of gamma over the passage of time.
 Ultima:   Ultima measures the sensitivity of the option vomma with respect to change in volatility.
 Dual Delta:   Dual Delta determines how the option price changes in relation to the change in the option strike price; it is the first derivative of the option price relative to the option strike price
 Dual Gamma:  Dual Gamma determines by how much the coefficient will changedual delta when the option strike price changes; it is the second derivative of the option price relative to the option strike price.
 Related Indicators 
 Cox-Ross-Rubinstein Binomial Tree Options Pricing Model  
  
 Implied Volatility Estimator using Black Scholes  
  
 Boyle Trinomial Options Pricing Model  
 






















