How can I find a maximum withdrawal rate of a portfolio?

Hi everyone,
I’m new to Matlab and I need help solving a simple investment problem.
I have a function which takes an initial portfolio amount (e.g. $100,000) and a withdrawal rate (e.g. 4%) and calculates the value of the portfolio at the end of a given period for a set of returns (generated randomly). It assumes that you withdraw a fixed percentage from the initial portfolio amount at each period.
function [portfolioEOP] = wtdFixedFlat(initPortAmt, wtdPerc)
% initPortAmt: initial value of the portfolio (e.g. 100000)
% wtdPerc: withdrawal percentage at each period (must be between 0 and 1)
[myReturns] = simulateReturns(); % get random set of returns
% Initialize vectors, assume 30 periods
portfolioSOP = zeros(30,1);
portfolioEOP = zeros(30,1);
wtdAmt = zeros(30,1);
% Set first period
portfolioSOP(1,1) = initPortAmt*(1-wtdPerc)*(1+myReturns(1,1)/100);
wtdAmt(1,1) = initPortAmt*wtdPerc;
portfolioEOP(1,1) = portfolioSOP(1,1)-wtdAmt(1,1);
% Loop through all other periods
for i=2:30
portfolioSOP(i,1)=(1+myReturns(i,1)/100)*portfolioEOP(i-1,1);
wtdAmt(i,1) = initPortAmt*wtdPerc;
portfolioEOP(i,1)=portfolioSOP(i,1)-wtdAmt(i,1);
end
I want to find the maximum withdrawal rate such that I am at least 90% certain that I will not run out of money at the end of the 30 periods.
I tried doing this by returning an indicator: 1 if portfolioEOP(30,1) > 0, 0 otherwise
Then, for a given withdrawal rate, I loop through the function 1000 times and if the mean of the indicators is > 90% then I keep that as a possible withdrawal rate. I then used fmincon to find the best withdrawal rate.
This seems very inefficient and I’m not sure whether I’m using the appropriate optimization method. Is there a better way of doing this? Any help would be greatly appreciated. Thank you!

Answers (0)

Categories

Find more on Portfolio Optimization and Asset Allocation in Help Center and File Exchange

Asked:

on 17 Mar 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!