MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
  Register to watch video
  • Description
  • Full Transcript
  • Code and Resources

Asset Allocation - Hierarchical Risk Parity

Alex Roumi, MathWorks

This example will walk you through the steps to build an asset allocation strategy based on Hierarchical Risk Parity (HRP).

You will:
 
  • Learn how to use statistics and machine learning techniques to cluster assets into a hierarchical tree structure.
  • Understand how to develop allocation strategies based on the tree structure and risk parity concept through recursion.
  • Compare its result with mean-variance asset allocation.

In this video we will discuss the Hierarchical Risk Parity portfolio construction which produces a much more diversified portfolio compared to the mean-variance method for a similar risk. The HRP focuses on allocation of risk, rather than allocation of capital. The algorithm operates in three stages: tree clustering, quasi-diagonalization, and recursive bisection.

STAGE 1: TREE CLUSTERING

We first use the linkage and dendrogram built-in functions, found in Statistics and Machine Learning Toolbox to construct and visualize the hierarchical tree. The hierarchical clustering is to find the distance between assets and group them into a tree so that allocations can flow downstream through a tree graph.

 STAGE 2: QUASI-DIAGONALIZATION

Quasi-diagonalization is then performed, so that the largest values lie along the diagonal. In this way, similar investments are placed together, and dissimilar investments are placed far apart.

STAGE 3: RECURSIVE BISECTION

Now, given this tree structure, we are ready to allocate funds using the risk parity concept. Let’s consider the example of four assets. We assign a unit weight to all assets. We bisect the current list into left and right halves. We find the weights of the left and right lists based on inverse variance. We compute the total variance of the left and right halves, as well as the splitting factor alpha. We finally rescale the weights of both halves by alpha. We repeat the exact same algorithm for each half: bisect into left and right sections, calculate the weights and variance, and rescale the weights by alpha. The algorithm stops when we have a single asset per section.

Compare HRP to Mean-Variance Portfolio

We can clearly see that HRP produces a much more diversified allocation compared to mean-variance framework, which concentrates 92% of the allocations on the top six holdings. What drives the mean-variance extreme concentration is its goal of minimizing the portfolio’s risk, and yet both portfolios have a very similar risk. As a result, any distress situation affecting the six top holdings’ allocations will have a greater impact on the mean-variance than the HRP’s portfolio.

Thank you for watching.

Download Code and Files

Download code

Related Products

  • Statistics and Machine Learning Toolbox
  • Financial Toolbox
Related Information
Download code

Feedback

Featured Product

Statistics and Machine Learning Toolbox

  • Request Trial
  • Get Pricing

Up Next:

49:45
"The Prayer" - Ten-Step Checklist for Advanced Risk and...

Related Videos:

43:59
Introduction to Computational Finance with MATLAB: A Risk...
3:31
Munich Re Trading Creates a Risk Analytics Platform with...
4:11
Munich Re Trading Creates a Risk Analytics Platform with...
17:49
Global Tactical Asset Allocation and Portfolio Construction...

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Contact Sales
  • About MathWorks

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

  • Select a Web Site United States
  • Patents
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic.  By continuing to use this website, you consent to our use of cookies.  Please see our Privacy Policy to learn more about cookies and how to change your settings.