Directory of Open Source for Quantitative Finance and Trading
Username: Password: Not registered?
 
Quick Search:    (AJAX based: No need to press button)

Main : Matlab : 


Category: Matlab View Full Details
Download Now!Black Scholes Price & Greeks
Submitter: vanna Date: 2006/9/2
Description:
This file contains function BlackScholesPrice, which takes one array of parameter value at a time, while the rest of the parameters are variable values.
eg., to get greeks for price range from S=100 to S=15,use:
S=100:1:105;
CallPutFlag='c'; %call option
X=100; %strike
T=1; %Time duration
r=0.05; %risk free rate
v=0.2; %volatility
[price,delta,gamma,vega,theta]=BlackScholesPrice(CallPutFlag,S,X,T,r,v)

Returned values will be vectors, and easy to use for plots:
eg.,
plot(S,delta);




Got a question or problem with this link? Just enter your message and click on submit. No registration is required.

Note: A copy of this message will also be emailed to the submitter of this link
Downloaded 4550 times  4550  File Size 0 bytes  Supported Platforms MATLAB  Home Page http://www.quantcode.com/
Rating: 1.00 (1 vote)
Rate this File | Modify | Delete | Report Broken File | Tell a Friend | Comments (9)

Poster Thread
eoine
Posted: 2007/9/25 21:11  Updated: 2007/9/26 1:05
Just popping in
Joined: 2007/9/22
From:
Posts: 1
 Re: Black Scholes Price & Greeks
Way too many bugs in this piece of code
Caveat emptor!

Poster Thread
Anonymous
Posted: 2011/5/22 11:46  Updated: 2011/5/22 11:46
 Black Scholes Price & Greeks
excellent code mate!!

of course, needed to change some lines of it (normal_pdf changed to normpdf), etc, but solid apart form that. Thanks Dude!!

Discuss this file. Just enter your message and click on submit. No registration is required.
Similar Links:
Black Scholes option price (Software)
The Black Scholes Model (Paper)
The Black-Scholes Option Pricing Model (Paper)
What is Black-Scholes And why should I care? (Paper)
Hodrick Prescott Filter (Software)

Subscribe to RSS or daily email updates of latest quantitative finance code listings
Email address :
Copyright © 2011 QuantCode Inc. All rights reserved.