Setting Up an Initial or Current Portfolio

In many applications, creating a new optimal portfolio requires comparing the new portfolio with an initial or current portfolio to form lists of purchases and sales. The PortfolioCVaR object property InitPort lets you identify an initial or current portfolio. The initial portfolio also plays an essential role if you have either transaction costs or turnover constraints. The initial portfolio need not be feasible within the constraints of the problem. This can happen if the weights in a portfolio have shifted such that some constraints become violated. To check if your initial portfolio is feasible, use the checkFeasibility function described in Validating CVaR Portfolios. Suppose that you have an initial portfolio in x0, then use the PortfolioCVaR object to set up an initial portfolio:

x0 = [ 0.3; 0.2; 0.2; 0.0 ];
p = PortfolioCVaR('InitPort', x0);
disp(p.InitPort);
  0.3000
  0.2000
  0.2000
       0

As with all array properties, you can set InitPort with scalar expansion. This is helpful to set up an equally weighted initial portfolio of, for example, 10 assets:

p = PortfolioCVaR('NumAssets', 10, 'InitPort', 1/10);
disp(p.InitPort);
 0.1000
 0.1000
 0.1000
 0.1000
 0.1000
 0.1000
 0.1000
 0.1000
 0.1000
 0.1000

To clear an initial portfolio from your PortfolioCVaR object, use either the PortfolioCVaR object or the setInitPort function with an empty input for the InitPort property. If transaction costs or turnover constraints are set, it is not possible to clear the InitPort property in this way. In this case, to clear InitPort, first clear the dependent properties and then clear theInitPort property.

The InitPort property can also be set with setInitPort which lets you specify the number of assets if you want to use scalar expansion. For example, given an initial portfolio in x0, use setInitPort to set the InitPort property:

p = PortfolioCVaR;
x0 = [ 0.3; 0.2; 0.2; 0.0 ];
p = setInitPort(p, x0);
disp(p.InitPort);
 0.3000
 0.2000
 0.2000
      0

To create an equally weighted portfolio of four assets, use setInitPort:

p = PortfolioCVaR;
p = setInitPort(p, 1/4, 4);
disp(p.InitPort); 
 0.2500
 0.2500
 0.2500
 0.2500

PortfolioCVaR object functions that work with either transaction costs or turnover constraints also depend on the InitPort property. So, the set functions for transaction costs or turnover constraints permit the assignment of a value for the InitPort property as part of their implementation. For details, see Working with Average Turnover Constraints Using PortfolioCVaR Object, Working with One-Way Turnover Constraints Using PortfolioCVaR Object, and Working with Transaction Costs. If either transaction costs or turnover constraints are used, then the InitPort property must have a nonempty value. Absent a specific value assigned through the PortfolioCVaR object or various set functions, the PortfolioCVaR object sets InitPort to 0 and warns if BuyCost, SellCost, or Turnover properties are set. This example shows what happens if you specify an average turnover constraint with an initial portfolio:

p = PortfolioCVaR('Turnover', 0.3, 'InitPort', [ 0.3; 0.2; 0.2; 0.0 ]);
disp(p.InitPort);
 0.3000
 0.2000
 0.2000
      0
In contrast, this example shows what happens if an average turnover constraint is specified without an initial portfolio:
p = PortfolioCVaR('Turnover', 0.3);
disp(p.InitPort);
Warning: InitPort and NumAssets are empty and either transaction costs or turnover constraints specified.
Will set NumAssets = 1 and InitPort = 0. 
> In PortfolioCVaR.checkarguments at 322
  In PortfolioCVaR.PortfolioCVaR>PortfolioCVaR.PortfolioCVaR at 195 
     0

See Also

| | | |

Related Examples

More About

External Websites