Skip to content

Implements a simulation-based dynamic programming framework for optimal portfolio allocation over multiple periods. Combines analytical solutions with approximate methods under CRRA and log utility, using Monte Carlo simulation, convex optimization, and value function approximation to compute optimal policies across time and wealth levels.

Notifications You must be signed in to change notification settings

ramiuness/dynamic-asset-allocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Dynamic Portfolio Allocation under Uncertainty

This project implements and compares dynamic portfolio optimization methods for allocating wealth between risky and a risk-free asset over multiple periods. It explores both analytical and approximate solutions under different investor utility functions, including log and CRRA utilities.


πŸ” Project Overview

  • Objective: Determine optimal portfolio weights over a finite investment horizon in the presence of uncertainty.
  • Frameworks Used:
    • Monte Carlo simulation
    • Convex optimization via CVXPY
    • Approximate Dynamic Programming (ADP)
  • Key Features:
    • Exact dynamic programming with log utility and multi-asset convex optimization
    • Approximate dynamic programming with a single risky asset, CRRA utility, and cubic interpolation
    • Wealth grid construction and policy extraction

πŸ“Œ Modeling Assumptions

  • The market is assumed to be frictionless, with no transaction costs, slippage, or liquidity constraints.
  • Risk-free and risky assets are perfectly divisible.

πŸ“ Contents

  • dynamicPortfolioAllocation.py: Core module with reusable functions for:
    • Return simulation
    • Optimal portfolio computation
    • Value function approximation
  • dynamic_portfolio_allocation.ipynb: Jupyter notebook demonstrating:
    • Examples of portfolio allocation under various scenarios
    • Visualizations of value functions and optimal policies
    • Comparison between exact and approximate solutions

πŸ›  Tools & Technologies

Python NumPy Pandas Matplotlib CVXPY SciPy


πŸ“ˆ Key Results

  • Demonstrates how optimal asset allocations change over time and across wealth levels.
  • Highlights the performance of approximate dynamic programming versus exact methods.
  • Offers a blueprint for extending the ADP to multi-asset, multi-period portfolio problems.

πŸ“š Citation

If you use this code in your work, please cite this repository:

https://github.com/ramiuness/dynamic-portfolio-allocation


πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Implements a simulation-based dynamic programming framework for optimal portfolio allocation over multiple periods. Combines analytical solutions with approximate methods under CRRA and log utility, using Monte Carlo simulation, convex optimization, and value function approximation to compute optimal policies across time and wealth levels.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published