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
PortfolioMAD
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 MAD Portfolios. Suppose that you have an initial portfolio in
x0
, then use the PortfolioMAD
object to set up an initial
portfolio:
x0 = [ 0.3; 0.2; 0.2; 0.0 ];
p = PortfolioMAD('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 = PortfolioMAD('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 PortfolioMAD object, use either the PortfolioMAD
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 = PortfolioMAD; 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 = PortfolioMAD; p = setInitPort(p, 1/4, 4); disp(p.InitPort)
0.2500 0.2500 0.2500 0.2500
PortfolioMAD
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 PortfolioMAD Object, Working with One-Way Turnover Constraints Using PortfolioMAD 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 PortfolioMAD
object or various set functions, the
PortfolioMAD
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 = PortfolioMAD('Turnover', 0.3, 'InitPort', [ 0.3; 0.2; 0.2; 0.0 ]); disp(p.InitPort)
0.3000 0.2000 0.2000 0
p = PortfolioMAD('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 PortfolioMAD.checkarguments at 446 In PortfolioMAD.PortfolioMAD>PortfolioMAD.PortfolioMAD at 190 0
See Also
PortfolioMAD
| setAssetList
| setInitPort
| estimateBounds
| checkFeasibility
Related Examples
- Common Operations on the PortfolioMAD Object
- Working with MAD Portfolio Constraints Using Defaults
- Asset Returns and Scenarios Using PortfolioMAD Object