SegaRKO

Black-Scholes Model for American Options

SegaRKO Aktualisiert   
This model uses Black's Approximation to price American Options. Black's Approximation is an extension of the traditional Black-Scholes model that allows the price of American Options to be approximated within the Black-Scholes Framework. This is necessary because the traditional Black-Scholes model only works on options that are exercised at expiry, not before; like American Options can be.

Black's Approximation approximates the value of an American option by:

1st. Calculating the theoretical price of a european call or put based on the strike price (K), spot price (S), annual return (sigma), time until expiry (T), times until the next 2 ex-dividend dates (t1 & t2), and the dividend paid out at times t1 and t2 (D1 and D2).

2nd. The theoretical price of an option expiring on the second ex-dividend date (t2) is calculated. This replicates exercising the option early.

3rd. Finally, the highest price of the two theoretical prices calculated in steps 1 & 2 is chosen as the approximated price.

How to use this:

1st. Input your strike price.
2nd. Input the risk-free-rate of the currency the option is based in.
3rd. Input the dividend yield for the next ex-dividend date. For example AAPL's dividend yield is 0.82 and will be paid out on August 7,2020.
4th. Input the time until the next ex-dividend date. For example AAPL's next ex-dividend date is August 7,2020, which is 61 days away. So you'd input 61 (this includes weekends and holidays).
5th. Input the dividend yield for the ex-dividend date after the next one. For example AAPL's dividend yield after the next one is 0.82 and will be paid out on November 6, 2020.
6th. Input the time until the next furthest ex-dividend date. For example AAPL's next ex-dividend date after Aug 7th, is on November 6, 2020, which is 152 days away. So you'd input 152 (this includes weekends and holidays).
7th. Input your time until expiry. You can do so in terms of days, hours, and minutes.
8th. Input your chart time-frame in term of minutes. For example, if you're using the 1 min time-frame enter 1, 4hr time-frame enter 480, daily time-frame enter 1440.
9th. Lastly, pick what type of option you want data for: Long Call or Long Put.

*Disclaimer, because Black's Approximation is mostly geared towards stocks, this will only work for stocks. Also, the time variables: time until expiry and time until the ex-dividend dates; don't automatically update. So you will have to update them each day.
Versionshinweise:
This new update utilizes an actual cumulative distribution function rather than the many if statements that the previous version used. This makes the code more succinct and accurate. Additionally, this update allows you to choose the currency that the option is denominated in from the drop down menu provided. Once chosen, the model will input the risk free rate of that currency for you. Lastly, in this update to make the model more accurate you need to input the implied volatility yourself.
Versionshinweise:
Fixed error in cumulative and probability distribution functions. Also, fixed the calculation of pi.
Versionshinweise:
Optimized pi calculation.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?