# A Parallel Monte Carlo Algorithm for the Life Cycle Asset Allocation Problem
## 3 Results
### Parallel Monte Carlo
For each age, we initialize a matrix \(V[age]\) to store the current value function and set up policy matrices \(policyC[age]\) and \(policy\alpha[age]\) to record the optimal consumption and asset allocation proportions, respectively. Computation of the Value Function: For each state variable (pension wealth \(W\)), at each time point, different combinations of consumption \(C\) and asset allocation proportion \(a\) are explored. Through a nested loop, all possible combinations of consumption and asset allocation are evaluated, and the utility \(U\) for each combination is computed. At each \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Thread Number** & **Computing Time (min)** \\ \hline Value Iteration Method & 1 & 41.15 \\ \hline  & 1 & 29.88 \\  & 2 & 15.74 \\ Our Method (Proposed) & 4 & 8.06 \\  & 8 & 4.17 \\  & 16 & 2.69 \\  & 32 & 1.42 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Computing time. iteration, the immediate utility \(U\) from consumption is calculated, along with the expected future value expected \(V\). Immediate utility \(U\) is defined by a power function of consumption \(C\), factoring in a time preference parameter \(\beta\). The expected future value expected \(V\) is calculated using Gauss-Hermite quadrature, which integrates over possible future outcomes by simulating changes in assets based on the distribution of returns. Finding the Optimal Decisions: For each combination of consumption and asset allocation, the total utility is computed. After iterating through all combinations, the optimal consumption and asset allocation that correspond to the maximum utility are stored in the policy matrices, while the maximum utility is recorded in \(V[age]\). Iteration and Recording of Optimal \(a\) and \(C\) Strategies:  
Through the backward iteration, we ultimately derive the optimal strategies \(policyC[age]\) and \(policy\alpha[age]\) for each age. These strategies represent the optimal consumption level and asset allocation proportion at every age, determined by selecting the combinations of \(C\) and \(a\) that maximize utility. Simulation of the Optimal Path:  
Once the optimal strategies for each age are determined, we can simulate the optimal paths of wealth, consumption, and asset allocation over the life cycle. Starting with initial pension wealth and salary income, the optimal consumption \(C\) and asset allocation proportion \(\alpha\) at each age are derived from the previously calculated policies \(policyC[age]\) and \(policy\alpha[age]\). Simultaneously, the pension wealth \(W\) and labor income \(Y\) are updated iteratively using shocks \(Z_{1}\) and \(Z_{2}\), recording the changes over time. The effectiveness of the parallel optimization techniques employed in our Monte Carlo simulation is evidenced by the marked reduction in computing times with the increasing numbers of threads. When executed on a single thread, the simulation took approximately 29.88 min to complete. Through the implementation of parallel processing, this time was more than halved to 15.74 min with two threads. The trend of decreasing computational time continued as more threads were introduced, with four threads cutting the time down to 8.06 min, an almost four-fold improvement over the single-threaded execution. With 32 threads, the time was further reduced to 1.42 min. This represents a remarkable twenty-fold decrease from the initial time, highlighting the scalability of our parallel algorithm. These times reflect a near-linear speed-up with increasing thread counts, suggesting efficient utilization of computational resources and minimal overhead from parallelization. Our results validate the implementation of our parallel optimization strategies, making a strong case for their effectiveness in high-performance computing contexts, particularly in complex financial simulations where time efficiency is paramount.