Index | Recent Threads | Who's Online | Search

Posts: 16    Pages: 2    1 2 Next
Last Post
New Thread
This topic has been viewed 2322 times and has 15 replies
Jrinne
Trade costs may be a function of the quantity of stocks purchased ^3/2

Multiple sources show that the equation for slippage includes the term (Q/V)^0.5. Where Q equals the quantity of stocks purchased and V equals the total volume of stocks traded that day.

But this is the cost of the nth stock I buy.

To get the total slippage for all of the stocks that I purchased I would have to integrate that wouldn't I? I want to know the area under the curve for the costs of each stock. If I buy 5,000 stocks the last stock will cost more than the first and I want to know the cost of all of the stocks I purched: not just the last stock I purchased.

So if that is the case then my total costs equation should include the term (Q/V)^3/2, I think. By integration.

In a linear regression for stocks I have purchased this year using window trades this seems to provide the best fit. See attachments.

I find this useful for determining questions such as: What will happen if I double the amount of money in one of my ports? What is the maximum liquidity this port will allow?

Using "predict" in R, I seem to be getting pretty accurate answers to these questions—so far.

And generally my estimations of slippage seem much more accurate because every purchase that I have made affects my calculations for slippage. By this I mean that a single port may have an outlier(s) that may affect the calculation of my slippage for that port. But if I know the average daily volume of the stocks traded and the average quantity of stocks I purchased for that port the calculation using the regression is a better estimate of what the slippage will be in the future.

Again "predict" in R is helpful for this but the calculations can be done with a hand calculator (or in Excel). Just remember the commutative and associative properties allow you to use averages (being a little careful about when you use the ^3/2 power).

This may or may not be useful for your type of trading. Any ideas on improvement welcome.

-Jim

Attachment Screenshot 2017-04-16 07.16.16.png (109258 bytes) (Download count: 105)


Attachment Screenshot 2016-03-12 18.54.02.png (158057 bytes) (Download count: 105)


Great theory, "and yet it moves."
-Quote attributed to Galileo Galilei (1564-1642) gets my personal award for the best real-world use of an indirect proof or reductio ad absurdum.
`

Apr 16, 2017 6:52:29 AM       
Edit 7 times, last edit by Jrinne at Apr 16, 2017 7:16:28 AM
geov
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

So let's assume you buy 3,000 ETF VTI on 4/13/17 @ $120.00. That is a trade of $360,000, not an insignificant amount.
04/13/17: open=120.15, Hi=120.56, Lo=119.55, close=119.55, V=2,850,692

Then according to your formula expected slippage= (3000/2850692)^1.5= 0.000034= 0.0034%, basically zero slippage, as this trade is too small to affect the price.
If this is this correct, then the min slippage for ETF Designer Models should not be 0.1%.

For a slippage of 0.1% one would have to trade 28,500 shares for $3,420,000.

Apr 16, 2017 9:06:59 AM       
Edit 1 times, last edit by geov at Apr 16, 2017 9:12:58 AM
Jrinne
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

So let's assume you buy 3,000 ETF VTI on 4/13/17 @ $120.00. That is a trade of $360,000, not an insignificant amount.
04/13/17: open=120.15, Hi=120.56, Lo=119.55, close=119.55, V=2,850,692

Then according to your formula expected slippage= (3000/2850692)^1.5= 0.000034= 0.0034%, basically zero slippage, as this trade is too small to affect the price.
.


Thank you. If you do your own regression with your slippage data you will have a y-intercept.

The equation will be slippage = m(Q/V)^3/2 + b. So you will find your own "b" that will be above zero slippage. I did not include that part of the Excel regression because it would not be useful (probably) to your liquidity and for your trading method. You will also find your own "m" or slope of the line.

In practice would "b" end up being the BID/ASK spread or 1/2(BID/ASK) spread for stocks with very high daily volumes? I don't know but this would seem to be the lower theoretical limit. My regression is very accurate and it doesn't seem to matter. But I did not mean to give the impression that the y-intercept would be zero.

It is a little more math than I like but in the end it is just a linear formula and a linear regression with manipulation of (Q/V) first.

I appreciate your comments

-Jim

Great theory, "and yet it moves."
-Quote attributed to Galileo Galilei (1564-1642) gets my personal award for the best real-world use of an indirect proof or reductio ad absurdum.
`

