Main Content

Estimate Trading Costs for Collection of Stocks

This example shows how to estimate four different trading costs for a collection of stocks using Kissell Research Group transaction cost analysis.

Retrieve Market-Impact Parameters and Load Transaction Data

检索市场影响的数据Kissell Research Group FTP site. Connect to the FTP site using theftpfunction with a user name and password. Navigate to theMI_Parametersfolder and retrieve the market-impact data in theMI_Encrypted_Parameters.csvfile.miDatacontains the encrypted market-impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd'); mget(f,'MI_Encrypted_Parameters.csv'); close(f) miData = readtable('MI_Encrypted_Parameters.csv','delimiter',...',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction cost analysis objectk.

k = krg(miData);

Load the example dataTradeDatafrom the fileKRGExampleData.mat, which is included with the Datafeed Toolbox™.

loadKRGExampleData.matTradeData

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

Estimate Trading Costs

Estimate instantaneous trading costitcusingTradeData.

itc = iStar(k,TradeData);

Estimate market-impact costmi.

mi = marketImpact(k,TradeData);

Estimate timing risktr.

tr = timingRisk(k,TradeData);

Estimate price appreciationpa.

pa = priceAppreciation(k,TradeData);

See Also

||||

Related Topics