Assume underlying spot follows Geometric Brownian Motion, i.e.

Let be the call option price. We obtain using Ito Lemma

Construct a delta neutral portfolio (short call option and long underlying), then we have:

If we combine the terms, we will get

Realise is independent of random term , thus portfolio is risk free.

Realise is independent of expected return .

Thus, portfolio should earn the risk free rate of return, i.e.

Therefore, combining with in the previous step, we have below Black-Scholes PDE:

Now we need to solve the above Black-Scholes PDE.

Step 1

Transformation: Let’s introduce new variables , and .

Therefore, the Call option price can be represented using new variables and as .

Now we introduce a new function . We need to find the PDE for where

By Chain rule for partial derivatives, we have:

Now we plug into the Black-Scholes PDE, then we find the PDE for :

Step 2

Transformation to Heat Equation: Let’s introduce a new function . We need to choose constants so that the PDE of is Heat Equation.

Together with the PDE for , we can derive the PDE for :

To be a Heat Equation, we need to force the last two terms be . Thus

Then we have

Step 3

The solution of PDE is given by Green formula as below:

Step 4

We look at the boundary condition .

Then

which can be integrated as below, where is the cumulative distribution function (CDF) for Normal distribution.

Step 5

From the above steps, we have relation

And from Step 4, we know the result of .

Therefore, we derive as

Now we plug in , , , from previous steps. Finally, Call option price can be represented as

where

Python implementation of Black-Scholes formula:

def ncdf(x): """ Cumulative distribution function for the standard normal distribution. Alternatively, we can use below: from scipy.stats import norm norm.cdf(x) """ return (1.0 + math.erf(x / math.sqrt(2.0))) / 2.0 def npdf(x): """ Probability distribution function for the standard normal distribution. Alternatively, we can use below: from scipy.stats import norm norm.pdf(x) """ return np.exp(-np.square(x) / 2) / np.sqrt(2 * np.pi) def blackScholesOptionPrice(callPut, spot, strike, tenor, rate, sigma): """ Black-Scholes option pricing tenor is float in years. e.g. tenor for 6 month is 0.5 """ d1 = (np.log(spot / strike) + (rate + 0.5 * sigma ** 2) * tenor) / (sigma * np.sqrt(tenor)) d2 = d1 - sigma * np.sqrt(tenor) if callPut == 'Call': return spot * ncdf(d1) - strike * np.exp(-rate * tenor) * ncdf(d2) elif callPut == 'Put': return -spot * ncdf(-d1) + strike * np.exp(-rate * tenor) * ncdf(-d2) def blackScholesVega(callPut, spot, strike, tenor, rate, sigma): """ Black-Scholes vega """ d1 = (np.log(spot / strike) + (rate + 0.5 * sigma ** 2) * tenor) / (sigma * np.sqrt(tenor)) return spot * np.sqrt(tenor) * npdf(d1) def blackScholesDelta(callPut, spot, strike, tenor, rate, sigma): """ Black-Scholes delta """ d1 = (np.log(spot / strike) + (rate + 0.5 * sigma ** 2) * tenor) / (sigma * np.sqrt(tenor)) if callPut == 'Call': return ncdf(d1) elif callPut == 'Put': return ncdf(d1) - 1 def blackScholesGamma(callPut, spot, strike, tenor, rate, sigma): """" Black-Scholes gamma """ d1 = (np.log(spot / strike) + (rate + 0.5 * sigma ** 2) * tenor) / (sigma * np.sqrt(tenor)) return npdf(d1) / (spot * sigma * np.sqrt(tenor))

Hi there, I do think your website may be having browser compatibility issues. Whenever I take a look at your site in Safari, it looks fine however when opening in Internet Explorer, it’s got some overlapping issues. I just wanted to provide you with a quick heads up! Apart from that, wonderful website!|

Thanks n I will check.

This paragraph is truly a nice one it helps new web users, who are wishing for blogging.|

Hello, i feel that i saw you visited my website thus i came to go back the choose?.I am trying to find things to improve my web site!I suppose its ok to make use of some of your concepts!!|

I seriously love your website.. Very nice colors & theme. Did you create this site yourself? Please reply back as I’m hoping to create my very own site and would like to know where you got this from or what the theme is called. Many thanks!|

Thanks! I did create this myself. Did poke around a bit to get such simple but effective theme

Pretty! This was an incredibly wonderful article. Thanks for providing these details.|

Thanks for one’s marvelous posting! I seriously enjoyed reading it, you happen to be a great author.I will always bookmark your blog and definitely will come back someday. I want to encourage you continue your great job, have a nice day!|

I could not resist commenting. Perfectly written!|

Hello, after reading this remarkable article i am too cheerful to share my knowledge here with friends.|

You are so cool! I don’t believe I’ve truly read a single thing like this before. So good to find somebody with genuine thoughts on this subject matter. Really.. thanks for starting this up. This website is something that is required on the web, someone with some originality!|

Hiya, I’m really glad I have found this info. Today bloggers publish only about gossips and net and this is actually annoying. A good web site with interesting content, that’s what I need. Thanks for keeping this web-site, I will be visiting it. Do you do newsletters? Cant find it.

This paragraph is in fact a nice one it assists new the web visitors, who are wishing in favor of blogging.|