Apr 16, 2017 9:22:12 AM       
Edit 6 times, last edit by Jrinne at Apr 16, 2017 9:30:47 AM
geov
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Jim, thank you for the clarification.
Slippage is important for high frequency trading of ETFs.

Apr 16, 2017 9:57:07 AM       
primus
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Robert Almgren and Jim Gathedral are probably the leading expert of trading costs.

Notably, Almgren was converted to the 3/5 power rule through the fitting of lots of institutional data:

The academic paper: http://www.cims.nyu.edu/~almgren/papers/costestim.pdf

And the precis: http://corp.bankofamerica.com/publicpdf/equities/Equity_Mkt_impact.pdf

I've borrowed a lot from Robert's work, but I am unconvinced regarding the presence of 3/5 power law. The null hypothesis is still that the root power law should be the one observed (Jim Gathedral's work on the differential math contains the best proofs, I think). I think the failure to confirm the root power law is a result of: a) noise; and, b) the inability of the model to capture a key dynamic. Therefore, I still use the root power law.

I see myself as having zero edge in short-term trading, so I quantify my expected trading costs in terms of slippage + commissions + temporary impact + permanent impact. If the expected costs do not overcome the expected upside, then I trade. Philosophically, that is what I view as the proper role of trading to an investor: to quantify the expected net costs and come up with strategies for efficient execution.

On a side note, I think that all the stuff we continuously get bombarded with on CNBC, Bloomberg, and elsewhere about trends, patterns, etc is just "useful fiction". It's useful to sell-side analysts and brokers who benefit by increased activity; it may be useful or counterproductive to other market participants; it's not useful to me, though. The problem with any sufficiently convincing myth is that it is both well-intended and insidious. Our brains are wired to pick out patterns which have historically resulted in increased chances of survival and reproduction. In the wild and in the human worldly experience, these patterns are more often than not useful. In the casinos, however, they are just counterproductive remnants our of primal selves.

Anyway, if anyone is interested, I can send them a copy of a screen which implements the Almgren canonical estimate of cost with intraday variance estimation using the Yhang-Zhang (YZ) OHLC estimator. YZ is the most efficient estimator out there without the use of true intraday day.

"The world is. The world is. Love and life are deep maybe as his eyes are wide." - Rush, "Tom Sawyer"

Apr 16, 2017 2:09:35 PM       
Jrinne
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

David,
Thank you!

I saw this and tried incorporating volatility of the stock for a while. I am a bit lazy.

Do you get that this is the cost of the nth stock and you would integrate the equation to get your total slippage? It makes a big difference. I see the end of my liquidity--in the not too distant future--if total slippage increases by a power greater than 1.

The pattern of my residuals did not look good at all when, naively, I tried a regression with (Q/V)^1/2. So bad that I stopped recording the daily volumes for a while which is why I do not really have that many data points.

Formula from your link attached.

Jim

Attachment Screenshot 2017-04-16 15.16.30.png (28798 bytes) (Download count: 91)


Great theory, "and yet it moves."
-Quote attributed to Galileo Galilei (1564-1642) gets my personal award for the best real-world use of an indirect proof or reductio ad absurdum.
`

Apr 16, 2017 2:21:52 PM       
Edit 9 times, last edit by Jrinne at Apr 16, 2017 2:43:51 PM
geov
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Using the Almgren formula one would get a slippage of 0.1% for a trade of 55,000 VTI ($6.7M), assuming the trade is spread over 2.5 hours.
So the P123 requirement of 0.1% slippage for ETF DM-models is very conservative.

However, doing the same calculation for VOE, one would get a slippage of 0.1% for a trade of 8,700 VOE ($0.88M).

Attachment Slippage Calculation for VTI.png (100869 bytes) (Download count: 69)


Apr 17, 2017 11:28:03 AM       
Edit 1 times, last edit by geov at Apr 17, 2017 11:45:32 AM
yorama
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

I studied my slippage trading costs (for close to 3000 stock trades, with every stock trade including multiple transactions).
I looked for slippage in relation to opening price of the day, which is before I start to trade.
My best fit for TOTAL slippage % (not just for the last stock traded) calculated as the difference between AVERAGE trade price and opening price, turned out to be: Slippage % = 0.02*my volume % of daily traded volume^0.5.

Apr 17, 2017 12:46:31 PM       
yuvaltaylor
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Since I trade almost exclusively in microcaps using limit orders, the traditional equation isn't terribly applicable to my slippage costs, which average around 0.5% or 0.6%. Here's the reason. If I'm buying 2% of the average daily volume of one stock and 50% of the volume of another, the traditional equation says that my total slippage will be five times higher for the second buy as it was for the first. (If I were to use Jim's formula--raising Q/V to 3/2 instead of 1/2--it would be 125 times higher, which is a real problem with Jim's formula IMHO.) These huge differences are not at all what I've experienced; and the conventional Q/V formula was not meant to apply to microcaps or buys of 50% of daily volume. My slippage is roughly inversely proportional to the logarithm of the average daily dollar volume of the stock, and is not terribly affected by the volume of my buy. My formula for slippage is 0.054-0.0039*ln($vol), so a dollar volume of $20,000 gets a slippage of 1.5%, a dollar volume of $100,000 gets a slippage of 0.9%, and a dollar volume of $1 million gets a slippage of 0.01%. With dollar volumes higher than $2 million, I experience negative slippage--in other words, my limit orders get filled, on the average, at a better price than the opening. Now by not factoring market impact into my slippage costs, I may be underestimating the cost of large buys, and I might change my estimating mechanism in the future. But I doubt I'm going to be using (Q/V)^0.5. Maybe (Q/V)^0.2 . . .

Yuval Taylor
Product Manager, Portfolio123
invest(igations)
Any opinions or recommendations in this message are not opinions or recommendations of Portfolio123 Securities LLC.

Apr 17, 2017 1:15:26 PM       
Jrinne
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Since I trade almost exclusively in microcaps using limit orders, the traditional equation isn't terribly applicable to my slippage costs, which average around 0.5% or 0.6%. Here's the reason. If I'm buying 2% of the average daily volume of one stock and 50% of the volume of another, the traditional equation says that my total slippage will be five times higher for the second buy as it was for the first. (If I were to use Jim's formula--raising Q/V to 3/2 instead of 1/2--it would be 125 times higher, which is a real problem with Jim's formula IMHO.) These huge differences are not at all what I've experienced; and the conventional Q/V formula was not meant to apply to microcaps or buys of 50% of daily volume. My slippage is roughly inversely proportional to the logarithm of the average daily dollar volume of the stock, and is not terribly affected by the volume of my buy. My formula for slippage is 0.054-0.0039*ln($vol), so a dollar volume of $20,000 gets a slippage of 1.5%, a dollar volume of $100,000 gets a slippage of 0.9%, and a dollar volume of $1 million gets a slippage of 0.01%. With dollar volumes higher than $2 million, I experience negative slippage--in other words, my limit orders get filled, on the average, at a better price than the opening. Now by not factoring market impact into my slippage costs, I may be underestimating the cost of large buys, and I might change my estimating mechanism in the future. But I doubt I'm going to be using (Q/V)^0.5. Maybe (Q/V)^0.2 . . .


All true if you assume the BID/ASK spread for microcaps is zero.

Or for a linear regression that the Y-intercept is zero.

-Jim

Great theory, "and yet it moves."
-Quote attributed to Galileo Galilei (1564-1642) gets my personal award for the best real-world use of an indirect proof or reductio ad absurdum.
`

Apr 17, 2017 1:23:42 PM       
Edit 2 times, last edit by Jrinne at Apr 17, 2017 1:28:47 PM
Posts: 16    Pages: 2    1 2 Next
 Last Post