tree-class: A hierarchical tree structure for the organization of a...

PortfolioTree-classR Documentation

A hierarchical tree structure for the organization of a portfolio

Description

This Reference Class represents a hierarchical tree structure that allows organizing a portfolio of contracts into sub-portfolios as is the case e.g. for an organization's balance sheet.

Details

A tree can then be passed to methods value, liquidity, income by specifying the optional argument tree=. If a tree is specified, these methods will then compute and return the respective quantities on the various aggregate levels in the tree's hierarchy rather than the granular contract level.

Fields

branches

a list of intermediate sub-portfolios each having a name and a vector indicating the names of its sub-portfolios.

leafs

a list of terminal sub-portfolios to which the contracts of the Portfolio are assigned. Terminal sub-portfolio here means that a leaf can itself not have sub-portfolios but only contracts assigned to it. Hence, a leaf has a name and a vector indicating the ContractIDs of its contracts.

See Also

Portfolio, ContractType

Examples

tree=Tree(list(
               branches=list(B0=c("B1","B2"),
                             B1="L1",
                             B2=c("L2","L3")),
               leafs=list(L1=c("106","107"),
                          L2=c("108","109"),
                          L3=c("110","111"))
                ))
tree


wbreymann/FEMS documentation built on Dec. 8, 2022, 9:43 a.m.