Consider a knock-out Asian Put option in a binomial model w/
\[ Y_N = \frac{1}{N+1} \sum_{i=0}^N S_i \]
where the event \(\texttt{KnockOut}\) occurs if \(\exists n \leq N\) st \(S_n > B\).
so the payoff is:
\[ \text{Payoff} = \begin{cases} 0 & \text{if } S_n > B \text{ for some } n \leq N \\ (S_N - Y_N)_+ & \text{otherwise}, \end{cases} \]
Under the no-arbitrage assumption, the fair price of the contract at time \(n=0\) is given by the discounted expected payoff under the risk-neutral measure \(\mathbb{Q}\):
\[ V_0 = \mathbb{E}_\mathbb{Q} \left[ \frac{1}{(1 + r)^N} \cdot \text{Payoff} \right] \]
Each path \(\omega^{(i)}\) contributes to this expectation only if the barrier \(B\) is never exceeded along the path st:
the final pricing formula is:
\[ V_0 = \frac{1}{(1 + r)^N} \sum_{i=1}^{2^N} \mathbb{Q}(\omega^{(i)}) \cdot \text{Payoff}(\omega^{(i)}) \]
We can construct a 2-branch binomial tree for \(S_n\), track \(Y_n\), and monitor the barrier.
Since the barrier introduces path dependence, we should track three state variables:
Let \(X_n = (S_n, Y_n, B_n)\) denote the state, and let \(V_n = v_n(X_n)\) denote the option value.
and since the there is a terminal condition at \(n = 6\),
at maturity,
\[ v_6(S_6, Y_6, B_6) = \begin{cases} 0 & \text{if } B_6 = 1 \\ \max(S_6 - Y_6, 0) & \text{otherwise} \end{cases} \]
The binomial tree will look like:
Now, let \(q\) be the risk-neutral up probability w/ \(r = 0.04\), we get:
\[ q = \frac{(1 + r) - d}{u - d} = \frac{1.04 - 0.92}{1.1 - 0.92} = \frac{0.12}{0.18} = \frac{2}{3} \]
now we can create a function to compute the no-arbitrage price of the contract at n = 0.
priceKnockOutAsianPut <- function(B, S0 = 20, u = 1.1, d = 0.92, r = 0.04, N = 6) {
q <- (1 + r - d) / (u - d)
disc <- (1 + r)^N
pricePV <- probValid <- nPositive <- 0
for (i in 0:(2^N - 1)) {
path <- ifelse(intToBits(i)[1:N] == 1, u, d)
Svals <- S0 * cumprod(c(1, path)) # prepend S0
knocked <- any(Svals > B)
payoff <- if (knocked) 0 else max(Svals[N + 1] - mean(Svals), 0)
nH <- sum(path == u)
Q <- q^nH * (1 - q)^(N - nH)
pricePV <- pricePV + Q * payoff
probValid <- probValid + if (!knocked) Q else 0
nPositive <- nPositive + (payoff > 0)
}
list(barrier = B, nPositive = nPositive, probValid = probValid, price = pricePV / disc)
}
priceKnockOutAsianPut(B = 25)
## $barrier
## [1] 25
##
## $nPositive
## [1] 24
##
## $probValid
## [1] 0.5061728
##
## $price
## [1] 0.6086151
Let the two scenarios at \(n = 1\) be:
Then we can compute
\[ \Delta_1 = \frac{V_1^{(up)} - V_1^{(down)}}{S_1^{(up)} - S_1^{(down)}} \]
# Parameters
S0 <- 20
u <- 1.1
d <- 0.92
r <- 0.04
B <- 25
q <- (1 + r - d) / (u - d)
# Define pricing from a fixed S1
priceFromState <- function(S1, B, u, d, r, N_remain) {
q <- (1 + r - d) / (u - d)
disc <- (1 + r)^N_remain
pricePV <- 0
for (i in 0:(2^N_remain - 1)) {
path <- ifelse(intToBits(i)[1:N_remain] == 1, u, d)
Svals <- S1 * cumprod(c(1, path))
fullPath <- c(S0, S1, Svals[-1])
knocked <- any(fullPath > B)
payoff <- if (knocked) 0 else max(fullPath[7] - mean(fullPath), 0)
nH <- sum(path == u)
Q <- q^nH * (1 - q)^(N_remain - nH)
pricePV <- pricePV + Q * payoff
}
pricePV / disc
}
# Compute V_up and V_down
V_up <- priceFromState(S1 = S0 * u, B = B, u = u, d = d, r = r, N_remain = 5)
V_down <- priceFromState(S1 = S0 * d, B = B, u = u, d = d, r = r, N_remain = 5)
# Compute Delta
Delta_1 <- (V_up - V_down) / (S0 * u - S0 * d)
c(V_up = V_up, V_down = V_down, Delta_1 = Delta_1)
## V_up V_down Delta_1
## 0.3866605 1.1255582 -0.2052494
The Delta is negative, reflecting the nature of the knock-out Asian Put, where when the stock price rises early (like from 20 to 22), it becomes more likely that the barrier will be breached later, causing the payoff to drop to zero. As a result, increasing the stock price can actually decrease the value of the option, making the Delta negative.
We model the contract value using a 3-dimensional Markov process:
\[
X_n = (S_n, Y_n, B_n)
\] where:
- \(S_n\): the stock price at time
\(n\),
- \(Y_n\): the average price over times
\(0\) through \(n\),
- \(B_n\): a binary indicator that
equals 1 if the barrier has been hit at or before time \(n\), and 0 otherwise.
We start from: \[ x_0 = (S_0, Y_0, B_0) = (20, 20, 0) \] so the no-arbitrage price of the contract is: \[ V_0 = v_0(x_0) = v_0(20, 20, 0) \]
And at maturity \(n = N\), the contract pays: \[ v_N(S_N, Y_N, B_N) = \begin{cases} 0 & \text{if } B_N = 1 \quad \text{(barrier hit)} \\\\ \max(S_N - Y_N,\, 0) & \text{if } B_N = 0 \end{cases} \]
So for \(n = N-1, N-2, \dots, 0\), the function satisfies: \[ v_n(s, y, b) = \frac{1}{1 + r} \left[ q \cdot v_{n+1}(s^u, y^u, b^u) + (1 - q) \cdot v_{n+1}(s^d, y^d, b^d) \right] \]
with: \[ \begin{aligned} s^u &= s \cdot u, \quad & y^u &= \frac{(n+1) y + s^u}{n+2}, \quad & b^u &= \max(b, \mathbf{1}_{\{s^u > B\}}) \\\\ s^d &= s \cdot d, \quad & y^d &= \frac{(n+1) y + s^d}{n+2}, \quad & b^d &= \max(b, \mathbf{1}_{\{s^d > B\}}) \end{aligned} \]
Consider the optimal investment problem in an \(N\)-period binomial model, where the agent seeks to maximize: \[ \mathbb{E}^{\mathbb{P}}[U(X_N)], \quad \text{with } U(x) = \frac{1}{p} x^p, \quad p < 1,\ p \ne 0 \] subject to the wealth dynamics: \[ X_{n+1} = \Delta_n S_{n+1} + (1 + r)(X_n - \Delta_n S_n), \quad n = 0, \dots, N-1 \]
Let \(Z = \frac{d\mathbb{Q}}{d\mathbb{P}}\) denote the Radon-Nikodym derivative of the risk-neutral measure \(\mathbb{Q}\) with respect to the physical measure \(\mathbb{P}\).
We want to show that the optimal terminal wealth is: \[ X_N = X_0 (1 + r)^N \cdot \frac{Z^{\frac{1}{p-1}}}{\mathbb{E}^{\mathbb{P}}\left[ Z^{\frac{p}{p-1}} \right]} \]
We can use the method of Lagrange multipliers and convex duality.
Starting with a Martingale Representation,
Let \(\tilde{X}_n = \frac{X_n}{(1 + r)^n}\) be the discounted wealth process. Under the risk-neutral measure \(\mathbb{Q}\), the discounted wealth must be a \(\mathbb{Q}\)-martingale: \[ \mathbb{E}^{\mathbb{Q}}[\tilde{X}_N] = \tilde{X}_0 = X_0 \]
Using optimization, the agent solves: \[ \max_{X_N} \mathbb{E}^{\mathbb{P}}\left[ \frac{1}{p} X_N^p \right] \quad \text{subject to} \quad \mathbb{E}^{\mathbb{Q}}\left[ \frac{X_N}{(1 + r)^N} \right] = X_0 \]
Applying a change of measure and using the Radon-Nikodym derivative: \[ \mathbb{E}^{\mathbb{Q}}\left[ \frac{X_N}{(1 + r)^N} \right] = \mathbb{E}^{\mathbb{P}}\left[ \frac{Z X_N}{(1 + r)^N} \right] = X_0 \]
So the agent maximizes: \[ \max_{X_N} \mathbb{E}^{\mathbb{P}}\left[ \frac{1}{p} X_N^p \right] \quad \text{subject to} \quad \mathbb{E}^{\mathbb{P}}[Z X_N] = X_0 (1 + r)^N \]
Form the Lagrangian: \[ \mathcal{L} = \mathbb{E}^{\mathbb{P}}\left[ \frac{1}{p} X_N^p - \lambda Z X_N \right] \]
take the pointwise first-order condition: \[ \frac{d}{dX_N} \left( \frac{1}{p} X_N^p - \lambda Z X_N \right) = X_N^{p - 1} - \lambda Z = 0 \Rightarrow X_N = (\lambda Z)^{\frac{1}{p - 1}} \]
Plugging into the budget constraint and solving for Lambda: \[ \mathbb{E}^{\mathbb{P}}[Z X_N] = \mathbb{E}^{\mathbb{P}}[Z (\lambda Z)^{\frac{1}{p - 1}}] = X_0 (1 + r)^N \] \[ \lambda^{\frac{1}{p - 1}} \cdot \mathbb{E}^{\mathbb{P}}\left[ Z^{\frac{p}{p - 1}} \right] = X_0 (1 + r)^N \Rightarrow \lambda^{\frac{1}{p - 1}} = \frac{X_0 (1 + r)^N}{\mathbb{E}^{\mathbb{P}}\left[ Z^{\frac{p}{p - 1}} \right]} \]
Finally we can substitute back into \(X_N\): \[ X_N = \left( \frac{X_0 (1 + r)^N}{\mathbb{E}^{\mathbb{P}}\left[ Z^{\frac{p}{p - 1}} \right]} \right) \cdot Z^{\frac{1}{p - 1}} \]
We now need to solve for the optimal stock investments in a 2-period binomial model with:
Under the risk-neutral measure: \[ q = \frac{(1 + r) - d}{u - d} = \frac{1.01 - 0.8}{1.5 - 0.8} = \frac{0.3}{0.7} = \frac{3}{7}, \quad 1-q = \frac{4}{7} \]
We can use the optimal terminal wealth formula: \[ X_2 = \left( \frac{X_0 (1 + r)^2}{\mathbb{E}^{\mathbb{P}}\left[ Z^{-1} \right]} \right) \cdot Z^{-2} \qquad \] to compute \(X_2(ω)\) and then the deltas
# Parameters
X0 <- 5
r <- 0.1
u <- 1.5
d <- 0.8
S0 <- 10
P_H <- 2/3
Q_H <- (1.1 - d)/(u - d)
# Probabilities and paths
paths <- c(HH = 1, HT = 2, TH = 3, TT = 4)
P <- c(HH = P_H^2, HT = P_H*(1-P_H), TH = (1-P_H)*P_H, TT = (1-P_H)^2)
Q <- c(HH = Q_H^2, HT = Q_H*(1-Q_H), TH = (1-Q_H)*Q_H, TT = (1-Q_H)^2)
Z <- Q/P
# Calculations
EZinv <- sum(P/Z)
X2 <- (X0*(1 + r)^2/EZinv)/Z^2
S2 <- c(HH = S0*u^2, HT = S0*u*d, TH = S0*d*u, TT = S0*d^2)
# Output table
output <- data.frame(
Path = names(paths),
P = round(P, 4),
Q = round(Q, 4),
`Z = Q/P` = round(Z, 4),
`Z⁻¹` = round(1/Z, 4),
`Z⁻²` = round(1/Z^2, 4),
X2 = round(X2, 4),
S2 = S2
)
# Deltas calculation
Delta_1_H <- (X2[1] - X2[2])/(S2[1] - S2[2])
Delta_1_T <- (X2[3] - X2[4])/(S2[3] - S2[4])
Delta_0 <- ((X2[1] + X2[2])/2 - (X2[3] + X2[4])/2)/(S0*u - S0*d)/(1 + r)
# Print results
print(output)
## Path P Q Z...Q.P Z.. Z...1 X2 S2
## HH HH 0.4444 0.1837 0.4133 2.4198 5.8552 23.3583 22.5
## HT HT 0.2222 0.2449 1.1020 0.9074 0.8234 3.2848 12.0
## TH TH 0.2222 0.2449 1.1020 0.9074 0.8234 3.2848 12.0
## TT TT 0.1111 0.3265 2.9388 0.3403 0.1158 0.4619 6.4
cat("\nΔ₀ =", round(Delta_0, 4),
"\nΔ₁(H) =", round(Delta_1_H, 4),
"\nΔ₁(T) =", round(Delta_1_T, 4))
##
## Δ₀ = 1.4868
## Δ₁(H) = 1.9118
## Δ₁(T) = 0.5041
Consider a binomial tree with u = 1.1, d = 0.92, S0 = 20 and r = 0.04. The physical probability is p = 0.5. We consider an exponential utility maximization problem. Let \(U (x) = −2e^{−x/2}\)
We want to find the optimal terminal wealth \(X_N^*\) that maximizes: \[ \mathbb{E}_{\mathbb{P}}[U(X_N)] = \mathbb{E}_{\mathbb{P}}[-2e^{-X_N/2}] \] subject to: \[ \mathbb{E}_{\mathbb{Q}}[X_N] = X_0(1 + r)^N \]
The marginal utility is: \[ U'(x) = e^{-x/2} \] which is strictly decreasing and invertible, so the inverse function \(I(y)\) is: \[ I(y) = -2 \ln(y) \]
Following Theorem 3.3.6, the optimal terminal wealth is: \[ X_N^*(\omega) = I\left( \frac{\lambda Z(\omega)}{(1 + r)^N} \right) = -2 \ln \left( \frac{\lambda Z(\omega)}{(1 + r)^N} \right) \]
where:
To determine \(\lambda\), we impose the budget constraint under the risk-neutral measure: \[ \mathbb{E}_{\mathbb{Q}}[X_N^*] = X_0 (1 + r)^N \] st \[ \mathbb{E}_{\mathbb{Q}}\left[ -2 \ln\left( \frac{\lambda Z(\omega)}{(1 + r)^N} \right) \right] = X_0 (1 + r)^N \] This is a equation is nonlinear in \(\lambda\)
Thus, the optimal terminal wealth is given by: \[ \boxed{ X_N^*(\omega) = -2 \ln \left( \frac{\lambda Z(\omega)}{(1 + r)^N} \right) } \] where \(\lambda\) is chosen st: \[ \boxed{ \mathbb{E}_{\mathbb{Q}}[X_N^*] = X_0 (1 + r)^N } \]
Using the utility function: \[ U(x) = -2e^{-x/2} \] and binomial parameters: \[ u = 1.1, \quad d = 0.92, \quad S_0 = 20, \quad r = 0.04 \Rightarrow 1 + r = 1.04, \quad N = 3, \quad X_0 = 5 \]
The physical measure has \(p = 0.5\), and the risk-neutral probability is: \[ q = \frac{1.04 - 0.92}{1.1 - 0.92} = \frac{0.12}{0.18} = \frac{2}{3} \]
From Part 1, the optimal terminal wealth is: \[ X_3^*(\omega) = -2 \ln \left( \frac{\lambda Z(\omega)}{(1.04)^3} \right) \]
Let us denote \(C = \frac{\lambda}{(1.04)^3}\). Then: \[ X_3^*(Z_k) = -2 \ln(C Z_k) \]
# Parameters
X0 <- 5
r <- 0.04
N <- 3
one_plus_rN <- (1 + r)^N
# Risk-neutral probabilities for k = 0, 1, 2, 3
Q_probs <- c(
k0 = (1/3)^3,
k1 = 3 * (2/3) * (1/3)^2,
k2 = 3 * (2/3)^2 * (1/3),
k3 = (2/3)^3
)
# Corresponding Z values
Z_vals <- c(
k0 = (2/3)^3,
k1 = (4/3) * (2/3)^2,
k2 = (4/3)^2 * (2/3),
k3 = (4/3)^3
)
optim <- function(lambda) {
if (lambda <= 0) return(Inf)
expected_X <- 0
for (k in names(Q_probs)) {
Z <- Z_vals[k]
Q <- Q_probs[k]
x_star <- -2 * log((lambda * Z) / one_plus_rN)
expected_X <- expected_X + Q * x_star
}
(expected_X - X0 * one_plus_rN)^2
}
# Solve for lambda
lambda_opt <- optimize(optim, interval = c(1e-6, 10))$minimum
# Compute optimal X3* values
X_star <- sapply(Z_vals, function(Z) {
-2 * log((lambda_opt * Z) / one_plus_rN)
})
# Physical probabilities
P_probs <- c(k0 = 1/8, k1 = 3/8, k2 = 3/8, k3 = 1/8)
# Compute value function
U <- function(x) -2 * exp(-x/2)
v_X0 <- sum(P_probs * U(X_star))
v_X0
## [1] -0.1013427
Modify the utility maximization problem to: \[ \max \mathbb{E}_{\mathbb{P}}[U(X_N + Y_N)] \quad \text{subject to} \quad \mathbb{E}_{\mathbb{Q}}[X_N] = X_0 (1 + r)^N \]
Using exponential utility: \[ U(x) = -2e^{-x/2} \quad \Rightarrow \quad U'(x) = e^{-x/2} \Rightarrow I(y) = -2 \ln y \]
Then the optimal terminal wealth is: \[ X_N^*(\omega) = -2 \ln\left( \frac{\lambda Z(\omega)}{(1 + r)^N} \right) - Y_N(\omega) \]
This reflects that the inheritance reduces how much the agent needs to provide via self-financing.
We numerically solve for \(\lambda\) by enforcing: \[ \mathbb{E}^{\mathbb{Q}}[X_N^*] = X_0 (1 + r)^N \]
# Parameters
X0 <- 5
r <- 0.04
N <- 3
rN <- (1 + r)^N
# Risk-neutral and physical probabilities
q <- 2/3
p <- 0.5
Q_probs <- c(k0 = (1/3)^3, k1 = 3*(2/3)*(1/3)^2, k2 = 3*(2/3)^2*(1/3), k3 = (2/3)^3)
P_probs <- c(k0 = 1/8, k1 = 3/8, k2 = 3/8, k3 = 1/8)
# Z values for k = 0,1,2,3
Z_vals <- c(k0 = (2/3)^3, k1 = (4/3)*(2/3)^2, k2 = (4/3)^2*(2/3), k3 = (4/3)^3)
# Suppose Y = (0, 0, 3, 3) depending on number of heads (k = 0,1,2,3)
Y_vals <- c(k0 = 0, k1 = 0, k2 = 3, k3 = 3)
# Objective to solve for lambda
optm <- function(lambda) {
if (lambda <= 0) return(Inf)
expected_X <- 0
for (k in names(Z_vals)) {
Z <- Z_vals[k]
Q <- Q_probs[k]
Y <- Y_vals[k]
x_star <- -2 * log((lambda * Z) / rN) - Y
expected_X <- expected_X + Q * x_star
}
(expected_X - X0 * rN)^2
}
# Solve for lambda
lambda_opt <- optimize(optm, interval = c(1e-5, 10))$minimum
# Compute optimal X3(w) and expected utility under P
X_star <- mapply(function(Z, Y) -2 * log((lambda_opt * Z) / rN) - Y, Z_vals, Y_vals)
U <- function(x) -2 * exp(-x/2)
expected_utility <- sum(P_probs * U(X_star))
# Output
list(lambda = lambda_opt, X3_star = round(X_star, 4), v_X0 = round(expected_utility, 4))
## $lambda
## [1] 0.01877428
##
## $X3_star
## k0 k1 k2 k3
## 10.6186 9.2324 4.8461 3.4598
##
## $v_X0
## [1] -0.1195
Keep \(X_0 = 5\), \(N = 3\), and suppose the agent receives inheritance \(Y_3 = 3 \cdot \mathbf{1}_{S_3 > 18}\), i.e.: \[ Y_3(\omega) = \begin{cases} 3 & \text{if } S_3(\omega) > 18 \\ 0 & \text{otherwise} \end{cases} \]
From Part 3, the optimal terminal wealth is: \[ X_3^*(\omega) = -2 \ln\left( \frac{\lambda Z(\omega)}{(1 + r)^3} \right) - Y_3(\omega) \]
We use: \[ S_3(\omega) = S_0 \cdot u^k d^{3 - k}, \quad \text{for } k = 0,1,2,3 \] with \(S_0 = 20\), \(u = 1.1\), \(d = 0.92\).
Then compute: \[ Y_3 = \begin{cases} 0 & k = 0,1 \quad (S_3 \leq 18) \\ 3 & k = 2,3 \quad (S_3 > 18) \end{cases} \]
We need to solve for \(\lambda\), compute \(X_3^*(\omega)\), and evaluate: \[ u(X_0) = \mathbb{E}_{\mathbb{P}}[U(X_3^* + Y_3)] \]
# Parameters
X0 <- 5
r <- 0.04
r3 <- (1 + r)^3
S0 <- 20
u <- 1.1
d <- 0.92
# Risk-neutral and physical probs
Q_probs <- c(k0 = (1/3)^3, k1 = 3*(2/3)*(1/3)^2, k2 = 3*(2/3)^2*(1/3), k3 = (2/3)^3)
P_probs <- c(k0 = 1/8, k1 = 3/8, k2 = 3/8, k3 = 1/8)
# Z values
Z_vals <- c(k0 = (2/3)^3, k1 = (4/3)*(2/3)^2, k2 = (4/3)^2*(2/3), k3 = (4/3)^3)
# Compute S_3 at each node k = 0,1,2,3
S3_vals <- S0 * u^(0:3) * d^(3:0)
# Y3 = 3 if S3 > 18, otherwise 0
Y_vals <- ifelse(S3_vals > 18, 3, 0)
names(Y_vals) <- names(Z_vals)
# Objective function: match budget constraint under Q
objective <- function(lambda) {
if (lambda <= 0) return(Inf)
expected_X <- sum(Q_probs * (-2 * log((lambda * Z_vals) / r3) - Y_vals))
(expected_X - X0 * r3)^2
}
# Solve for lambda
lambda_opt <- optimize(objective, interval = c(1e-5, 10))$minimum
# Compute optimal terminal wealth
X_star <- -2 * log((lambda_opt * Z_vals) / r3) - Y_vals
# Evaluate total terminal consumption = X3* + Y3
X_total <- X_star + Y_vals
# Utility function and expected utility under P
U <- function(x) -2 * exp(-x / 2)
expected_util <- sum(P_probs * U(X_total))
# Output results
list(
lambda = round(lambda_opt, 4),
X3_plus_Y3 = round(X_total, 4),
u_X0 = round(expected_util, 4)
)
## $lambda
## [1] 0.0134
##
## $X3_plus_Y3
## k0 k1 k2 k3
## 11.2865 9.9002 8.5139 7.1276
##
## $u_X0
## [1] -0.0239