Main Content

portfolioCostCurves

Estimate market-impact cost of order execution for portfolio

Description

example

pcc = portfolioCostCurves(k,portfolio,tradeQuantity,tqRange,tradeStrategy,tsRange) returns the market-impact cost of order execution for a portfolio using:

  • Kissell Research Group (KRG) transaction cost analysis object k

  • Portfolio data portfolio

  • Trade quantity tradeQuantity with a range of values tqRange

  • Trade strategy tradeStrategy with a range of values tsRange

Examples

collapse all

Retrieve the market impact data from the KRG FTP site. Connect to the FTP site using the ftp function with a user name and password. Navigate to the MI_Parameters folder and retrieve the market impact data in the MI_Encrypted_Parameters.csv file. miData contains the encrypted market impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd');
mget(f,'MI_Encrypted_Parameters.csv');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...
    ',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction cost analysis object k.

k = krg(miData);

Load the example portfolio data from the file KRGExampleData.mat, which is included with the Datafeed Toolbox™.

load KRGExampleData

The variable PortfolioData appears in the MATLAB® workspace.

PortfolioData contains these variables:

  • Stock symbol

  • Local price

  • Price in a different currency if applicable

  • Average daily volume

  • Volatility

  • Number of shares

For a description of the example data, see Kissell Research Group Data Sets.

Estimate market-impact cost for an order execution on a portfolio of assets. Specify the trade quantity as DollarValue. Specify the trade quantity range tqRange with increments of $10,000,000. Start with a total portfolio value of $100,000,000 and end with $500,000,000. Set the percentage of volume trading strategy POV. Specify the trade strategy range tsRange with increments of 10% by starting with a percentage of volume of 10% and ending with 40%.

tqRange = (100000000:10000000:500000000); 
tsRange = (0.10:0.10:0.40);

pcc = portfolioCostCurves(k,PortfolioData,'DollarValue',tqRange,...
'POV',tsRange);

Display the first three rows of market-impact cost data.

pcc(1:3,:)
ans = 

    Size      Shares       TradeValue     AbsTradeValue    POV     TradeTime    Cost_bp    Cost_DollarsPerShare    Cost_Dollars
    ____    __________    ____________    _____________    ____    _________    _______    ____________________    ____________

    0.02    5612057.03    100000000.00    328737579.09     0.10    0.18         38.74      0.07                    387447.95   
    0.02    5612057.03    100000000.00    328737579.09     0.20    0.08         61.18      0.11                    611819.30   
    0.02    5612057.03    100000000.00    328737579.09     0.30    0.05         80.07      0.14                    800683.38   

The market-impact cost data contains:

  • Average trade size across all stocks in the portfolio

  • Number of shares in the transaction

  • Sum of traded value across all stocks in the portfolio

  • Sum of absolute value of the trade value across all stocks in the portfolio

  • Average execution percentage of volume to complete the number of shares

  • Average trade time in percentage of the day to complete the number of shares

  • Market-impact cost in basis points of local price

  • Market-impact cost in dollars per share

  • Market-impact cost in total dollar value

Display portfolio cost curves for percentage of volume rates: 10%, 20%, 30%, and 40%.

figure
size10 = pcc.Size(1:4:end)*100;
size20 = pcc.Size(2:4:end)*100;
size30 = pcc.Size(3:4:end)*100;
size40 = pcc.Size(4:4:end)*100;
cost10 = pcc.Cost_bp(1:4:end);
cost20 = pcc.Cost_bp(2:4:end);
cost30 = pcc.Cost_bp(3:4:end);
cost40 = pcc.Cost_bp(4:4:end);
plot(size10,cost10,size20,cost20,size30,cost30,size40,cost40)
grid on
axis([2 11 25 200]) 
xlabel({'Size','(%ADV)'}) 
ylabel({'Cost','(bps)'}) 
legend('POV = 10%','POV = 20%','POV = 30%','POV = 40%',...
'Location','northwest') 
title('Portfolio Costs') 
a = gca; 
a.XAxis.TickLabelFormat = '%g%%';

