loxx

Modified Bachelier Option Pricing Model w/ Num. Greeks [Loxx]

loxx Mis à jour   
Modified Bachelier Option Pricing Model w/ Num. Greeks is an adaptation of the Modified Bachelier Option Pricing Model in Pine Script. The following information is an except from Espen Gaarder Haug's book "Option Pricing Formulas".

Before Black Scholes Merton
The curious reader may be asking how people priced options before the BSM breakthrough was published in 1973. This section offers a quick overview of some of the most important precursors to the BSM model. As early as 1900, Louis Bachelier published his now famous work on option pricing. In contrast to Black, Scholes, and Merton, Bachelier assumed a normal distribution for the asset price—in other words, an arithmetic Brownian motion process:

dS = sigma * dz

Where S is the asset price and dz is a Wiener process. This implies a positive probability for observing a negative asset price—a feature that is not popular for stocks and any other asset with limited liability features.

The current call price is the expected price at expiration. This argument yields:

c = (S - X)*N(d1) + v * T^0.5 * n(d1)

and for a put option we get

p = (S - X)*N(-d1) + v * T^0.5 * n(d1)

where

d1 = (S - X) / (v * T^0.5)

Modified Bachelier Model
By using the arguments of BSM but now with arithmetic Brownian motion (normal distributed stock price), we can easily correct the Bachelier model to take into account the time value of money in a risk-neutral world. This yields:

c = S * N(d1) - Xe^-rT * N(d1) + v * T^0.5 * n(d1)

p = Xe^-rT * N(-d1) - S * N(-d1) + v * T^0.5 * n(d1)

d1 = (S - X) / (v * T^0.5)

Inputs
S = Stock price.
X = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
v = Volatility of the underlying asset price
cnd (x) = The cumulative normal distribution function
nd(x) = The standard normal density function

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
  • Volatility for this model is price, so dollars or whatever currency you're using. Historical volatility is also reported in currency.
  • There is no dividend adjustment input
  • Only works on the daily timeframe and for the current source price.
Notes de version:
fixed errors

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?