Index | Recent Threads | Who's Online | Search

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

No, I'm assuming that the bid/ask spread is *very* large for stocks with low dollar volumes and smaller for stocks with high dollar volumes. My slippage estimation is not very far from that employed by P123 in their variable slippage formula.

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:36:27 PM       
Jrinne
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

. 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.)


Just did not see the BID/ASK spread in this calculation.

I had to actually do the regression to get the Y-intercept.

BTW, if someone else gets a different power for best fit when they do a regression that means they get a different power. I'm just sharing my regression and my rational for using (Q/V)^3/2. (Q/V)^0.5 did not work for me. I tried it.

Interesting that I got a higher R (or R^2) than Almgren did. That could change as I get more data but I'm inclined to keep looking at it—for my window trades.

And actually, if anyone has done a lot of calculus recently, I would be interested if my calculation is that different from a simplified Almgren's. I do not think my equation is much different than Almgren's. I posted, in part, so you guys could check that. My equation is integrated and simplified, however.

I get that there can be separate constant when you integrate but wouldn't the constant before integration be zero. The constant after integration becomes part of the Y-intercept in the linear regression. I also get that there is a constant in front of (Q/V) that need to be adjusted with integration (i.e., 1/2C(Q/V)^3/2) but if I am finding this constant when I do the linear regression there is no need to put a constant in front of the term (before or after integrating). It is found by the linear regression.

In other words won't Almgren have a term C|X/VT|^8/5 in his equation when he integrates? And won't he want to integrate if he wants to know the cost of each stock he buys? Unless there is a big difference between 8/5 and 3/2 I'm not sure there is a big difference.

In any case, for now, I do not think I am disagreeing much with Almgren. And there may be other formulas where I may be in complete agreement (see attachment on my original post). In agreement except that I do not include a stock volatility term. Also, any agreement (or disagreement) may depend on how you view the Y-intercept of the linear regression in relation to the BID/ASK spread. I think theory supports the idea that the Y-intercept is 1/2*BID/ASK spread of stocks with large daily treading volumes for my linear regression.

Whether I am correct about the theoretical meaning of the Y-intercept does not matter to me. For now I am please that I have a R that is good. Better than Almgren's published data. So far the linear regression just works.

Whatever you do on this remember, Almgren is just looking at the market impact on the nth stock purchased: NOT SLIPPAGE!!!!! However you may want to calculate slippage that is not what Almgren's equation is calculating. Related but not the same.

Do not use his formula alone--or the one in my first post's image--to calculate slippage!!! Well, if you have a factor for BID/ASK spread you could be close. Could be but you should test it against your own trades. I could not get it to work for me (which resulted in the above posts).

Thank you yorma. Like I said, if you get different numbers its is because you get different numbers (just different data). Or because you don't do window trades (probably): who knows. But it is interesting. Any discussion would be whether my integrated equation is correct. Maybe there is a constant in the integration that I did not account for (not zero as I said with a cx term missing in my equation). But if you are starting with the market impact then adding in the BID/ASK later, someone would have to explain that to me. Or whether it should be integrated (theoretically) in the first place: okay no doubt on that. You want the area under the curve. But my regression does not have to work for everyone.

And in fact, I take no responsibility for those who cannot plug in a few data points into their Excel spreadsheets and determine the power that best fits their own data. "Results not typical. Your results may vary." "Do not try this at home." "Please, consult with your own financial advisor."


-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:43:27 PM       
Edit 74 times, last edit by Jrinne at Apr 17, 2017 8:28:30 PM
primus
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Jim,

There are two issues here: slippage does not equal impact; and the integrated market impact of an arbitrary buy or sell order.

Whatever you do on this remember, Almgren is just looking at the market impact on the nth stock purchased: NOT SLIPPAGE!!!!! However you may want to calculate slippage that is not what Almgren's equation is calculating. Related but not the same.


I agree that slippage is not the same as temporary and or permanent impact on price. But both things affect the price we pay end up paying to enter and/or exit a position, hence the conflation.

The reason why I think market impact and slippage costs get conflated is that neither can be directly observed. It would be nice if we had a time machine to ask the question "what would have Monday's open and close price been had I not traded those days?" However, no such time machine exists. Implicit costs are fundamentally different than direct costs, i.e., commissions and taxes.

Do you get that this is the cost of the nth stock and you would integrate the equation to get your total slippage?


That was not my interpretation. If the author intended practitioners to integrate the cost on a share-by-share basis, why does he then use the ratio of purchase/sale shares over average daily volume? Consider the following:

Almgren is just looking at the market impact on the nth stock purchased


If the market impact is just realized change in transaction price, wouldn't a VWAP order just result in slippage equal to one-half of the expected price change?

Take, for example, the generic model given on page 61 of the following document: http://faculty.baruch.cuny.edu/jgatheral/JOIM2011.pdf

If you integrate the inside of the integrand with respect to v, you do indeed get 3/2 power law. However, it is differentiated with respect to s. For t-s = 1 (i.e., you place a one-time order at the close), the integral is linear and defines itself as its derivative.

But then again, if you your own execution data supports the 3/2 power law, then it probably captures a unique dynamic of your execution strategy. "If ain't broke, don't fix it" seems apropos.

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

