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.
|