Moving Averages SelectionHello everyone, I present my first script. In it I collect a group of fully configurable moving averages, both in color, value and selection of the ones we want to observe.
The moving averages I collect are 3 of each of the following types:
EMA: An exponential moving average ( EMA ) is a type of moving average (MA) that places a greater weight and significance on the most recent data points.
SMA: It is simply the average price over the specified period. The average is called "moving" because it is plotted on the chart bar by bar, forming a line that moves along the chart as the average value changes.
HMA: The Hull Moving Average ( HMA ) attempts to minimize the lag of a traditional moving average while retaining the smoothness of the moving average line. Developed by Alan Hull in 2005, this indicator makes use of weighted moving averages to prioritize more recent values and greatly reduce lag.
RMA: The Rolling Moving Average, sometimes referred to as "Smoothed Moving Average", gives the recent prices most weighting, though the historic prices are also weighted, each given less weighting further back in time.
WMA: The weighted moving average ( WMA ) is a technical indicator that traders use to generate trade direction and make a buy or sell decision. It assigns greater weighting to recent data points and less weighting on past data points.
I am open to any opinion and advice for improvement, greetings, I hope you find it useful :)
Options
LazyScalp BoardThis indicator allows you to quickly view all important parameters in the table.
The table consists of a daily volume indicator, an average volume for a certain period, a volatility indicator (normalized ATR) and a correlation coefficient.
All parameters can be flexibly customized. You can also customize the table display, styles, and more.
This indicator is primarily useful for intraday traders and scalpers to quickly select an instrument to trade.
Higher Time Frame Average True RangesPurpose: This script will help an options trader asses risk and determine good entry and exit strategies
Background Information: The true range is the greatest of: current high minus the current low; the absolute value of the current high minus the previous close; and the absolute value of the current low minus the previous close. The Average True Range (ATR) is a 14-day moving average of the true range. Traders use the ATR indicator to assess volatility in stocks and decide when to enter and exit trades. It is important to note the limitations of using True Range and ATR: These indications cannot tell you the direction of your options trade (call vs. put) and they cannot tell you whether a particular trend is about to reverse. However, it can be used to assess if volatility has peaked for a particular direction and time period.
How this script works: This indicator calculates true range for the daily (DTR), weekly (WTR), and monthly (MTR) time frames and compares it to the Average True Range (ATR) for each of those time frames (DATR, WATR, and MATR). The comparison is displayed into a colored table in the upper right-hand corner of the screen. When a daily, weekly, or monthly true range reaches 80% of its respective ATR, the row for that time frame will turn Orange indicating medium risk for staying in the trade. If the true range goes above 100% of the respective ATR, then the row will turn Red indicating high risk for staying in the trade. When the row for a time period turns red, volatility for the time period has likely peaked and traders should heavily consider taking profits. It is important to note these calculations start at different times for each time frame: Daily (Today’s Open), Weekly (Monday’s Open), Monthly (First of the Month’s Open). This means if it’s the 15th of the month then the Monthly True Range is being calculated for the trading days in the first half of the month (approximately 10 trade days).
The script also plots three sets of horizontal dotted lines to visually represent the ATR for each time period. Each set is generated by adding and subtracting the daily, weekly, and monthly ATRs from that time periods open price. For example, the weekly ATR is added and subtracted from Mondays open price to visually represent the true range for that week. The DATR is represented by red lines, the WATR is represented by the green lines, and the MATR is represented by the blue lines. These plots could also be used to assess risk as well.
How to use this script: Use the table to assess risk and determine potential exit strategies (Green=Low Risk, Orange=Medium Risk, Red=High Risk. Use the dotted lines to speculate what a stock’s price could be in a given time period (Daily=Red, Weekly=Green, and Monthly=Blue). And don’t forget the true range’s calculation and plots starts at the beginning of each time period!
Reset Strike Options-Type 2 (Gray Whaley) [Loxx]For a reset option type 2, the strike is reset in a similar way as a reset option 1. That is, the strike is reset to the asset price at a predetermined future time, if the asset price is below (above) the initial strike price for a call (put). The payoff for such a reset call is max(S - X, 0), and max(X - S, 0) for a put, where X is equal to the original strike X if not reset, and equal to the reset strike if reset. Gray and Whaley (1999) have derived a closed-form solution for the price of European reset strike options. The price of the call option is then given by (via "The Complete Guide to Option Pricing Formulas")
c = Se^(b-r)T2 * M(a1, y1; p) - Xe^(-rT2) * M(a2, y2; p) - Se^(b-r)T1 * N(-a1) * N(z2) * e^-r(T2-T1) + Se^(b-r)T2 * N(-a1) * N(z1)
p = Se^(b-r)T1 * N(a1) * N(-z2) * e^-r(T2-T1) + Se^(b-r)T2 * N(a1) * N(-z1) + Xe^(-rT2) * M(-a2, -y2; p) - Se^(b-r)T2 * M(-a1, -y1; p)
where b is the cost-of-carry of the underlying asset, a is the volatility of the relative price changes in the asset, and r is the risk-free interest rate. K is the strike price of the option, T1 the time to reset (in years), and T2 is its time to expiration. N(x) and M(a,b; p) are, respectively, the univariate and bivariate cumulative normal distribution functions. Further
a1 = (log(S/X) + (b+v^2/2)T1) / v*T1^0.5 ... a2 = a1 - v*T1^0.5
z1 = ((b+v^2/2)(T2-T1)) / v*(T2-T1)^0.5 ... z2 = z1 - v*(T2-T1)^0.5
y1 = (log(S/X) + (b+v^2/2)T1) / v*T1^0.5 ... y2 = a1 - v*T1^0.5
and p = (T1/T2)^0.5. For reset options with multiple reset rights, see Dai, Kwok, and Wu (2003) and Liao and Wang (2003).
Inputs
Asset price ( S )
Strike price ( K )
Reset time ( T1 )
Time to maturity ( T2 )
Risk-free rate ( r )
Cost of carry ( b )
Volatility ( s )
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
Numerical Greeks Outputs
Delta D
Elasticity L
Gamma G
DGammaDvol
GammaP G
Vega
DvegaDvol
VegaP
Theta Q (1 day)
Rho r
Rho futures option r
Phi/Rho2
Carry
DDeltaDvol
Speed
Strike Delta
Strike gamma
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
Writer Extendible Option [Loxx]These options can be exercised at their initial maturity date /I but are extended to T2 if the option is out-of-the-money at ti. The payoff from a writer-extendible call option at time T1 (T1 < T2) is (via "The Complete Guide to Option Pricing Formulas")
c(S, X1, X2, t1, T2) = (S - X1) if S>= X1 else cBSM(S, X2, T2-T1)
and for a writer-extendible put is
c(S, X1, X2, T1, T2) = (X1 - S) if S< X1 else pBSM(S, X2, T2-T1)
Writer-Extendible Call
c = cBSM(S, X1, T1) + Se^(b-r)T2 * M(Z1, -Z2; -p) - X2e^-rT2 * M(Z1 - vT^0.5, -Z2 + vT^0.5; -p)
Writer-Extendible Put
p = cBSM(S, X1, T1) + X2e^-rT2 * M(-Z1 + vT^0.5, Z2 - vT^0.5; -p) - Se^(b-r)T2 * M(-Z1, Z2; -p)
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
Asset price ( S )
Initial strike price ( X1 )
Extended strike price ( X2 )
Initial time to maturity ( t1 )
Extended time to maturity ( T2 )
Risk-free rate ( r )
Cost of carry ( b )
Volatility ( s )
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
Numerical Greeks Output
Delta
Elasticity
Gamma
DGammaDvol
GammaP
Vega
DvegaDvol
VegaP
Theta (1 day)
Rho
Rho futures option
Phi/Rho2
Carry
DDeltaDvol
Speed
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
Reset Strike Options-Type 1 [Loxx]In a reset call (put) option, the strike is reset to the asset price at a predetermined future time, if the asset price is below (above) the initial strike price. This makes the strike path-dependent. The payoff for a call at maturity is equal to max((S-X)/X, 0) where is equal to the original strike X if not reset, and equal to the reset strike if reset. Similarly, for a put, the payoff is max((X-S)/X, 0) Gray and Whaley (1997) x have derived a closed-form solution for such an option. For a call, we have
c = e^(b-r)(T2-T1) * N(-a2) * N(z1) * e^(-rt1) - e^(-rT2) * N(-a2)*N(z2) - e^(-rT2) * M(a2, y2; p) + (S/X) * e^(b-r)T2 * M(a1, y1; p)
and for a put,
p = e^(-rT2) * N(a2) * N(-z2) - e^(b-r)(T2-T1) * N(a2) * N(-z1) * e^(-rT1) + e^(-rT2) * M(-a2, -y2; p) - (S/X) * e^(b-r)T2 * M(-a1, -y1; p)
where b is the cost-of-carry of the underlying asset, a is the volatil- ity of the relative price changes in the asset, and r is the risk-free interest rate. X is the strike price of the option, r the time to reset (in years), and T is its time to expiration. N(x) and M(a, b; p) are, respec- tively, the univariate and bivariate cumulative normal distribution functions. The remaining parameters are p = (T1/T2)^0.5 and
a1 = (log(S/X) + (b+v^2/2)T1) / vT1^0.5 ... a2 = a1 - vT1^0.5
z1 = (b+v^2/2)(T2-T1)/v(T2-T1)^0.5 ... z2 = z1 - v(T2-T1)^0.5
y1 = log(S/X) + (b+v^2)T2 / vT2^0.5 ... y2 = y1 - vT2^0.5
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
Asset price ( S )
Initial strike price ( X1 )
Extended strike price ( X2 )
Initial time to maturity ( t1 )
Extended time to maturity ( T2 )
Risk-free rate ( r )
Cost of carry ( b )
Volatility ( s )
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
Numerical Greeks Ouput
Delta
Elasticity
Gamma
DGammaDvol
GammaP
Vega
DvegaDvol
VegaP
Theta (1 day)
Rho
Rho futures option
Phi/Rho2
Carry
DDeltaDvol
Speed
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
Fade-in Options [Loxx]A fade-in call has the same payoff as a standard call except the size of the payoff is weighted by how many fixings the asset price were inside a predefined range (L, U). If the asset price is inside the range for every fixing, the payoff will be identical to a plain vanilla option. More precisely, for a call option, the payoff will be max(S(T) - X, 0) X 1/n Sum(n(i)), where n is the total number of fixings and n(i) = 1 if at fixing i the asset price is inside the range, and n(i) = 0 otherwise. Similarly, for a put, the payoff is max(X - S(T), 0) X 1/n Sum(n(i)).
Brockhaus, Ferraris, Gallus, Long, Martin, and Overhaus (1999) describe a closed-form formula for fade-in options. For a call the value is given by
max(X - S(T), 0) X 1/n Sum(n(i))
describe a closed-form formula for fade-in options. For a call the value is given by
c = 1/n * Sum(S^((b-r)*T) * (M(-d5, d1; -p) - M(-d3, d1; -p)) - Xe^(-rT) * (M(-d6, d2; -p) - M(-d4, d2; -p))
where n is the number of fixings, p = (t1^0.5/T^0.5), t1 = iT/n
d1 = (log(S/X) + (b + v^2/2)*T) / (v * T^0.5) ... d2 = d1 - v*T^0.5
d3 = (log(S/L) + (b + v^2/2)*t1) / (v * t1^0.5) ... d4 = d3 - v*t1^0.5
d5 = (log(S/U) + (b + v^2/2)*t1) / (v * t1^0.5) ... d6 = d5 - v*t1^0.5
The value of a put is similarly
p = 1/n * Sum(Xe^(-rT) * (M(-d6, -d2; -p) - M(-d4, -d2; -p))) - S^((b-r)*T) * (M(-d5, -d1; -p) - M(-d3, -d1; -p)
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
Asset price ( S )
Strike price ( K )
Lower barrier ( L )
Upper barrier ( U )
Time to maturity ( T )
Risk-free rate ( r )
Cost of carry ( b )
Volatility ( s )
Fixings ( n )
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
cbnd3() = Cumulative Bivariate Distribution
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Log Contract Ln(S/X) [Loxx]A log contract, first introduced by Neuberger (1994) and Neuberger (1996), is not strictly an option. It is, however, an important building block in volatility derivatives (see Chapter 6 as well as Demeterfi, Derman, Kamal, and Zou, 1999). The payoff from a log contract at maturity T is simply the natural logarithm of the underlying asset divided by the strike price, ln(S/ X). The payoff is thus nonlinear and has many similarities with options. The value of this contract is (via "The Complete Guide to Option Pricing Formulas")
L = e^(-r * T) * (log(S/X) + (b-v^2/2)*T)
The delta of a log contract is
delta = (e^(-r*T) / S)
and the gamma is
gamma = (e^(-r*T) / S^2)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Log Option [Loxx]A log option introduced by Wilmott (2000) has a payoff at maturity equal to max(log(S/X), 0), which is basically an option on the rate of return on the underlying asset with strike log(X). The value of a log option is given by: (via "The Complete Guide to Option Pricing Formulas")
e^−rT * n(d2)σ√(T − t) + e^−rT*(log(S/K) + (b −σ^2/2)T) * N(d2)
where N(*) is the cumulative normal distribution function, n(*) is the normal density function, and
d = ((log(S/X) + (b - v^2/2)*T) / (v*T^0.5)
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Log Contract Ln(S) [Loxx]A log contract, first introduced by Neuberger (1994) and Neuberger (1996), is not strictly an option. It is, however, an important building block in volatility derivatives (see Chapter 6 as well as Demeterfi, Derman, Kamal, and Zou, 1999). The payoff from a log contract at maturity T is simply the natural logarithm of the underlying asset divided by the strike price, ln(S/ X). The payoff is thus nonlinear and has many similarities with options. The value of this contract is (via "The Complete Guide to Option Pricing Formulas")
L = e^(-r * T) * (log(S/X) + (b-v^2/2)*T)
The delta of a log contract is
delta = (e^(-r*T) / S)
and the gamma is
gamma = (e^(-r*T) / S^2)
An even simpler version of the log contract is when the payoff simply is ln(S). The payoff is clearly still nonlinear in the underlying asset. It follows that the value of this contract is:
L = e^(-r * T) * (log(S) + (b-v^2/2)*T)
The theta/time decay of a log contract is
theta = - 1/T * v^2
and its exposure to the stock price, delta, is
delta = - 2/T * 1/S
This basically tells you that you need to be long stocks to be delta- neutral at any time. Moreover, the gamma is
gamma = 2 / (T * S^2)
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = volatility of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Powered Option [Loxx]At maturity, a powered call option pays off max(S - X, 0)^i and a put pays off max(X - S, 0)^i . Esser (2003 describes how to value these options (see also Jarrow and Turnbull, 1996, Brockhaus, Ferraris, Gallus, Long, Martin, and Overhaus, 1999). (via "The Complete Guide to Option Pricing Formulas")
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = volatility of the underlying asset price
i = power
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
combin(x) = Combination function, calculates the number of possible combinations for two given numbers
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Capped Standard Power Option [Loxx]Power options can lead to very high leverage and thus entail potentially very large losses for short positions in these options. It is therefore common to cap the payoff. The maximum payoff is set to some predefined level C. The payoff at maturity for a capped power call is min . Esser (2003) gives the closed-form solution: (via "The Complete Guide to Option Pricing Formulas")
c = S^i * (e^((i - 1) * (r + i*v^2 / 2) - i * (r - b))*T) * (N(e1) - N(e3)) - e^(-r*T) * (X*N(e2) - (C + X) * N(e4))
while the value of a put is
e1 = (log(S/X^(1/i)) + (b + (i - 1/2)*v^2)*T) / v*T^0.5
e3 = (log(S/(C + X)^(1/i)) + (b + (i - 1/2)*v^2)*T) / v*T^0.5
e4 = e3 - i * v * T^0.5
In the case of a capped power put, we have
p = e^(-r*T) * (X*N(-e2) - (C + X) * N(-e4)) - S^i * (e^((i - 1) * (r + i*v^2 / 2) - i * (r - b))*T) * (N(-e1) - N(-e3))
where e1 and e2 is as before. e3 and e4 has to be changed to
e3 = (log(S/(X - C)^(1/i)) + (b + (i - 1/2)*v^2)*T) / v*T^0.5
e4 = e3 - i * v * T^0.5
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
i = power
c = Capped on pay off
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Standard Power Option [Loxx]Standard power options (aka asymmetric power options) have nonlinear payoff at maturity. For a call, the payoff is max(S^i - X, 0), and for a put, it is max(X - S^i , 0), where i is some power (i > 0). The value of this power call is given by (see Heynen and Kat, 1996c; Zhang, 1998; and Esser, 2003). (via "The Complete Guide to Option Pricing Formulas")
c = S^i * (e^((i - 1) * (r + i*v^2 / 2) - i * (r - b))*T) * N(d1) - X*e^(-r*T) * N(d2)
while the value of a put is
p = X*e^(-r*T) * N(-d2) - S^i * (e^((i - 1) * (r + i*v^2 / 2) - i * (r - b))*T) * N(-d1)
where
d1 = (log(S/X^(1/i)) + (b + (i - 1/2)*v^2)*T) / v*T^0.5
d2 = d1 - i * v * T^0.5
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
pwr = power
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Power Contract [Loxx]There are two main categories of power options. Standard power options' payoff depends on the price of the underlying asset raised to some power. For powered options, the "standard" payoff (stock price in excess of the exercise price) is raised to some power.
A power contract is a simple derivative instrument paying (S/ X)^i at maturity, where i is some fixed power. The value of such a power contract is given by Shaw (1998) as: (via "The Complete Guide to Option Pricing Formulas")
VPower = (S/X)^i * e^((b-v^2)/2)*i - r + i^2 * v^2/2)*T
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
lambda = Jump rate per year
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Moneyness Options [Loxx]A moneyness option is basically a plain vanilla option where the strike is set to a percentage of the future/forward price. For example, a 120% moneyness call would have a strike equal to 120% of the forward price. A 120% moneyness put would have a spot equal to 120% of the strike. The value of this option is given in percent of the forward. The value of a moneyness call or put is thus given by: (via "The Complete Guide to Option Pricing Formulas")
c = p = c^-rT * (N(d1) - LN(d2))
where L = X/F for a call and L = F/X for a put, and
d1 = (-log(L) + v^2*T/2) / (v*T^0.5)
d2 = d1 - (v*T^0.5)
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
lambda = Jump rate per year
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Forward Start Options [Loxx]A forward start option with time to maturity T starts at-the-money or proportionally in- or out-of-the-money after a known elapsed time t in the future. The strike is set equal to a positive constant a times the asset price S after the known time t. If a is less than unity, the call (put) will start 1 - a percent in-the-money (out-of-the- money); if a is unity, the option will start at-the-money; and if a is larger than unity, the call (put) will start a - 1 percentage out-of-the- money (in-the-money).A forward start option can be priced using the Rubinstein (1990) formula: (via "The Complete Guide to Option Pricing Formulas")
c = S*e^(b-r)t * (e^(b-r)(T-t) * N(d1)) - alpha * e^-r(T-t) * N(d2))
p = S*e^(b-r)t * (alpha*e^r(T-t) * N(-d2)) - e^-(b-r)(T-t) * N(-d1))
where
d1 = (log(1/alpha) + (b + v^2/2)(T-1))/v*(T-t)^0.5
d2 = d1 - v*(T-t)^0.5
Application
Employee options are often of the forward starting type. Ratchet options (aka cliquet options) consist of a series of forward starting options.
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
a = Alpha
T1 = Time to forward start
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
v = volatility of the underlying asset price
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Executive Stock Options [Loxx]The Jennergren and Naslund (1993) formula takes into account that an employee or executive often loses her options if she has to leave the company before the option's expiration: (via "The Complete Guide to Option Pricing Formulas")
c = e^(-lambda*T) * (Se^((b-r)T) * N(d1) - Xe^-rT * N(d2))
p = e^(-lambda*T) * (Xe^(-rT) * N(-d2) - Se^(b-r)T * N(-d1))
where
d1 = (log(S/X) + (b + v^2/2)T) / vT^0.5
d2 = d1 - vT^0.5
lambda is the jump rate per year. The value of the executive option equals the ordinary Black-Scholes option price multiplied by the probability e —AT that the executive will stay with the firm until the option expires.
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
lambda = Jump rate per year
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
Variable Purchase Options [Loxx]Handley (2001) describes how to value variable purchase options (VPO). A VPO is basically a call option, but where the number of underlying shares is stochastic rather than fixed, or more precisely, a deterministic function of the asset price. The strike price of a VPO is typically a fixed discount to the underlying share price at maturity. The payoff at maturity is equal to max , where N is the number of shares. VPOs may be an interesting tool for firms that need to raise capital relatively far into the future at a given time. The number of underlying shares N is decided on at maturity and is equal to
N = X / St(1 -D)
where X is the strike price, ST is the asset price at maturity, and D is the fixed discount expressed as a proportion 0 > D < 1. The number of shares is in this way a deterministic function of the asset price. Further, the number of shares is often subjected to a minimum and maximum. In this case, we will limit the minimum number of shares to Nmin = X / U(1 -D) if, the asset price at maturity is above a predefined level U at maturity. Similarly, we will reach the maximum number of shares A T = x if the stock price at maturity is equal Nmax = X / L(1 -D) or lower than a predefined level L. Based on Handley (2001), we get the following closed-form solution: (via "The Complete Guide to Option Pricing Formulas")
c = XD / 1-D e^-rT + Nmin(Se^(b-r)T * N(d1) - Ue^-rT * N(d2))
- Nmax(Le^-rT * N(-d4) - Se^(b-r)T * N(-d3))
+ Nmax(L(1-D)e^-rT * N(-d6) - Se^(b-r)T * N(-d5))
where
d1 = (log(S/U) + (b+v^2/2)T) / vT^0.5 ... d2 = d1 - vT^0.5
d3 = (log(S/L) + (b+v^2/2)T) / vT^0.5 ... d4 = d3 - vT^0.5
d5 = (log(S/L(1-D)) + (b+v^2/2)T) / vT^0.5 ... d6 = d5 - vT^0.5
Inputs
Asset price (S)
Strike price (K)
Discount %
Lower bound
Upper bound
Time to maturity
Risk-free rate (r) %
Cost of carry (b) %
Volatility (v) %
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
Perpetual American Options [Loxx]Perpetual American Options is Perpetual American Options pricing model. This indicator also includes numerical greeks.
American Perpetual Options
While there in general is no closed-form solution for American options (except for non-dividend-paying stock call options) it is possible to find a closed-form solution for options with an infinite time to expiration. The reason is that the time to expiration will always be the same: infinite. The time to maturity, therefore, does not depend on at what point in time we look at the valuation problem, which makes the valuation problem independent of time McKean (1965) and Merton (1973) gives closed-form solutions for American perpetual options. For a call option we have
c = (X / (y1 - 1)) * ((y1 - 1)/y1 * S/X)^y1
where
y1 = 1/2 - b/v^2 + ((b/v^2 - 1/2)^2 + 2*r/v^2)^0.5
If b >= r, then there is never optimal to exercise a call option. In the case of an American perpetual put, we have
p = X/(1-y2) * (((y2 - 1) / y2) * S/X)^y2
where
y2 = 1/2 - b/v^2 - ((b/v^2 - 1/2)^2 + 2*r/v^2)^0.5
In practice, one can naturally discuss if there is such a thing as infinite time to maturity. For instance, credit risk could play an important role: Even when you are buying an option from an AAA bank, there is no guarantee the bank will be around forever.
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
cbnd3(x) = Cumulative Bivariate Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
American Approximation Bjerksund & Stensland 2002 [Loxx]American Approximation Bjerksund & Stensland 2002 is an American Options pricing model. This indicator also includes numerical greeks. You can compare the output of the American Approximation to the Black-Scholes-Merton value on the output of the options panel.
The Bjerksund & Stensland (2002) Approximation
The Bjerksund and Stensland (2002) approximation divides the time to maturity into two parts, each with a separate flat exercise boundary. It is thus a straightforward generalization of the Bjerksund-Stensland 1993 algorithm. The method is fast and efficient and should be more accurate than the Barone-Adesi and Whaley (1987) and the Bjerksund and Stensland (1993b) approximations. The algorithm requires an accurate cumulative bivariate normal approximation. Several approximations that are described in the literature are not sufficiently accurate, but the Genze algorithm works.
C = alpha2*S^B - alpha2*phi(S, t1, B, I2, I2)
+ phi(S, t1, I2, I2) - phi(S, t1, I, I1, I2)
- X*phi(S, t1, 0, I2, I2) + X*phi(S, t1, 0, I1, I2)
+ alpha1*phi(X, t1, B, I1, I2) - alpha1*psi*St, T, B, I1, I2, I1, t1)
+ psi(S, T, 1, I1, I2, I1, t1) - psi(S, T, 1, X, I2, I1, t1)
- X*psi(S, T, 0, I1, I2, I1, t1) + psi(S, T, 0 ,X, I2, I1, t1)
where
alpha1 = (I1 - X)*I1^-B
alpha2 = (I2 - X)*I2^-B
B = (1/2 - b/v^2) + ((b/v^2 - 1/2)^2 + 2*(r/v^2))^0.5
The function psi(S, T, y, H, I) is given by
psi(S, T, gamma, H, I) = e^lambda * S^gamma * (N(-d) - (I/S)^k * N(-d2))
d = (log(S/H) + (b + (gamma - 1/2) * v^2) * T) / (v * T^0.5)
d2 = (log(I^2/(S*H)) + (b + (gamma - 1/2) * v^2) * T) / (v * T^0.5)
lambda = -r + gamma * b + 1/2 * gamma * (gamma - 1) * v^2
k = 2*b/v^2 + (2 * gamma - 1)
and the trigger price I is defined as
I1 = B0 + (B(+infi) - B0) * (1 - e^h1)
I2 = B0 + (B(+infi) - B0) * (1 - e^h2)
h1 = -(b*t1 + 2*v*t1^0.5) * (X^2 / ((B(+infi) - B0))*B0)
h2 = -(b*T + 2*v*T^0.5) * (X^2 / ((B(+infi) - B0))*B0)
t1 = 1/2 * (5^0.5 - 1) * T
B(+infi) = (B / (B - 1)) * X
B0 = max(X, (r / (r - b)) * X)
Moreover, the function psi(S, T, gamma, H, I2, I1, t1) is given by
psi(S, T, gamma, H, I2, I1, t1, r, b, v) = e^(lambda * T) * S^gamma * (M(-e1, -f1, rho) - (I2/S)^k * M(-e2, -f2, rho)
- (I1/S)^k * M(-e3, -f3, -rho) + (I1/I2)^k * M(-e4, -f4, -rho))
where (see screenshot for e and f values)
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
cbnd3(x) = Cumulative Bivariate Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
American Approximation Bjerksund & Stensland 1993 [Loxx]American Approximation Bjerksund & Stensland 1993 is an American Options pricing model. This indicator also includes numerical greeks. You can compare the output of the American Approximation to the Black-Scholes-Merton value on the output of the options panel.
The Bjerksund and Stensland (1993) approximation can be used to price American options on stocks, futures, and currencies. The method is analytical and extremely computer-efficient. Bjerksund and Stensland's approximation is based on an exercise strategy corresponding to a flat boundary / (trigger price). Numerical investigation indicates that the Bjerksund and Stensland model is somewhat more accurate for long-term options than the Barone-Adesi and Whaley model. (The Complete Guide to Option Pricing Formulas)
C = alpha * X^beta - alpha Ø(S, T, beta, I, I) + Ø(S, T, I, I, I) - Ø(S, T, I, X, I) - XØ(S, T, 0, I, I) + XØ(S, T, 0, X, I)
where
alpha = (1 - X) * I^-beta
beta = (1/2 - b/v^2) + ((b/v^2 - 1/2)^2 + 2*(r/v^2))^0.5
The function Ø(S, T, y, H, I) is given by
Ø(S, T, gamma, H, I) = e^lambda * S^gamma * (N(d) - (I/S)^k * N(d - (2 * log(I/S)) / v*T^0.5))
lambda = (-r + gamma * b + 1/2 * gamma(gamma - 1) * v^2) * T
d = (log(S/H) + (b + (gamma - 1/2) * v^2) * T) / (v * T^0.5)
k = 2*b/v^2 + (2 * gamma - 1)
and the trigger price I is defined as
I = B0 + (B(+infi) - B0) * (1 - e^h(T))
h(T) = -(b*T + 2*v*T^0.5) * (B0 / (B(+infi) - B0))
B(+infi) = (B / (B - 1)) * X
B0 = max(X, (r / (r - b)) * X)
If s > I, it is optimal to exercise the option immediately, and the value must be equal to the intrinsic value of S - X. On the other hand, if b > r, it will never be optimal to exercise the American call option before expiration, and the value can be found using the generalized BSM formula. The value of the American put is given by the Bjerksund and Stensland put-call transformation
P(S, X, T, r, b, v) = C(X, S, T, r -b, -b, v)
where C(*) is the value of the American call with risk-free rate r - b and drift -b. With the use of this transformation, it is not necessary to develop a separate formula for an American put option.
b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
cbnd3(x) = Cumulative Bivariate Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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
American Approximation: Barone-Adesi and Whaley [Loxx]American Approximation: Barone-Adesi and Whaley is an American Options pricing model. This indicator also includes numerical greeks. You can compare the output of the American Approximation to the Black-Scholes-Merton value on the output of the options panel.
An American option can be exercised at any time up to its expiration date. This added freedom complicates the valuation of American options relative to their European counterparts. With a few exceptions, it is not possible to find an exact formula for the value of American options. Several researchers have, however, come up with excellent closed-form approximations. These approximations have become especially popular because they execute quickly on computers compared to numerical techniques. At the end of the chapter, we look at closed-form solutions for perpetual American options.
The Barone-Adesi and Whaley Approximation
The quadratic approximation method by Barone-Adesi and Whaley (1987) can be used to price American call and put options on an underlying asset with cost-of-carry rate b. When b > r, the American call value is equal to the European call value and can then be found by using the generalized Black-Scholes-Merton (BSM) formula. The model is fast and accurate for most practical input values.
American Call
C(S, C, T) = Cbsm(S, X, T) + A2 / (S/S*)^q2 ... when S < S*
C(S, C, T) = S - X ... when S >= S*
where Cbsm(S, X, T) is the general Black-Scholes-Merton call formula, and
A2 = S* / q2 * (1 - e^((b - r) * T)) * N(d1(S*)))
d1(S) = (log(S/X) + (b + v^2/2) * T) / (v * T^0.5)
q2 = (-(N-1) + ((N-1)^2 + 4M/K))^0.5) / 2
M = 2r/v^2
N = 2b/v^2
K = 1 - e^(-r*T)
American Put
P(S, C, T) = Pbsm(S, X, T) + A1 / (S/S**)^q1 ... when S < S**
P(S, C, T) = X - S .... when S >= S**
where Pbsm(S, X, T) is the generalized BSM put option formula, and
A1 = -S** / q1 * (1 - e^((b - r) * T)) * N(-d1(S**)))
q1 = (-(N-1) - ((N-1)^2 + 4M/K))^0.5) / 2
where S* is the critical commodity price for the call option that satisfies
S* - X = c(S*, X, T) + (1 - e^((b - r) * T) * N(d1(S*))) * S* * 1/q2
These equations can be solved by using a Newton-Raphson algorithm. The iterative procedure should continue until the relative absolute error falls within an acceptable tolerance level. See code for details on the Newton-Raphson algorithm.
Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
cnd1(x) = Cumulative Normal Distribution
cbnd3(x) = Cumulative Bivariate Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp) = Rate compounder
Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)
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