Code covered by the BSD License  

Highlights from
Modeling Variable Annuities with MATLAB

image thumbnail

Modeling Variable Annuities with MATLAB


Yi Wang (view profile)


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

plotdata(EquitySAVal, EquityPayoutVal, FeeVal)
function plotdata(EquitySAVal, EquityPayoutVal, FeeVal)
this.nPeriods = size(EquitySAVal, 1);

set(gcf,'Position',[100 100 800 500]);
hold on;
[AX, H1, H2] = plotyy(1:this.nPeriods, EquitySAVal, 1:this.nPeriods, [EquityPayoutVal FeeVal], 'plot', 'bar');
set(AX(1), 'FontSize', 16);
set(AX(1), 'FontName', 'Calibri');
set(AX(1), 'XLim', [1 this.nPeriods+2]);
set(get(AX(1),'Ylabel'),'String','Sub-Account Value');

set(AX(2), 'FontSize', 16);
set(AX(2), 'FontName', 'Calibri');
set(AX(2), 'XLim', [1 this.nPeriods+2]);
set(get(AX(2),'Ylabel'),'String','Cost Incurred & Fee Collected');

xlabel('Year to Expiry');
title('Simulated GMWB Results');
%legend([H1 H2], 'Sub-Account Value', 'Payout', 'Fee Collected', 'Location', 'North');
grid on;
hold off;

Contact us