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 theftp
function with a user name and password. Navigate to theMI_Parameters
folder and retrieve the market-impact data in theMI_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 objectk
.
k = krg(miData);
Load the example dataTradeData
from 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 costitc
usingTradeData
.
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
iStar
|marketImpact
|timingRisk
|priceAppreciation
|krg