主要内容

文件夹CostCurves

Estimate market-impact cost of order execution for portfolio

描述

example

pcc= portfoliocostcurves(k,文件夹,tradeQuantity,tqRange,交易,tsRange)returns the market-impact cost of order execution for a portfolio using:

  • Kissell Research Group (KRG) transaction cost analysis objectk

  • 投资组合数据文件夹

  • Trade quantitytradeQuantity具有一系列值tqRange

  • Trade strategy交易具有一系列值tsRange

例子

全部收缩

Retrieve the market impact data from the KRG FTP site. Connect to the FTP site using theftp使用用户名和密码函数。导航到MI_Parametersfolder and retrieve the market impact data in theMI_Encrypted_Parameters.csvfile.miData包含加密的市场impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','PWD'); mget(f,'MI_Encrypted_Parameters.csv'); miData = readtable('MI_Encrypted_Parameters.csv',“定界符”,。。。',',“ readlownames',错误的,'ReadVariableNames',true);

创建Kissell研究小组交易成本分析对象k

K = KRG(MIDATA);

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

loadKrgexampledata

变量PortfolioData出现在matlab中®workspace.

PortfolioData包含这些变量:

  • 库存符号

  • Local price

  • 如果适用,价格不同

  • 平均每日体积

  • Volatility

  • 股票数量

有关示例数据的描述,请参见Kissell研究小组数据集

估计对资产投资组合的订单执行的市场影响成本。将贸易数量指定为DollarValue。指定贸易数量范围tqRange增量为$ 10,000,000。从总投资组合价值为$ 100,000,000开始,最终以$ 500,000,000结束。设定数量交易策略的百分比POV。指定贸易策略范围tsRange从量的百分比为10%开始,以40%的速度结束时,增量为10%。

tqRange = (100000000:10000000:500000000); tsRange = (0.10:0.10:0.40); pcc = portfolioCostCurves(k,PortfolioData,“美元”,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

市场影响成本数据包含:

  • Average trade size across all stocks in the portfolio

  • 股票数量in the transaction

  • Sum of traded value across all stocks in the portfolio

  • 投资组合中所有股票的贸易价值的绝对价值之和

  • 平均执行量百分比以完成股份数量

  • 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 total dollar value

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

图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);情节(Size10,Cost10,Size20,Cost20,Size30,Cost30,Size40,Cost40)网格on轴([2 11 25 200])Xlabel({'Size','(%ADV)'}) ylabel({'Cost','(bps)'}) legend('pov = 10%','pov = 20%','POV = 30%','POV = 40%',。。。'Location','northwest') 标题('Portfolio Costs')a = gca;a.xaxis.ticklabelformat ='%G%%';

绘图图显示了一个带有四个投资组合成本曲线的图。每条曲线显示出不同百分比的体积速率。

该图证明了使用投资组合成本来构建投资组合并管理投资组合内容。通过分析投资组合成本,您可以确定最佳投资组合规模。

Input Arguments

全部收缩

交易成本分析, specified as a KRG object created usingkrg

投资组合数据that describes the stocks in the portfolio, specified as a table or structure.文件夹must contain these variable or field names.

变量或字段名称 描述

象征

库存符号。

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

平均每日体积。

Volatility

Volatility.

分享

数量的股票。

The number of symbols in the portfolio data must match the number of values for each market-impact parameter in themiDataproperty ofk。有关市场影响参数的详细信息,请联系Kissell研究小组。

例子:文件夹= table({'XYZ'},100.00,100.00,860000,0.27,550,'VariableNames',{'Symbol' 'Price_Local' 'Price_Currency' 'ADV' 'Volatility' 'Shares'})

例子:portfolio = struct('符号','xyz','price_local',100.00,'price_currency',100.00,'adv',860000,'volatitions','volatitions',0.27,sharees','sharees',550)

These examples do not represent real market data.

Data Types:struct|桌子

贸易数量,指定为这些价值之一。

价值 贸易数量描述

“美元”

Total dollar value of the portfolio

'PercentValue'

投资组合总美元价值的百分比

Trade quantity range, specified as a vector.文件夹CostCurves将这些价值与贸易策略范围值一起使用,以估计不同数量和策略的市场影响成本。

例子:'Size',(0.01:0.01:1)指定一个贸易数量范围with increments of 0.01 starting from 0.01 and ending at one

Data Types:双倍的

贸易策略,被指定为这些价值之一。

价值s 贸易策略名称

'pov'

数量百分比

“ tradetime”

Trade time in percentage of the day

Trade strategy range, specified as a vector.文件夹CostCurves将这些值与贸易量范围值一起使用,以估计不同数量和策略的市场影响成本。

例子:'pov',(0.05:0.05:0.5)指定贸易策略范围,增量为0.05,从0.05开始,结束为0.5

Data Types:双倍的

Output Arguments

全部收缩

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

变量或字段名称 描述

Size

Average trade size across all stocks in the portfolio.

分享

股票数量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

投资组合中所有股票的贸易价值的绝对价值之和。

POV

平均执行量百分比以完成股份数量。

TradeTime

全天的平均交易时间以完成股票数量。

cost_bp

市场影响成本在本地价格的基础上。

cost_dollarsPerShare

每股美元的市场影响成本。

cost_dollars

Market-impact cost in total dollar value.

提示

  • 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, seeInput Arguments

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

References

[1]基尔,罗伯特。“交易成本分析的实用框架。”Journal of Trading。Vol. 3, Number 2, Summer 2008, pp. 29–37.

[2]基尔,罗伯特。“算法交易策略。”博士论文。福特汉姆大学,2006年5月。

[3]基尔,罗伯特。“投资过程中的TCA:概述。”Journal of Index Investing。Vol. 2, Number 1, Summer 2011, pp. 60–64.

[4]基尔,罗伯特。算法交易和投资组合管理科学。Cambridge, MA: Elsevier/Academic Press, 2013.

[5]基尔,罗伯特和莫顿·格兰茨。Optimal Trading Strategies。纽约,纽约:Amacom,Inc.,2003年。

Version History

Introduced in R2016a