Code covered by the BSD License
-
covered_engine(X, T, mu, sigm...
covered_engine - Generate scenarios for a covered-call strategy with expiration.
-
gbm_calibration(t0, X, t)
gbm_calibration - Calibrate a multivariate geometric Brownian motion process.
-
gbm_call_price(X0, K, r0, T, ...
gbm_call_price - Black-Scholes call option pricing model for geometric Brownian motion prices.
-
gbm_upcrossing_prob(X0, K, T,...
gbm_upcrossing_prob - Compute probability of an upcrossing of a geometric Brownian motion.
-
uncovered_engine(X, T, ...
uncovered_engine - Generate scenarios for an uncovered and a covered buy-write strategy.
-
cvarwebinar.m
-
cvarwebinar_calibration.m
-
cvarwebinar_normality.m
-
cvarwebinar_optimization.m
-
cvarwebinar_reality.m
-
cvarwebinar_scenarios.m
-
cvarwebinar_theory.m
-
setlocalpaths.m
-
View all files
from
Analyzing Investment Strategies with CVaR Portfolio Optimization
by Bob Taylor
Scripts and data to demonstrate the new PortfolioCVaR object in Financial Toolbox.
|
| gbm_call_price(X0, K, r0, T, sigma)
|
function C = gbm_call_price(X0, K, r0, T, sigma)
%gbm_call_price - Black-Scholes call option pricing model for geometric Brownian motion prices.
%
% C = gbm_call_price(x0, K, r0, T, sigma);
%
% Inputs:
% X0 - Current stock price [scalar].
% K - Strike price of call option [scalar].
% r0 - Risk-free rate (annualized) [scalar].
% T - Time from current time to expiration of call option (years) [scalar].
% sigma - Stock price volatility (annualized) [scalar].
%
% Outputs:
% C - Call price [scalar].
%
% Comments:
% 1) This function is a custom version of blsprice that prices an American call option for a stock
% with no dividends.
%
% See also blsprice.
% Copyright (C) 2012 The MathWorks, Inc.
a1 = 0.5*sigma^2;
a2 = log(X0/K);
a3 = sigma*sqrt(2*T);
d1 = (a2 + (r0 + a1)*T)/a3;
d2 = (a2 + (r0 - a1)*T)/a3;
n1 = 1 + erf(d1);
n2 = 1 + erf(d2);
C = 0.5*(n1*X0 - n2*K*exp(-r0*T));
|
|
Contact us