Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peterajhgraham/monte_carlo_portfolio_optimization
This repository provides an R-based framework for investment portfolio optimization using Monte Carlo simulations. It utilizes the quantmod package for retrieving financial data, and integrates data.table, Matrix, ggplot2, and PerformanceAnalytics for numerical analysis and visualization.
https://github.com/peterajhgraham/monte_carlo_portfolio_optimization
portfolio-optimization quantitative-finance
Last synced: 14 days ago
JSON representation
This repository provides an R-based framework for investment portfolio optimization using Monte Carlo simulations. It utilizes the quantmod package for retrieving financial data, and integrates data.table, Matrix, ggplot2, and PerformanceAnalytics for numerical analysis and visualization.
- Host: GitHub
- URL: https://github.com/peterajhgraham/monte_carlo_portfolio_optimization
- Owner: peterajhgraham
- License: mit
- Created: 2024-08-14T00:50:57.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-22T00:02:41.000Z (3 months ago)
- Last Synced: 2024-08-22T01:31:52.835Z (3 months ago)
- Topics: portfolio-optimization, quantitative-finance
- Language: R
- Homepage:
- Size: 917 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Portfolio Optimization with Monte Carlo Simulations
This repository serves as an investment analysis tool, employing 100,000 Monte Carlo simulations designed to optimize asset allocation strategies using historical market data to enhance risk-adjusted returns.
## Sample Output
Below is an example output that exhibits return and volatility of the 100,000 asset portfolios ran against the market representation (SPY) and provides metrics for the optimized portfolio's performance along with the market's performance.
![Example Output](Monte_Carlo_Example_Output.png)
## Directory Structure
```
Monte_Carlo_Portfolio_Optimization/
├── src/
│ ├── Main.R
│ ├── Monte_Carlo_Simulation.R
│ ├── Portfolio_Optimization.R
│ └── Utility_Functions.R
│
├── test/
│ ├── test_Monte_Carlo_Simulation.R
│ ├── test_Portfolio_Optimization.R
│ └── test_Utility_Functions.R
│
├── Monte_Carlo_Example_Output.png
├── .gitignore
├── LICENSE
└── README.md
```## Installation
To get started with this portfolio optimization tool in R, follow these steps:
1. **Clone the repository**:
```bash
git clone https://github.com/peterajhgraham/Monte_Carlo_Portfolio_Optimization.git
```
2. **Navigate to the repository's directory**:
```bash
cd Monte_Carlo_Portfolio_Optimization
```
3. **Install the required R packages**:
```bash
"install.packages(c('quantmod', 'data.table', 'Matrix', 'ggplot2', 'PerformanceAnalytics'))"
```
## Usage1. **Execute the Main.R script to perform the portfolio optimization simulation**:
```bash
Rscript src/Main.R
```