Black-Scholes in Python: Option Pricing Made Easy
Vložit
- čas přidán 31. 05. 2024
- Unlock the power of the Black-Scholes model with this easy-to-follow Python tutorial. Starting with importing essential libraries, we'll walk you through defining variables, calculating d1, d2, and deriving both call and put option prices. By 9:41, we deep dive into the intuition behind the Black-Scholes pricing formula. Perfect for finance enthusiasts looking to sharpen their Python skills and understand option pricing!
💻 Free Code Here: ryanoconnellfinance.com/step-...
🎓 Tutor With Me: 1-On-1 Video Call Sessions Available
► Join me for personalized finance tutoring tailored to your goals: ryanoconnellfinance.com/finance-tutoring/
👨💼 My Freelance Financial Modeling Services:
► Custom financial modeling solutions tailored for your needs: ryanoconnellfinance.com/freelance-finance-services/
📚 CFA Exam Prep Discount - AnalystPrep:
► Get 20% off CFA Level 1, 2, and 3 complete courses with promo code "RYAN20". Explore here: analystprep.com/shop/all-3-levels-of-the-cfa-exam-complete-course-by-analystprep/?ref=mgmymmr
📘 FRM Exam Prep Discount - AnalystPrep:
► Get 20% off FRM Part 1 and Part 2 complete courses with promo code "RYAN20". Explore here: analystprep.com/shop/frm-part-1-and-part-2-com
Chapters:
0:00 - Import the Neccessary Libraries
1:07 - Define the Variables
3:11 - Calculate d1
4:36 - Calculate d2
4:50 - Calculate Call Option Price
7:29 - Calculate Put Option Price
9:41 - Making Sense of the Black Scholes Pricing Model
Disclosure: This is not financial advice and should not be taken as such. The information contained in this video is an opinion. Some of the information could be wrong. This channel is owned and operated by Portfolio Constructs LLC. Some of the links above are affiliate links, meaning, at no additional cost to you, I will earn a commission if you click through and make a purchase.
💻 Free Code Here: ryanoconnellfinance.com/step-by-step-guide-implementing-the-black-scholes-model-in-python/
🎓 Tutor With Me: 1-On-1 Video Call Sessions Available
► Join me for personalized finance tutoring tailored to your goals: ryanoconnellfinance.com/finance-tutoring/
Back in the 90s, I had a fellow classmate get a job at a top ten trading firm on the back of his excel sheet that priced options and had some innovative inputs.... skew etc....
Wow! That makes it sound like the standards were quite a bit lower back then. Although, if the inputs were truly innovative then it makes perfect sense
Thank you so much for your video. It would be great if you launch any video about volatility calculation. Thanks again
Its my pleasure! I can look into creating a video on option volatility in the future
Amazing!! Thank you very much 🙏
You're most welcome!
Thanks Ryan! I really enjoyed this video! I was looking for videos on CFA course content application in Python and I stumbled across yours! Looking forward to more videos from you!
Awesome, glad you stumbled across my channel! Out of curiosity, what phrase did you search that brought you here?
@@RyanOConnellCFA I searched "cfa python". But before that, I was watching popular CZcams videos dealing with Python fundamentals and I was unable to stay on track because the content was not relatable (I will be writing the CFA Level 2 exam soon). I searched "cfa python" on the search bar and I came across your channel! I'm so glad I did.
I'm now your subscriber! 😄
are you able to use this formula to figure out what the call and put premium can be in the following 1 or 2 weeks as apposed to half a year ?
Absolutely! You would just change the time component of the variable
Thanks a lot bro :)
You're welcome!
Does it work on only european style options or american options?
Hey there. Unfortunately, the Black-Scholes model assumes that options can only be exercised at expiration, which aligns with the characteristics of European options, but does not work for American options. The Binomial Option Pricing Model works for American Options which I have a video on here: czcams.com/video/AukJ1gDeErw/video.html
Ryan, hi! Thank you for defining Nd2, it makes it much easier to understand the whole concept! But could you please define Nd1 in realtion to the underlying price? Why would S be subject to any volatility, if it's a set price right at the start of the contract? Also, going back to your previous video, is binomial model more precise/more widely used in real life? BS model has a lot of crude assumptions. Or it depends on cost/benefit of using each particular approach (BSOP vs binomial)?
Hello! The expression N(d1) * S is related to the probability of outcomes that could occur for the underlying stock price based on the volatility of the stock. N(d1) is the hardest part of the Black Scholes model to define. If you Google what N(d1) is, you will see endless debates of people arguing over how to interpret it in forums lol. S (the underlying's stock price) is absolutely subject to volatility because there is a wide array of possible outcomes that that price could eventually become by the time the call expires. You need to think of it as the stock price when the option expires.
As for the question related to the Black Scholes model vs the binomial option pricing model, both models are widely used, but the context matters:
For European options or situations requiring quick calculations, the Black-Scholes model might be preferred.
For American options or when needing to account for dividends, changing interest rates, or other complexities, the binomial model might be more suitable.
@@RyanOConnellCFA well thank you, you were very quick to respond) appreciate your help, mister)
@@RyanOConnellCFA i guess, BSOP is like a wobbly sausage, it just jiggles, and you dont really know how it's gonna end up....
@@victoricus1 Hahah that is a great way to put it! 😂
Question am not smart. How can i use this if any when it comes to OPTIONS SELLING?
Hi @miguelteran-raful2718, great question! While the Black-Scholes model is more commonly used for pricing options rather than directly for options selling strategies, understanding how it works can still be valuable. It can help you better estimate option prices and grasp the key factors driving those prices, like time to expiration, underlying price, and implied volatility. This knowledge can inform your decisions around which options to sell, when, and at what price. But don't worry if some of the math is tricky - focus on the core concepts and how you can apply them practically in your options selling.
volatility is not standard deviation of stock prices .. it is the annualized standard deviation for stock price returns
Correct, my mistake if led anyone to believe otherwise
@@RyanOConnellCFA Mostly people are not looking for to learn about Volatility here.. its just my nitpick when you said "Vol standard deviation of ... stock prices"
@@cybrainx72 Sure thing, I meant to say standard deviation of returns. Good catch
@@RyanOConnellCFA Sorry to nitpick again.. again i think you got it wrong or incomplete. The keyword you are missing is "annualized".. for example if you get standard deviation of daily return.. you would need to multiply by sqrt(252) to get annualized volatility. Annualized volatility is the one used in Black Scholes
Which laptop do you use?
Hey! I actually use a desktop (not a laptop) that I built myself with custom components. This is best for me because as my needs change I can just swap out certain parts rather than buying a whole new computer
1:00