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
Retrieve the market-impact data from the Kissell Research Group 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'); close(f) 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 data TradeData from the file
KRGExampleData.mat, which is included with the
Datafeed Toolbox™.
load KRGExampleData.mat TradeData
For a description of the example data, see Interpret Variables in Kissell Research Group Data Sets.
Estimate Trading Costs
Estimate instantaneous trading cost itc using
TradeData.
itc = iStar(k,TradeData);
Estimate market-impact cost mi.
mi = marketImpact(k,TradeData);
Estimate timing risk tr.
tr = timingRisk(k,TradeData);
Estimate price appreciation pa.
pa = priceAppreciation(k,TradeData);
See Also
iStar | marketImpact | timingRisk | priceAppreciation | krg