Skip to content

Finding the Optimal Weights Portfolio using different metrics

Notifications You must be signed in to change notification settings

BernardoRaimundo/Portfolio-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 

Repository files navigation

Portfolio-Optimization

1) Markowitz Mean Variance Approach

1.1) Introduction

Portfolio Optimization is the process of selecting the best portfolio (asset distribution), out of the set of all portfolios being considered, according to some objective. The objective typically maximizes factors such as expected return, and minimizes costs like financial risk. Modern Portfolio Theory states that assembling a portfolio of assets such that the expected return is maximized for a given level of risk. It is a formalization and extension of diversification in investing, the idea that owning different kinds of financial assets is less risky than owning only one type. Its key insight is that an asset's risk and return should not be assessed by itself, but by how it contributes to a portfolio's overall risk and return. It uses the variance of asset prices as a proxy for risk.

In addition to this, using Monte Carlo Simulation we are able to run N different simulations for different portfolios with different security combinations. This aligned with the efficient frontier, the set of optimal portfolios that offer the highest expected return for a defined level of risk, we are able to find the portfolio that maximizes the expected returns.

1.2) Main Objectives of this Project:

  • Extract data from Yahoo Finance;
  • Analyze data using different statistical metrics;
  • Simulate thousands of portfolios using the same assets;
  • Optimize portfolio weights for either volatility or Sharpe Ratio;
  • Build the Markowitz efficient frontier and Capital Allocation Line.

1.3) References for this Project:

  1. Markowitz, H. (1952). Portfolio Selection. The Journal of Finance, 7(1), 77–91. Link
  2. Detemple, Jérôme B., et al. “A Monte Carlo Method for Optimal Portfolios.” The Journal of Finance, vol. 58, no. 1, 2003, pp. 401–46. JSTOR Link
  3. For the Integration of the Monte Carlo Simulation: Quantpy

2) Prado's Hierarchical Risk Parity

2.1) Introduction

HRP calculates optimal weights by considering the inverse of the variance for groups of similar assets. This iterative process involves grouping assets and refining weights until each asset forms its own cluster, eliminating the need for returns forecasting or covariance matrix inversion. Consequently, HRP aims to enhance portfolio stability, performance, and diversification, addressing issues related to concentration and instability.

To date, a question that has not been addressed in the literature is whether employing robust optimization yields advantages in the construction of portfolios within the commodity futures markets. We focus on robust optimization to optimally weight futures portfolios for four diverse commodity sectors – hard commodities (energy, base, and precious metals), agricultural, livestock and soft commodities.

2.2) Main Objectives of this Project:

  • Extract data from Yahoo Finance;
  • Analyze data using different statistical metrics;
  • Perform Hierarchical Risk Parity;
  • Show portfolio weights and compute relevant portfolio metrics.

2.3) References for this Project:

  1. Qian, E. (2005) Risk Parity Portfolios: Efficient Portfolios through True Diversification. Panagora Asset Management, Boston.Link
  2. Roncalli, T. (2013). Introducing Expected Returns into Risk Parity Portfolios: A New Framework for Tactical and Strategic Asset Allocation. SSRN Link
  3. Lopez de Prado., M. (2016). Building Diversified Portfolios that Outperform Out of Sample: The Journal of Portfolio Management. 42. 59-69. Link
  4. Riskfolio Lib: Riskfolio-Lib Documentation

About

Finding the Optimal Weights Portfolio using different metrics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published