Plot figure displays one plot with four portfolio cost curves. Each curve shows a different percentage of volume rate.

This figure demonstrates using portfolio costs to construct the portfolio and manage portfolio contents. By analyzing portfolio costs, you can determine the optimal portfolio size.

Input Arguments

collapse all

Transaction cost analysis, specified as a KRG object created using krg.

Portfolio data that describes the stocks in the portfolio, specified as a table or structure. portfolio must contain these variable or field names.

Variable or Field NameDescription

Symbol

Stock symbol.

Price_Local

Local price.

Price_Currency

Price, specified as the stock price with a different currency if the stock trades outside the United States. If the stock trades in the United States, the value equals the local price.

ADV

Average daily volume.

Volatility

Volatility.

Shares

Number of shares.

The number of symbols in the portfolio data must match the number of values for each market-impact parameter in the miData property of k. For details about the market-impact parameters, contact the Kissell Research Group.

Example: portfolio = table({'XYZ'},100.00,100.00,860000,0.27,550,'VariableNames',{'Symbol' 'Price_Local' 'Price_Currency' 'ADV' 'Volatility' 'Shares'})

Example: portfolio = struct('Symbol','XYZ','Price_Local',100.00,'Price_Currency',100.00,'ADV',860000,'Volatility',0.27,'Shares',550)

These examples do not represent real market data.

Data Types: struct | table

Trade quantity, specified as one of these values.

ValueTrade Quantity Description

'DollarValue'

Total dollar value of the portfolio

'PercentValue'

Percentage of the total dollar value of the portfolio

Trade quantity range, specified as a vector. portfolioCostCurves uses these values with the trade strategy range values to estimate market-impact costs for different quantities and strategies.

Example: 'Size',(0.01:0.01:1) specifies a trade quantity range with increments of 0.01 starting from 0.01 and ending at one

Data Types: double

Trade strategy, specified as one of these values.

ValuesTrade Strategy Name

'POV'

Percentage of volume

'TradeTime'

Trade time in percentage of the day

Trade strategy range, specified as a vector. portfolioCostCurves uses these values with the trade quantity range values to estimate market-impact costs for different quantities and strategies.

Example: 'POV',(0.05:0.05:0.5) specifies a trade strategy range with increments of 0.05 starting from 0.05 and ending at 0.5

Data Types: double

Output Arguments

collapse all

Portfolio cost curves, returned as a table or structure with these variable names or fields.

Variable or Field Name Description

Size

Average trade size across all stocks in the portfolio.

Shares

Number of shares in the transaction.

TradeValue

Trade value, or the total dollar value of the stock position in the portfolio adjusted for side. Long/Buy positions have a positive trade value and Short/Sell positions have a negative trade value.

AbsTradeValue

Sum of absolute value of the trade value across all stocks in the portfolio.

POV

Average execution percentage of volume to complete the number of shares.

TradeTime

Average trade time in percentage of the day to complete the number of shares.

Cost_bp

Market-impact cost in basis points of local price.

Cost_DollarsPerShare

Market-impact cost in dollars per share.

Cost_Dollars

Market-impact cost in total dollar value.

Tips

  • To test multiple portfolio transactions, you can use different ranges. You can change the percentage of shares in the transaction or use a different trade strategy. For details, see Input Arguments.

  • For details about the calculations, contact Kissell Research Group.

References

[1] Kissell, Robert. “A Practical Framework for Transaction Cost Analysis.” Journal of Trading. Vol. 3, Number 2, Summer 2008, pp. 29–37.

[2] Kissell, Robert. “Algorithmic Trading Strategies.” Ph.D. Thesis. Fordham University, May 2006.

[3] Kissell, Robert. “TCA in the Investment Process: An Overview.” Journal of Index Investing. Vol. 2, Number 1, Summer 2011, pp. 60–64.

[4] Kissell, Robert. The Science of Algorithmic Trading and Portfolio Management. Cambridge, MA: Elsevier/Academic Press, 2013.

[5] Kissell, Robert, and Morton Glantz. Optimal Trading Strategies. New York, NY: AMACOM, Inc., 2003.

Version History

Introduced in R2016a