PortfolioTree-class | R Documentation |
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.
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.
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 ContractID
s
of its contracts.
Portfolio, ContractType
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.