Code covered by the BSD License  

Highlights from
Modeling Variable Annuities with MATLAB

image thumbnail

Modeling Variable Annuities with MATLAB

by

 

This demo shows how to price variable annuity product (Guaranteed Minimum Withdrawal Benefit)

test.m
% Set up parameters needed for a GMWB VA rider

close all; clear all; clc;

% AnnualFee, Risk Free Rate and Annual Withdrawal Rate
aFee = 0;
rfRate = 0.05;
aWRate = 0.1;

% Investment Portfolio
tickers = {'MMM', 'AA', 'AXP', 'T', 'BAC', 'BA', 'CAT', 'CVX', 'CSCO', 'KO'};

% Range for historical data.
startDate = '01/01/2000';
endDate = '01/01/2010';

% Assuming we're holding 10 shares of each stock in our investment
% portfolio
holdings = 10*ones(length(tickers), 1);

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

%%
%close all; clear all; clc;

tic;
aFee = 0;
rfRate = 0.05;
aWRate = 0.10;

% Portfolio
tickers = {'MMM', 'AA', 'AXP', 'T', 'BAC', 'BA', 'CAT', 'CVX', 'CSCO', 'KO'};

% Range for historical data.
startDate = '01/01/2000';
endDate = '01/01/2010';

% Assuming we're holding 10 shares of each stock in EP.Ticker
holdings = 10*ones(length(tickers), 1);

tic;
calcGMWBCostSurf(tickers, holdings, startDate, endDate, aWRate, aFee, rfRate)
toc;

Contact us