Expected Utility Portfolio Weights from a Return Distribution
Summary
The document explains how to choose a risky-asset weight for a one-period portfolio when the investor has power utility, a risk-free return, and a probability distribution for the risky asset’s return. The return distribution is represented by possible return outcomes and their probabilities, or by a density for continuous outcomes. For each candidate weight, calculate terminal wealth in each outcome, apply the utility function, and average across probabilities; then select the weight that maximizes expected utility.
The examples illustrate a numerical grid search for discrete outcomes and numerical integration for a continuous density. The document’s sample allocation is tied to an illustrative calibration, not a general recommendation. Its code examples are not reproducible without the specified probability distribution, and implementation requires consistent wealth and return conventions, valid probabilities, and utility defined over feasible terminal wealth.
Key ideas
- The risky asset’s return is modeled as a random variable with outcomes weighted by their probabilities.
- Expected utility is calculated by applying utility to terminal portfolio wealth in each return scenario and averaging.
- The portfolio weight can be found numerically by evaluating expected utility across candidate weights.
- For continuous return distributions, numerical integration replaces a finite probability sum.
- An example allocation depends on its assumed inputs and should not be generalized.
Tags
Full text
# What is the return of risky asset in direct utility optimization probem?
# What is the return of risky asset in direct utility optimization probem?
I am trying to do this portfolio optimization for a one-month investment between S&P 500 as a risky asset and one risk-free asset:
Assume that I have a power utility function, a risk-free rate interpolated for one month, and an option implied distribution function of next month returns. To find the two alpha as optimal weights of my portfolio, I need to know the return of the risky asset, i.e. $r_{t+1}$. What should I use for it? And when I want to maximize the utility, I should take it as a constant in the $dF(r_{t+1})$? i.e. $dF$ is a constant number that will not play any role in the maximization problem?
## Answer by phdstudent (score 2, accepted)
https://quant.stackexchange.com/a/39625
Your question is very confusing. But let's take it by parts:
- You say you have power utility so your utility is: $\frac{W_{t+1}^{1-\gamma}}{1-\gamma}$
- You have a risk-free rate number
- You have an option implied distribution for stock returns so that should give you a two vectors one with returns $r_{t+1}$ and another with probabilities $dF(r_{t+1}$).
- Given the non parametric nature of the problem (as you have a distribution of returns) you need to solve the problem numerically. Bellow a dummy example using matlab. Where I assume a risk-free, a gamma, a distribution for returns.
- The result for that calibration is to allocate 0.62 to the risky asset and the remaining to the risk free.
> `clearvars gamma = 10; rf = 0.02; ret = -0.02:0.01:0.07; %10 possible returns between -0.02 and 0.07 prob = 1/size(ret,2)*ones(size(ret,2),1); %Same probabilities each % Now the maximization problem alpha = (0.00:0.01:1.0)'; %grid for alpha ExpUtility = zeros(size(alpha,1),1); for i=1:size(prob,1) ExpUtility = ExpUtility + prob(i)*(((1+alpha*ret(i) + (1-alpha)*rf)).^(1-gamma))/(1-gamma); end [maximum, index] = max(ExpUtility); sum(ret'.*prob) alpha(index) `
```
clearvars
gamma = 10;
rf = 0.02;
ret = -0.02:0.01:0.07; %10 possible returns between -0.02 and 0.07
prob = 1/size(ret,2)*ones(size(ret,2),1); %Same probabilities each
% Now the maximization problem
alpha = (0.00:0.01:1.0)'; %grid for alpha
ExpUtility = zeros(size(alpha,1),1);
for i=1:size(prob,1)
ExpUtility = ExpUtility + prob(i)*(((1+alpha*ret(i) + (1-alpha)*rf)).^(1-gamma))/(1-gamma);
end
[maximum, index] = max(ExpUtility);
sum(ret'.*prob)
alpha(index)
```
## Answer by Novic (score 0)
https://quant.stackexchange.com/a/39634
I wrote this code in R which I think is better for a continuous distribution function.
```
Utility <- function(r_t) (-1/ARA) * exp( (1 + a_t*r_t + (1-a_t) * r_f) * (-ARA) )
MaxiProb <- function(r_t) Utility(r_t) * realPDF(r_t)
alpha <- seq(-1,2 , 0.01)
ExpUtility <- rep(0 , length(alpha))
for (i in seq_along(alpha)) {
a_t <- alpha[i]
ExpUtility[i] <- integral(MaxiProb , -Inf , Inf )
}
```
First I define the utility function and the product of utility and PDF to find $U(r_{t+1}) dF({t+1})$. Then I define alpha and expected utility which is negative exponacial, and I calculate the integral for each alpha to find the possible expected utilites. Then I can find the alpha which gives the largest expected utility here:
```
alpha[which.max(ExpUtility)]
```
Of course, the code is not reproducible since the PDF is not available here, but it gives an understanding of what am I talking about.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.