主要内容

Rank Broker Performance

此示例显示了如何使用Kissell Research Group的交易成本分析来确定跨交易的最佳经纪人。您可以根据经纪人的增值和到达成本对经纪人进行排名,然后确定哪些经纪人在哪些市场条件和交易特征方面表现最佳。积极的增值添加表明,在实际的市场状况和贸易特征的情况下,经纪人超出了绩效期望,从而节省了资金。负值添加表明经纪人没有达到绩效期望,这导致基金的成本增长。

In this example, you find which brokers over- or under-perform by comparing arrival costs and estimated trading costs. A broker with an arrival cost that is less than the estimated trading cost over-performs, which causes the fund to save money. A broker with an arrival cost that is greater than the estimated trading cost under-performs, which causes the fund to incur an incremental cost.

This example also shows how to estimate costs by broker, which requires custom market-impact parameters for each broker.

您可以使用与此示例相似的步骤来对交易场所和算法进行排名。

To access the example code, enteredit KRGTradePerformanceRankingExample.mat the command line.

在此示例中执行代码后,您可以使用Bloomberg提交执行订单®, 例如。

Retrieve Market-Impact Parameters and Load Data

Retrieve the market-impact data from the Kissell Research Group FTP site. Connect to the FTP site using theftp使用用户名和密码函数。导航到MI_Parameters文件夹并通过Broker代码检索市场影响数据mi_broker.csv文件。miData包含加密的市场影响日期,代码和参数。

f = ftp('ftp.kissellresearch.com','用户名','PWD');mget(f,'mi_broker.csv');关闭(f)midata =可读取('mi_broker.csv',“定界符”,',',。。。“ readlownames',错误的,'ReadVariableNames',true);

创建Kissell研究小组交易成本分析对象k。Specify initial settings for the date, market-impact code, and number of trading days.

k = krg(miData,datetime('today'),1,250);

Load the example dataTradeData,篮子, 和BrokerNames, which is included with the Datafeed Toolbox™.

loadkrgexampledata.matTradeData篮子BrokerNames

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

计算每个经纪人的成本

选择贸易类别。计算每个经纪人的平均到达成本,市场影响成本和经纪人的增值。

TradeData。TradeSize = TradeData.Shares ./ TradeData.ADV; TradeData.ArrivalCost = TradeData.SideIndicator .*。。。(TradeData.AvgExecPrice ./ TradeData.ArrivalPrice-1) * 10000; TradeData.MI = marketImpact(k,TradeData); TradeData.ValueAdd = TradeData.MI - TradeData.ArrivalCost;

Retrieve broker names and the number of brokers. Preallocate output data variables.

uniqueBrokers = unique(TradeData.Broker); numBrokers = length(uniqueBrokers); avgCost = NaN(numBrokers,1); avgMI = NaN(numBrokers,1); avgValueAdd = NaN(numBrokers,1);

按平均经纪人增值添加等级经纪人

Calculate broker ranking using a transaction size between 5% and 10% of average daily volume (ADV). Calculate average arrival cost, average market-impact cost, and average broker value add.

Indbroker =(TradeData.Tradeize> = 0.05)&(TradeData.TradeSize <= 0.10);如果任何(Indbroker)TD = TradeData(Indbroker,:);fori = 1:numbrokers j = strcmp(td.broker,唯一经纪人(i));如果任何(j)avgcost(i)=平均值(td.arrivalCost(j));avgmi(i)=平均值(td.mi(j));avgvalueadd(i)=平均值(td.valueadd(j));endendend%获得有效的平均成本值(非南方)indavgcost =〜isnan(avgcost);

创建一个表来存储代理排名。这种the ranking by average cost.

brokerrankings = table(唯一经纪人(indavgcost),(1:sum(indavgcost)))',。。。AVGCOST(indavgcost),AVGMI(IndavgCost),Avgvalueadd(indavgCost),。。。'VariableNames',{'Broker','Rank','AvgArrivalCost','avgmi','AvgValueAdd'});Brokerrankings = Sortrows(Brokerrankings,-5);brokerrankings.rank =(1:sum(indavgcost))';%重置等级

使用条形图比较平均代理值添加基点。

BAR(BROKERRANKINGS.AVGVALUEADD)SET(GCA,'Xticklabel',brokerrankings.broker)ylabel(“平均值添加(BP)”) 标题('Average Value Add by Broker') 网格

绘图图显示了经纪人的平均值添加的条形图。

The brokerBroker2over-performs whileBroker3跨交易的表现不足。决定使用Broker2for future transactions.

Estimate Trading Costs for Trade List

Estimate the trading costs for each broker using a specified order or trade list.

% Get the number of orders from the trade list tablenumorders = size(basket.symbols,1);% Calculate pre-trade cost for each broker for each orderBrokerPreTrade = zeros(numOrders,numBrokers);fori = 1:numBrokers% Market-impact code for broker corresponds to the MICode in the market% impact data, for example, Broker1 = 1.k.MiCode = i;%计算每个经纪人的市场影响成本BrokerPretrade(:,i)= MarketImpact(k,basket);end%将输出转换为具有用作行名的符号的表。BROKERPRADE = ARRAY2TABLE(BROKERPRATE,,'VariableNames',。。。Brokernames.Broker,'RowNames',basket.symbols);

Compare Market-Impact Costs by Broker

用于一只股票ABC, compare market-impact cost in basis points for each broker using a bar graph.

% Plot best broker for given stockbar(table2array(BrokerPretrade(1,:)))SET(GCA,'Xticklabel',brokernames.broker)ylabel(“市场影响成本(BP)”) 标题([“经纪人符号的市场影响成本”。。。BrokerPreTrade.Properties.RowNames{1}]) grid

Plot figure displays a bar graph of the market-impact cost for each broker for the stock symbol ABC.

The brokerBroker8市场影响最高,并且Broker1has the lowest one. Decide to useBroker1for executing the transaction using stockABC

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

参考

[1]基尔,罗伯特。算法交易和投资组合管理科学。马萨诸塞州剑桥:Elsevier/Academic Press,2013年。

[2]罗伯托·马拉默特(Malamut)。“用于贸易计划的多周期优化技术。”在2002年4月的QWAFAFEW纽约会议上的演讲。

[3] Kissell, Robert, and Morton Glantz.Optimal Trading Strategies。纽约,纽约:Amacom,Inc.,2003年。

See Also

|

相关话题