gs_quant.markets.index.Index.visualise_tree

Index.visualise_tree(visualise_by='asset_name')[source]

Visualise the tree by printing the structure of the entire tree. The visualise_by argument can be either ‘asset_name’ or ‘bbid’. Currently supports STS indices only.

Parameters:

visualise_by (Optional[str]) – Parameter to visualise by. Default uses Asset Name to label the nodes

Returns:

treelib Tree object, which can be printed to see the tree structure.

Examples

>>> from gs_quant.markets.index import Index
>>>
>>> index = Index.get("GSMBXXXX")
>>> print(index.visualise_tree())