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