OPEN-SOURCE SCRIPT

Capped Standard Power Option [Loxx]

Aktualisiert
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[max(S1- X, 0), C]. 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
Versionshinweise
fixed errors
Versionshinweise
fixed errors
blackscholesblackscholesmertonblackscholesoptionpricingcappedstandardpoweroptiongreekshaugHistorical VolatilitynumericalgreeksoptionsVolatility

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: patreon.com/algxtrading/membership
Auch am:

Haftungsausschluss