← Back

MV Portfolio Optimization

Concept

The objective of portfolio optimization is to create an ideal portfolio that maximizes returns while minimizing risk. This project leverages Mean-Variance (MV) Portfolio Optimization techniques to enhance portfolio performance by selecting a diverse range of assets, including stocks, bonds, and commodities. The primary goal is to achieve the best possible balance between risk and return using statistical analysis and mathematical models. This methodical approach aids in making well-informed investment decisions and provides valuable insights for portfolio management.

Data

The dataset spans from December 31, 2015, to March 26, 2021, and includes stock trading data sourced from Yahoo Finance. The tickers for the portfolio were selected based on the initials of each team member's last name. The data underwent a thorough Extract, Transform, Load (ETL) process to ensure accuracy and completeness. This process included merging data tables, handling missing data, and restructuring the data for analysis.

Approach

The analysis commenced with an ETL process to prepare the stock data for analysis. This involved:

  • Extract: Combining stock data from NASDAQ, NYSE, and AMEX exchanges, and importing SP500 index data.
  • Transform: Cleaning, verifying, and reformatting the data using R, including handling missing values and filtering out incorrect entries.
  • Load: Loading the transformed data into R for analysis using the PortfolioAnalytics package.

Algorithm

The project employed a Mean-Variance optimization approach using the following steps:

  • Training Data: The stock returns from 2016 to 2020 were used to train the model.
  • Optimization: The portfolio was optimized using the Markowitz-based Mean-Variance approach to balance risk and return.
  • Testing: The optimized weights were applied to the test data from the first 58 trading days of 2021 to evaluate performance against the SP500 benchmark.

Key Insights and Achievements

  • High ROI: The optimized portfolio achieved an ROI of 38.39%, outperforming the SP500 by a factor of 1.3.
  • Risk and Return: The portfolio demonstrated a slightly higher risk due to larger annualized Sharpe and standard deviation, but the returns were significantly higher.
  • Cumulative Returns: The portfolio's chosen stocks had a mean cumulative return of 155%, compared to 115% for the SP500 benchmark, indicating a 40% higher return rate.