Main Content


Estimate and compare liquidation costs across stocks



lf = liquidityFactor(k,trade) returns the ratio of liquidation costs due to liquidity demand by stock for an equal investment value, or liquidity factor. liquidityFactor uses the Kissell Research Group (KRG) transaction cost analysis object k and trade data trade.


collapse all

Retrieve the market impact data from the KRG 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('','username','pwd');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...

Create a Kissell Research Group transaction cost analysis object k.

k = krg(miData);

Load the example data from the file KRGExampleData.mat, which is included with the Datafeed Toolbox™.

load KRGExampleData

The variable TradeData appears in the MATLAB® workspace.

TradeData contains these variables:

  • Stock symbol

  • Stock price

  • Average daily volume

  • Volatility

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

Determine liquidity factor lf for each stock using the Kissell Research Group transaction cost analysis object k. Display the first three liquidity factor values.

lf = liquidityFactor(k,TradeData);

ans =


lf returns the ratios for stock comparison due to liquidity demands.

Input Arguments

collapse all

Transaction cost analysis, specified as a KRG object created using krg.

Trade data that describes the stocks in the transaction, specified as a table or structure. trade must contain these variable or field names.

Variable or Field NameDescription


Stock symbol


Stock price


Average daily volume



Example: trade = table({'XYZ'},100.00,860000,0.27,'VariableNames',{'Symbol' 'Price' 'ADV' 'Volatility'})

Example: trade = struct('Symbol','XYZ','Price',100.00,'ADV',860000,'Volatility',0.27)

These examples do not represent real market data.

Data Types: struct | table

Output Arguments

collapse all

Liquidity factor, returned as a vector. The vector values are ratios that compare the liquidation costs due to liquidity demands across stocks in trade for the dollar value and execution strategy.

More About

collapse all

Liquidity Factor

The Liquidity Factor (LF) is a stock-specific measure of price sensitivity to investment dollars.

LF provides investors with a fair and consistent comparison of expected liquidation costs across stocks. LF incorporates stock-specific information to determine its sensitivity to order flow and investment dollars. The LF metric shows the ratio of liquidation costs due to liquidity demand by stock for an equal investment value in each stock. Market impact relies on the order size or shares traded which vary from order to order. LF provides an apples-to-apples comparison across financial instruments. Consider a stock I that has an LF = 0.10 and a stock II that has an LF = 0.20. Stock II is twice as expensive to transact for an equal dollar value. An investor buys or sells $1 million dollars of stock in stock I and stock II utilizing the same execution strategy. The cost of stock II is twice as large as stock I. The LF metric incorporates stock liquidity, volatility, and price to determine the LF trading cost parameter.

The LF model is


σ is price volatility. ADV is the average daily volume of the stock. Price is the current stock price in local currency. a1, a2, a3, and a5 are the model parameters.

Model ParameterDescription


Price sensitivity to order flow


Order size shape


Volatility shape


Price shape


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

  • You can expand the LF model to include a stock-specific factor such as market capitalization, beta, P/E ratio, and Debt/Equity ratio. In this case, Xk denotes the stock-specific factor and ak denotes the corresponding shape parameter. For details about implementing an expanded LF model, contact the Kissell Research Group.


[1] Kissell, Robert. “A Practical Framework for Transaction Cost Analysis.” Journal of Trading. Vol. 3, Number 2, Summer 2008, pp. 29–37.

[2] Kissell, Robert. “Algorithmic Trading Strategies.” Ph.D. Thesis. Fordham University, May 2006.

[3] Kissell, Robert. “TCA in the Investment Process: An Overview.” Journal of Index Investing. Vol. 2, Number 1, Summer 2011, pp. 60–64.

[4] Kissell, Robert. The Science of Algorithmic Trading and Portfolio Management. Cambridge, MA: Elsevier/Academic Press, 2013.

[5] Kissell, Robert, and Morton Glantz. Optimal Trading Strategies. New York, NY: AMACOM, Inc., 2003.

Version History

Introduced in R2016a