Apr 17, 2017 8:56:43 PM       
Edit 2 times, last edit by primus at Apr 17, 2017 9:03:01 PM
yorama
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Jim,
I suggest you check the following study: "Trading Costs of Asset Pricing Anomalies" http://faculty.som.yale.edu/Tobiasmoskowitz/d...AssetPricingAnomalies.pdf
My results are quite similar to those shown on figure 2 "Market Impact by Fraction of Trading Volume" (Page T13).
If I understand correctly, in that article "market impact" is defined as total transaction loss (not just the loss of the last trade).

Apr 18, 2017 3:34:37 AM       
Jrinne
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Jim,

There are two issues here: slippage does not equal impact;


David,

We are in definite agreement here!!!

And considering the title of the paper "Direct Estimation of Equity Market Impact," I share your concerns—in spades.

The paper delivers, as promised, on its title when it gives us equations for " the permanent price impact" and the "temporary impact."

I will look again to see when Almgren makes the switch to a comprehensive slippage calculation that could be used--without modification--by investors at P123. I probably just missed it. Either way, it is a good paper and I appreciate the link and the discussion of it. It is one I looked at before.

A note to those who have not looked closely at the equations: There is no factor or constant for BID/ASK spread in the final equation. He does address BID/ASK spread and its effect (or lack of effect) on "Equity Market Impact." He does not include it because of its lack of effect for what he is looking at.

What would your total slippage be when you buy just one stock? Near zero market impact as the equations suggest. But I am guessing there would not be zero slippage for a market or window order (as in my case). Because of the BID/ASK spread. I am guessing that you might have to pay at least a nickel at times. Okay, to be honest, I have tried this for window trades to get a "control' or a "baseline" for calculating by personal market impact. I am not guessing. I know the answer on how much percentage slippage there is for a single share: A LOT. NOT ZERO!!!! Not near zero.

For me, for my trades, the BID/ASK spread (or a constant incorporating it) has to be somewhere in my equations. Especially, with the nickel spreads.

And this has changed. Perhaps, due to the nickel spreads but can you use any equation over a year old?

You may have to modify the equation for this (or other reasons) too. Start by changing nothing else if you want to—assuming the consideration of BID/ASK spread applies to your trading style. Let me know how it works. And if the 3/5 or 1/2 power does not work then think hard about what the title of the paper says. You may—or may not— be able to find a rational reason to try another power. It is not a simple formula and if you are like me you may seek to simplify it (if nothing else). But if you start there you will be starting where I started. It is taking me a while to get it: everyone, including those who think I never got anything on this, will have to agree with me on that.

David, do you have any data you can share? Did the formula work strait out of the box for you? Did you modify any of the constants based on regressions of your own data? If you have modified it, how do you address BID/ASK spreads with your microcaps? Maybe you use limit orders.

It is a good formula and I am all for people using it with any modifications that you may feel are appropriate. But strait out of the box?: not so much.

Whatever people do: If it works, it works. And that works for me.

-Jim

Jim,
I suggest you check the following study: "Trading Costs of Asset Pricing Anomalies" http://faculty.som.yale.edu/Tobiasmoskowitz/d...AssetPricingAnomalies.pdf
My results are quite similar to those shown on figure 2 "Market Impact by Fraction of Trading Volume" (Page T13).
If I understand correctly, in that article "market impact" is defined as total transaction loss (not just the loss of the last trade).


Thanks!!! Still early. I will definitely check that out today.

And I will keep looking at my data. If (Q/V)^1/2 (or ^8/5 for that matter) ends up working best for my data I will let everyone know.

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 18, 2017 4:18:39 AM       
Edit 71 times, last edit by Jrinne at Apr 18, 2017 11:24:15 AM
Jrinne
Re: Trade costs may be a function of the quantity of stocks purchased ^3/2

Thank You Everyone For Your Help!!!!!

This post also allows me to make some corrections: in my ideas. My data was correct to the best of my knowledge.

@ David (Primus) I now agree with you that ^0.5 or possibly ^3/5 is the correct power

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.

@yorama. It was your quote that made me understand. While my integration may have been (or may not have been) correct I was not calculating the average trade price. This is what you were trying to tell me, I think. For a moment, I thought you were stressing the need for integration of the price impact.

I could spend a lot of time on why I was wrong. But I was having real troubles with this when I tried it before and adopted (Q/V)3/2—perhaps I did not have enough data points with good scatter in the right portion of the x-axis. My last check of the data—that I posted—made me think I was on the right track (confirmation bias). ^0.5 seems to be working better now.

I do not think I would have tried ^0.5 again without your posts and I am almost certain that I would not have realized that ^3/2 is just wrong and has no theoretical support or basis. For those who have any interest in this topic I have redone the same data in the original post with (Q/V)^0.5 on the x-axis. As you can see scatter plot has a better appearance and the R^2 is better than the one in my original post.

Again, all of your comments are greatly appreciated and were very helpful. And I apologize for being slow to understand.

I just wish I could change the original title of this thread.

-Jim

Attachment Screenshot 2017-04-19 09.21.17.png (103805 bytes) (Download count: 28)


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 19, 2017 8:40:22 AM       
Edit 19 times, last edit by Jrinne at Apr 19, 2017 6:33:26 PM
Posts: 16    Pages: 2    Prev 1 2
 Last Post