Error in Hierarchical Risk Parity Portfolio

4 ビュー (過去 30 日間)
Sizwe
Sizwe 2024 年 4 月 30 日
コメント済み: Sizwe 2024 年 5 月 5 日
i followed code provided on MATLAB help section under finance/create hierarchical risk parity portfolio and I get this error 'Unrecognized function or variable 'getLeafNodesInGroup'. PLease advise on what can solve this

回答 (1 件)

Dhruv
Dhruv 2024 年 5 月 1 日
Hi Sizwe,
In the Hierarchical Risk Parity Portfolio example, the function 'getLeafNodesInGroup' is a local function and not an in-built function. Upon opening the example in MATLAB R2024a, using the command:
openExample('finance/HierarchicalRiskParityPortfolioExample')
the section titled 'Local Functions' contains the function definition of 'getLeafNodesInGroup'.
Hope this helps!
  2 件のコメント
Zhibin Huo
Zhibin Huo 2024 年 5 月 2 日
Hi, the local function itself also contains "getLeafNodesInGroup", so I have no idea how he solve this. May I please ask some advices?
Sizwe
Sizwe 2024 年 5 月 5 日
The issue here is that 'getLeafNodes InGroup' may not nbe properly defined. Despite using the entire code one and the same error. So the local fuction does not lead to the sorting of assets for quasi-diagonalization.
Please assist on this

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePortfolio Optimization and Asset Allocation についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by