Code covered by the BSD License  

Highlights from
Modeling Variable Annuities with MATLAB

image thumbnail

Modeling Variable Annuities with MATLAB

by

 

15 Mar 2010 (Updated )

Pricing Guaranteed Minimum Withdrawal Benefit

calcGMWB(tickers, holdings, startDate, endDate, aWRate, aFee, rfRate)
function [cost, fee, probRuin, avgRet, vol]= calcGMWB(tickers, holdings, startDate, endDate, aWRate, aFee, rfRate)

% Portfolio
EP.Ticker = tickers;
% Range for historical data.
EP.FromDate = startDate;
EP.ToDate = endDate;
EP.Period = 'm';
% Assuming we're holding 10 shares of each stock in EP.Ticker
EP.Holdings = holdings;

va = GMWB(aWRate, aFee, rfRate, EP, [], []);
[cost, fee, probRuin] = va.price('display');
[avgRet, vol, ~] = va.calcRetSigCorr();

end

Contact us