I'm building an economic simulation game and I'm trying to solve for the values that a person will spend on each good and the amount they will save in the current period, taking into account all future consumption periods remaining in their life.
Given
- 2 goods (will add more later):
- food: $U(F) = F^{0.25}$, F = quantity of food consumed
- luxury goods: $U(L) = L^{0.75}$, L = quantity of luxury goods consumed
- Income I is constant and expected each period
- N is number of periods left in earning/consuming life
- r is interest rate
- β, level of impatience, 0<β<=1
- I am calculating monetary spend here, and will convert to quantities (given prices) later
I have seen and solved a two-good utility function optimization in a 1 period time-frame and separately a same-good, 2-period intertemporal utility function optimization, but have never seen them combined, which is how I am attempting to solve this problem.
Here's what I have done so far:
Utility -------
I am combining two-good utility optimization and same-good, two-period intertemoral utility optimization. I am keeping two periods by consolidating all future consumption periods into a present value "future consumption" utility function for each good, but I'm not confident that I'm doing this correctly, or if it makes sense:
$U_{globalIntertemporal}(F_{current}, F_{future}, L_{current}, L_{future}) = U(F_{current}) + U(F_{future}) + U(L_{current}) + U(L_{future})$
$U(F_{current}) = F_{current}^{0.25}$
$U(L_{current}) = L_{current}^{0.75}$
$U(F_{future}) = \sum_{t=1}^N (β^t)*(F_{future}^{0.25})$ Using sum of finite geometric series formula, $S_n = a_1\frac{1−r^n}{(1−r)}$, r≠1 I think I can simplify to:
$a_1 = (β^1)(F_{future}^{0.25})$
$r = β$
$U(F_{future}) = \frac{(β^1)(F_{future}^{0.25})(1-β^N)}{(1-β)}$
$U(L_{future}) = \frac{(β^1)(L_{future}^{0.75})(1-β^N)}{(1-β)}$
Then,
$U_{globalIntertemporal}(F_{current}, F_{future}, L_{current}, L_{future}) = F_{current}^{0.25} + \frac{β^1(F_{future}^{0.25})(1-β^N)}{(1-β)} + L_{current}^{0.75} + \frac{β^1(L_{future}^{0.75})(1-β^N)}{(1-β)}$
Budget Constraint -----------------
In a two-period 1 good intertemporal consumption utility optimization, there are two budget contraints, one for each period, that become consolidated into 1. So here I will do the same:
Current period budget constraint
$F_{current} + L_{current} + S_{current} = I, S_{current}$ = savings of current period
Future period budget constraint
$F_{future} + L_{future} = I_{future} + (1+r)*S_{current}$
Value of future income
$I_{future} = \sum_{t=1}^N \frac{I}{(1+r)^t}$ finite geo series --> $\frac{I}{1+r}*\frac{1-(\frac{1}{(1+r)})^N}{1-\frac{1}{1+r}}$
**Wolphram Alpha simplifies to**
$I_{future} = \frac{I-I(1+r)^{-N}}{r}$
eliminate current savings variable
$S_{current} = I - F_{current} - L_{current}$
plug into future budget constraint equation and isolate constants I, N, and r
$F_{future} + L_{future} = \frac{I-I(1+r)^{-N}}{r} + (1+r)*(I - F_{current} - L_{current})$
$\frac{F_{future}}{1+r} + \frac{L_{future}}{1+r} + F_{current} + L_{current} = \frac{I-I(1+r)^{-N}}{r(1+r)} + I$
Problem Summary ---------------
Max $U_{globalIntertemporal}(F_{current}, F_{future}, L_{current}, L_{future}) = F_{current}^{0.25} + \frac{β^1F_{future}^{0.25}*(1-β^N)}{1-β} + L_{current}^{0.75} + \frac{β^1L_{future}^{0.75}(1-β^N)}{1-β}$
Subject to budget constraint $\frac{F_{future}}{1+r} + \frac{L_{future}}{1+r} + F_{current} + L_{current} = \frac{I-I(1+r)^{-N}}{r(1+r)} + I$
Solution Start --- Lagrangian $L = U_{globalIntertemporal}(F_{current}, F_{future}, L_{current}, L_{future}) + λ(\frac{F_{future}}{1+r} + \frac{L_{future}}{1+r} + F_{current} + L_{current} - \frac{I-I(1+r)^{-N}}{r(1+r)} - I)$
Will do:
- find partial derivatives of L with respect to each consumption variable and set equal to λ.
- set λ(budget constraint) = 0
- solve for variables
Are my assumptions and solution on the right track? Should I be doing anything differently? Thank you!