Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

setTrackingPort

Set up benchmark portfolio for tracking error constraint

Syntax

obj = setTrackingPort(obj,TrackingPort)
obj = setTrackingPort(___,NumAssets)

Description

example

obj = setTrackingPort(obj,TrackingPort) sets up a benchmark portfolio for a tracking error constraint.

example

obj = setTrackingPort(___,NumAssets) sets up a benchmark portfolio for a tracking error constraint using an optional input argument for NumAssets.

Examples

collapse all

Create a Portfolio object.

AssetMean = [ 0.05; 0.1; 0.12; 0.18 ];
AssetCovar = [ 0.0064 0.00408 0.00192 0;
    0.00408 0.0289 0.0204 0.0119;
    0.00192 0.0204 0.0576 0.0336;
    0 0.0119 0.0336 0.1225 ];

p = Portfolio('mean', AssetMean, 'covar', AssetCovar, 'lb', 0, 'budget', 1)
p = 
  Portfolio with properties:

          BuyCost: []
         SellCost: []
     RiskFreeRate: []
        AssetMean: [4x1 double]
       AssetCovar: [4x4 double]
    TrackingError: []
     TrackingPort: []
         Turnover: []
      BuyTurnover: []
     SellTurnover: []
             Name: []
        NumAssets: 4
        AssetList: []
         InitPort: []
      AInequality: []
      bInequality: []
        AEquality: []
        bEquality: []
       LowerBound: [4x1 double]
       UpperBound: []
      LowerBudget: 1
      UpperBudget: 1
      GroupMatrix: []
       LowerGroup: []
       UpperGroup: []
           GroupA: []
           GroupB: []
       LowerRatio: []
       UpperRatio: []

Estimate the Sharpe ratio for the Portfolio object p and define the tracking port.

x0 = estimateMaxSharpeRatio(p);
p = setTrackingPort(p, x0);

display(p.NumAssets);
     4
display(p.TrackingPort);
    0.6608
    0.1622
    0.0626
    0.1143

Input Arguments

collapse all

Object for portfolio, specified using a Portfolio object. For more information on creating a portfolio object, see Portfolio.

Tracking portfolio weights, specified using a vector. If TrackingPort is specified as a scalar and NumAssets exists, then TrackingPort undergoes scalar expansion.

Data Types: double

Number of assets in portfolio, specified using a scalar. If it is not possible to obtain a value for NumAssets, it is assumed that NumAssets is 1.

Data Types: double

Output Arguments

collapse all

Updated portfolio object, returned as a Portfolio object. For more information on creating a portfolio object, see Portfolio.

Note

The tracking error constraints can be used with any of the other supported constraints in the Portfolio object without restrictions. However, since the portfolio set necessarily and sufficiently must be a non-empty compact set, the application of a tracking error constraint can result in an empty portfolio set. Use estimateBounds to confirm that the portfolio set is non-empty and compact.

Tips

You can also use dot notation to set up a benchmark portfolio for tracking error constraint.

obj = obj.setTrackingPort(TrackingPort, NumAssets);

To remove a tracking portfolio, call this function with an empty argument ([]) for TrackingPort.

obj = setTrackingPort(obj, [ ]);

Introduced in R2015b

Was this topic helpful?