setCosts
Set up proportional transaction costs for portfolio
Description
sets up proportional transaction costs for obj
= setCosts(obj
,BuyCost
)Portfolio
,
PortfolioCVaR
, or PortfolioMAD
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 proportional transaction costs for portfolio objects with additional
options specified for obj
= setCosts(obj
,BuyCost
,SellCost
,InitPort
,NumAssets
)SellCost
,
InitPort
, and NumAssets
.
Given proportional transaction costs and an initial portfolio in the variables
BuyCost
, SellCost
, and
InitPort
, the transaction costs for any portfolio
Port
reduce expected portfolio return
by:
BuyCost' * max{0, Port - InitPort} + SellCost' * max{0, InitPort - Port}
Examples
Input Arguments
Output Arguments
Tips
You can also use dot notation to set up proportional transaction costs.
obj = obj.setCosts(BuyCost, SellCost, InitPort, NumAssets);
If
BuyCost
orSellCost
are input as empties with[]
, the corresponding attributes in the portfolio object are cleared and set to[]
. IfInitPort
is set to empty with[]
, it will only be cleared and set to[]
ifBuyCost
,SellCost
, andTurnover
are also empty. Otherwise, it is an error.
Version History
Introduced in R2011a
See Also
Topics
- Working with Transaction Costs
- Working with Transaction Costs
- Working with Transaction Costs
- Portfolio Analysis with Turnover Constraints
- Portfolio Optimization Examples Using Financial Toolbox
- Supported Constraints for Portfolio Optimization Using Portfolio Objects
- Supported Constraints for Portfolio Optimization Using PortfolioCVaR Object
- Supported Constraints for Portfolio Optimization Using PortfolioMAD Object