主要内容

处理交易成本

The difference between net and gross portfolio returns is transaction costs. The net portfolio return proxy has distinct proportional costs to purchase and to sell assets which are maintained in thePortfolioCVaR对象属性BuyCostSellCost. Transaction costs are in units of total return and, as such, are proportional to the price of an asset so that they enter the model for net portfolio returns in return form. For example, suppose that you have a stock currently priced $40 and your usual transaction costs are 5 cents per share. Then the transaction cost for the stock is 0.05/40 = 0.00125 (as defined in净投资组合返回). Costs are entered as positive values and credits are entered as negative values.

Setting Transaction Costs Using thePortfolioCVaR功能

To set up transaction costs, you must specify an initial or current portfolio in theInitPortproperty. If the initial portfolio is not set when you set up the transaction cost properties,InitPortis0. The properties for transaction costs can be set using thePortfolioCVaR目的。例如,假设购买和销售交易成本在变量中bcsc最初的投资组合在变量中x0, then transaction costs are set:

BC = [0.00125;0.00125;0.00125;0.00125;0.00125];SC = [0.00125;0.007;0.00125;0.00125;0.0024]; x0 = [ 0.4; 0.2; 0.2; 0.1; 0.1 ]; p = PortfolioCVaR('BuyCost', bc,“卖出”,SC,,'InitPort', x0); disp(p.NumAssets) disp(p.BuyCost) disp(p.SellCost) disp(p.InitPort)
5 0.0013 0.0013 0.0013 0.0013 0.0013 0.0013 0.0070 0.0013 0.0013 0.0013 0.0024 0.4000 0.4000 0.2000 0.2000 0.2000 0.1000 0.1000 0.1000

Setting Transaction Costs Using thesetCost功能

您还可以使用setCost. Assume that you have the same costs and initial portfolio as in the previous example. Given aPortfolioCVaRobjectpwith an initial portfolio already set, usesetCostto set up transaction costs:

BC = [0.00125;0.00125;0.00125;0.00125;0.00125];SC = [0.00125;0.007;0.00125;0.00125;0.0024]; x0 = [ 0.4; 0.2; 0.2; 0.1; 0.1 ]; p = PortfolioCVaR('InitPort', x0); p = setCosts(p, bc, sc); disp(p.NumAssets) disp(p.BuyCost) disp(p.SellCost) disp(p.InitPort)
5 0.0013 0.0013 0.0013 0.0013 0.0013 0.0013 0.0070 0.0013 0.0013 0.0013 0.0024 0.4000 0.4000 0.2000 0.2000 0.2000 0.1000 0.1000 0.1000

You can also set up the initial portfolio'sInitPort价值作为可选论点setCostso that the following is an equivalent way to set up transaction costs:

BC = [0.00125;0.00125;0.00125;0.00125;0.00125];SC = [0.00125;0.007;0.00125;0.00125;0.0024]; x0 = [ 0.4; 0.2; 0.2; 0.1; 0.1 ]; p = PortfolioCVaR; p = setCosts(p, bc, sc, x0); disp(p.NumAssets) disp(p.BuyCost) disp(p.SellCost) disp(p.InitPort)
5 0.0013 0.0013 0.0013 0.0013 0.0013 0.0013 0.0070 0.0013 0.0013 0.0013 0.0024 0.4000 0.4000 0.2000 0.2000 0.2000 0.1000 0.1000 0.1000

Setting Transaction Costs with Scalar Expansion

Both thePortfolioCVaR对象和setCostfunction implement scalar expansion on the arguments for transaction costs and the initial portfolio. If theNumAssetsproperty is already set in thePortfolioCVaRobject, scalar arguments for these properties are expanded to have the same value across all dimensions. In addition,setCost让您指定NumAssetsas an optional final argument. For example, assume that you have an initial portfoliox0您想在宇宙中的所有资产上设定共同的交易成本。您可以以任何等效的方式设置这些成本:

x0 = [0.4;0.2;0.2;0.1;0.1];p = portfoliocvar('InitPort', x0,'BuyCost',0.002,“卖出”,0.002);

或者

x0 = [0.4;0.2;0.2;0.1;0.1];p = portfoliocvar('InitPort', x0); p = setCosts(p, 0.002, 0.002);

或者

x0 = [0.4;0.2;0.2;0.1;0.1];p = portfoliocvar;p = setCosts(p, 0.002, 0.002, x0);

To clear costs from yourPortfolioCVaRobject, use either thePortfolioCVaRobject orsetCostwith empty inputs for the properties to be cleared. For example, you can clear sales costs from thePortfolioCVaRobjectpin the previous example:

p = portfoliocvar(p,“卖出”, []);

See Also

||||||

Related Examples

More About

External Websites