I don’t even know how I ended up here, but I thought this post was great. I don’t know who you are but definitely you are going to a famous blogger if you aren’t already 😉 Cheers!|

Its like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but instead of that, this is fantastic blog. A fantastic read. I’ll definitely be back.|

You’re so awesome! I don’t believe I’ve read through something like that before. So great to discover someone with some unique thoughts on this issue. Seriously.. thanks for starting this up. This site is one thing that is needed on the internet, someone with a little originality!|

I have read so many content on the topic of the blogger lovers however this paragraph is truly a pleasant piece of writing, keep it up.|

Hello mates, how is all, and what you desire to say

about this article, in my view its actually awesome in favor of me.

Keep this going please, great job!

It’s remarkable in support of me to have a web page, which is useful designed for my experience. thanks admin|

It’s remarkable in support of me to have a web page, which is beneficial for my know-how. thanks admin|

What’s up, yup this article is really fastidious and I have learned lot of things from it concerning blogging. thanks.|

I’d like to thank you for the efforts you’ve put in penning this site. I am hoping to view the same high-grade blog posts from you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal site now ;)|

I was able to find good info from your blog posts.|

Have you ever thought about writing an ebook or guest authoring on other websites?

I have a blog based on the same subjects you

discuss and would really like to have you share some stories/information. I know my readers would

enjoy your work. If you are even remotely interested, feel free to send me an e mail.

Hi, yes this piece of writing is truly good and I have learned lot of things from it about blogging. thanks.|

Nice blog here! Also your site loads up very fast! What host are you using? Can I get your affiliate link to your host? I wish my website loaded up as fast as yours lol|

Howdy! Someone in my Facebook group shared this website with us so I came to take a look. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my followers! Great blog and superb design and style.|

Hello there, just became alert to your blog through Google, and found that it is really informative. I’m going to watch out for brussels. I’ll appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers!|

Hmm is anyone else having problems with the images on this blog loading?

I’m trying to figure out if its a problem on my end or if it’s the blog.

Any responses would be greatly appreciated.

Attractive part of content. I just stumbled upon your web site and in accession capital to say that I get in fact enjoyed account your blog posts. Any way I’ll be subscribing for your augment or even I success you get right of entry to consistently fast.|

Hey would you mind sharing which blog platform you’re using? I’m going to start my own blog in the near future but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique. P.S Apologies for getting off-topic but I had to ask!|

Thanks for sharing your info. I really appreciate your efforts and I am waiting for your next write ups thanks once again.|

At this time I am going away to do my breakfast, afterward having my breakfast coming yet again to read more news.|

hi!,I like your writing so much! share we keep up a correspondence extra about your article on AOL? I need an expert in this space to unravel my problem. Maybe that’s you! Looking forward to see you. |

Heya i’m for the primary time here. I found this board and I to find It really helpful

& it helped me out a lot. I am hoping to give one thing again and aid others such as you helped me.

Wow! This can be one of the most helpful blogs we’ve ever come across on thesubject. Basically fantastic info! I am also a specialist in this topic therefore I can understand your effort.

whoah this blog is great i love reading your articles. Keep up the good work! You know, lots of people are searching around for this info, you could aid them greatly.

I wanted to type a quick word in order to express gratitude to you for all the pleasant tricks you are showing here. My extended internet look up has finally been compensated with high-quality knowledge to write about with my friends and classmates. I would assert that we site visitors are undeniably fortunate to exist in a really good site with many brilliant individuals with useful suggestions. I feel extremely blessed to have discovered your web site and look forward to tons of more exciting moments reading here. Thanks once again for all the details.

I precisely had to thank you so much again. I’m not certain the things that I would’ve sorted out in the absence of the ways documented by you on this area of interest. This was a frustrating matter in my position, however , taking a look at the specialized technique you managed it took me to leap over contentment. I am just grateful for your help and then hope you comprehend what a powerful job you happen to be getting into educating many people via your blog. I am certain you’ve never come across any of us.

My husband and i felt lucky when John managed to finish up his survey from the ideas he got while using the web pages. It is now and again perplexing to just choose to be offering guidance people today have been trying to sell. And we already know we have the blog owner to be grateful to because of that. All of the illustrations you made, the straightforward blog menu, the friendships you can aid to foster – it is mostly terrific, and it’s leading our son in addition to the family understand that content is pleasurable, which is particularly indispensable. Thank you for the whole thing!

My wife and i felt really excited that Edward could complete his studies using the precious recommendations he made using your web page. It’s not at all simplistic just to continually be giving away tricks many people have been making money from. And now we know we’ve got the website owner to appreciate because of that. All of the explanations you made, the easy blog navigation, the friendships you can help create – it’s got most powerful, and it is making our son and the family feel that the concept is cool, and that’s really important. Many thanks for the whole thing!

Thank you a lot for providing individuals with an extremely spectacular possiblity to read articles and blog posts from this site. It’s usually very pleasurable and stuffed with amusement for me and my office friends to search your website a minimum of three times per week to read through the fresh guides you will have. And definitely, I’m so always happy with all the splendid tactics you serve. Certain 1 points in this article are without a doubt the simplest I’ve ever had.

http://powerleading.de/most-active-seniors-online-dating-service-without-pay catholic mature singles dating online site