setAssetList
Set up list of identifiers for assets
Description
sets up the list of identifiers for assets for obj
= setAssetList(obj
,AssetList
)Portfolio
,
PortfolioCVaR
, or PorfolioMAD
objects.
For details on the respective workflows when using these different objects, see
Portfolio Object Workflow, PortfolioCVaR Object Workflow,
and PortfolioMAD Object Workflow.
sets up a list of asset identifiers, specified as a comma-separated list of
character vectors, a cell array of character vectors, or string array where each
character vector or string is an asset identifier. obj
= setAssetList(obj
,'asset1','asset2',asset3',...)
Note
If an asset list is entered as an input, this function overwrites an existing asset list in the object if one exists.
If no asset list is entered as an input, three actions can occur:
If
NumAssets
is nonempty andAssetList
is empty,AssetList
becomes a numbered list of assets with default names according to the hidden property indefaultforAssetList
('Asset'
).If
NumAssets
is nonempty andAssetList
is nonempty, nothing happens.If
NumAssets
is empty andAssetList
is empty, the defaultNumAssets
=1
is set and a default asset list is created ('Asset1'
).
Examples
Input Arguments
Output Arguments
Tips
You can also use dot notation to set up list of identifiers for assets.
obj = obj.setAssetList(AssetList);
To clear an
AssetList
, call this function with[]
or{[]}
.
Version History
Introduced in R2011a