SegaRKO

Black-Scholes Model for American Options

SegaRKO 업데이트됨   
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.
릴리즈 노트:
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.
릴리즈 노트:
Fixed error in cumulative and probability distribution functions. Also, fixed the calculation of pi.
릴리즈 노트:
Optimized pi calculation.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?