Proposed New Default Slippage and Commissions

About three years ago, before Quantopian even launched, we set default slippage and commission models. The models weren't perfect, but they were the best available based on what we knew. We left a lot of room for customization of the control variables, and later, we even added the ability to create an entirely custom slippage model. The features worked pretty well.

Then, we took the ability to customize away! We didn't really mean to, of course. But when we launched the contest (when we started evaluating for the fund), we needed to have a level playing field. We started forcing those algorithms to use the default slippage model. The default was no longer optional. Suddenly, the choices we had made three years ago were under a lot more scrutiny, and they need an update.

This revision is very much aimed at supporting the hedge fund. We're trying to make it easier to create strategies that work for the fund, so we're making default choices that are good fits for the fund. Keep in mind that if these assumptions don't fit your choices, you can still customize the slippage for your purposes.

I'm very interested in everyone's feedback about these changes, particularly from the perspective of the fund and the contest.

Proposed changes:

• Default commission model goes from $.03/share to$.0075/share. This change is inspired by the IB API-directed per-share cost. We considered putting in a $1 minimum order price, but we think we will be able to avoid that minimum at the scale we're looking at, so we chose not to implement it. • The default slippage model will be changed in two ways. • Instead of being able to take 25% of a given bar for your order, the maximum will be 2.5%. • The price impact will get a new minimum impact amount of$.003 per share.

Graphically, that looks like this:

As a practical matter, this will mean that the large price impacts that people are seeing will largely go away - the maximum price impact will be 0.036% instead of 0.625% that it is today. It will also mean that orders will take as much as 10 times as long to fill as they used to. There will be more orders that stay open in simulation for multiple bars. We think that both of these things are likely to improve the quality of algorithms generated for the fund.

So, what do you think?

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

26 responses

Would any of these settings need to be changed for an individual trader? Reading this, I got the impression that some of it was tweaked for the hedge fund, which I assume will have more bargaining power with IB than an individual.

To avoid partial fills, considering in history() pulling volume to address it.

I think the proposed changes would be a good improvement. For non-contest simulations I've already been using settings similar to those being proposed which has brought my Quantopian simulations in line with other simulation tools.

Seems reasonable! I hope you folks are gathering tons of anonymous execution data from IB so that you can build some better models!

Super stoked to hear about the IB-model implementation. Will the contest be affected at all? Or will the models used for that remain the current ones?

But I can still define the cost that I incurr, right? I don't have these nice rates in live trading!

PB

This model looks more realistic at least for liquid instruments.
One thing I would change: raise bar volume limit to 5%.

Hi Dan,

Along the lines of Simon's comment, it's all about the model validation. How did you arrive at the new slippage model? Could you share your analysis (e.g. post an IPython notebook from the research platform)? Did you consult with Interactive Brokers? Individuals with relevant trading experience? Literature? I need a bit more background before saying "Yep, sounds good."

And what is the game plan to validate and update the default model going forward? For example, over the next month, will you be collecting data, and then revise the default model? You are going to make a change, but how will you quantify the correctness of the change, and then make adjustments?

Is there a path to develop a custom model for a specific algorithm? Say for my winning algo, I wanted to develop an accurate custom slippage model. How would I go about it? Could you provide all of the relevant data from Quantopian and IB for me in the research platform for analysis (e.g. dump it into my data folder)?

Grant

Dan and the Q team,

I think the changes are necessary.

the minimum impact $.003 is almost acting as a minimum bid-ask spread, which I think kinda makes sense for the Q world. but on the maximum 2.5% of last minute's volume I have two thoughts: 1. since it is low, it would encourage more people to think about open-order management. orders from order_target_percent could run over 20 minutes, for instance. 2. aren't you effectively imposing default volume-based iceberg order management in the simulator? This operation wouldn't happen in live trading for large orders though -- it might well be filled within 1 minute (just with terrible prices) -- quite unexpectedly since it took 20 mins in the simulator. just some thoughts! DanCJ - As an individual trader, you might want to choose different settings for commissions and slippage that fit your trading style and broker relationship better. Gary - Yes, there is already a limit of 25% per bar in all simulation. You can read more about it in the docs. It might indeed make sense to look at the trailing volume history and make your orders using that. Antoine - Yes, the contest will be affected. I haven't decided how to implement it yet, though. One clear objective is that it be applied fairly to everyone. My current thought is to use the new slippage in the May contest. That would mean that all backtests need to be re-computed with the new models (we'd do that on the back end automatically, you wouldn't have to do anything). All live algorithms would cut over on the same day. That isn't quite perfect because an algorithm's past live trading history would be on the old model, but I think it passes the fairness test. Peter - Yes, we aren't taking away any of the customization options. We're just changing the defaults. Vlaidmir - Thanks for the feedback, we will consider it. Simon and Grant - The proposal is based more on industry expert advice than our data set. Our data set is of limited utility so far and needs a broader set of data. I don't anticipate that we'll have enough data to validate or further update it in the near term. Of course, we will make any updates that we think make sense, just like we're making this one. The feedback and examples we get from the community make a big difference in our thinking. And Grant - we definitely want to make live trading data available in the research environment, much as we have made backtests, but we haven't gotten there yet. James - I agree that this should make people think about order management more. We like that! However, in live trading for individuals, you are right, there is risk of bad, quick fills. I need to think more on how to mitigate that. The good news is that our largest individual traders are all taking advantage of orders like VWAP Best Effort and Relative orders. In the fund, we will most likely be using advanced order types, too, in order to manage that risk. Hi Dan, Huh? Gotta walk the walk, dude. Your company name is Quantopian as in "quantitative." I would think that both Q and IB are logging everything an algo does versus time, for QC, compliance, and liability. But instead of using the data, you are using "industry expert advice." And you are purporting to facilitate "hacking Wall Street" but you are consulting with Wall Street experts, and trusting them? I'm so confused! Just trying to help... Best regards, Grant I second Grant, especially on the max bar percent and price impact. Another thing to note: hedge fund usually combine algos, having cost associated with each algo will create multiple cost counting when combined. This inherently rules out good algos with higher turn over but could be combined to lower turn over. Hence, at individual algo level performance with and without trading cost are both important. Do Quantopian's terms of use allow them to analyse people's trades? That would make me uncomfortable. I see Unless you choose to share your Content, your Content will remain private. Quantopian will not review, share, or otherwise make use of private Content except as specifically provided in our Privacy Policy or this Agreement. If in the course of providing technical support or other maintenance of the Services it becomes necessary for Quantopian to view your private Content, such viewing will be restricted to the very specific technical purpose. Quantopian is seeking high-quality strategies to invest in. Towards that end, we may review the results of your backtests and live trading. We may review the performance and other "data exhaust" of your Content. Such performance information includes, but is not restricted to, returns and risk measurements of any backtest or live trading executed with the Content. We may generate additional performance data from your Content for the purposes of (a) verifying that software platform changes do not change or break your algorithm or (b) analyzing standardized performance results. We may share anonymized and/or aggregated algorithm performance statistics with third parties. Any usage of performance data will not be made when such usage of performance data would reveal the details and workings of the underlying Content. Any testing or evaluation will be done with the spirit and intent of protecting your Content. but am not sure how to interpret it. I guess trades count as 'data exhaust' though that's a lot more fine-grained than looking at aggregate returns ... This change will obviously destroy all of my algos regarding low volume stocks... So, what are the exact commission and slippage settings we should use to have an algo which won't break in the future? Has this change been implemented? I've been using a custom slippage model and decided to give the default a shot; from what I see, the default still has very high slippage. @ Dan, I have the same question as Alex's. Has this change been implemented? These changes have not yet been implemented, we'll share an update when it's getting close. Disclaimer The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. Is is getting close or we'd better not focus on this change yet when developing algorithms? 1. In addition to the slippage model, quantopian needs to add short selling interest fees for shorting stocks, espicially hard-to-short stocks to be accurate. Otherise, small simulated alpha gains completely disapear in real trading. What's really needed is a variable slippage model that adjusts the slippage based on the liquidity of the stock at the time of trading. A single formula isn't good enough. Need to take user inputs and allow for 'volume based' slippage - likely also need something checking overall market vol. When market vol is high, bid ask spreads get much wider. These market microstructures can have huge impacts on real world results. Tom - the slippage model this thread is talking about is a quadratic-in-volume slippage model. Simon, Thanks. I hadn't read this carefully. Sorry. Tom I do have some very rough data on my order execution over trailing 3 years at IB. Overall, I've done between .2% to .4% worse then VWAP on my executions, using combos of limit and VWAP orders - and I've been trading very small amounts within fairly illiquid stocks - as a test (maybe$10k / position on stocks with trailing 100 day average volume * price of $500k or so. So, the above seems like it might be 'close'. But, I don't have better data. Maybe meaningless, but only data point I have right now. It would also likely make sense to add a 'market volatility' variable to this formula. When market vol spikes, a lot of bid-ask spreads widen significantly - so exiting and entering positions in these time periods gets much more costly. Trying to add this and tune the values so they are accurate will make a huge difference in years like 2011, 2008, etc. The current proposed 'slippage model' is likely highly flawed and will lead to fairly high inaccuracies on thinly traded stocks with high volatility and in certain market regimes. Below is a thought experiment showing why: STOCK A: Average trailing 5,000 minute volume. Has traded an average of$100,000 every minute for the past 5,000 minutes.
Volatility of the trading range. Has traded +-5% of $100,000 in every minute over those 5,000 minutes. Trading range over lookback period. Has traded within +-.2% of$10 for every tick in those 5,000 minutes.
Current trading volume. Is trading $95,000 in the current minute. Broad Market Vix at 15 and steady for months. STOCK B: Average trailing 5,000 minute volume. Has traded an average of$1,000 every minute for the past 5,000 minutes.
Volatility of the trading range. Had not traded more than $100 in 90% of the minutes, but has had a huge volume spike in the past 10 minutes. Trading range over lookback period was in the$10 range, but has been rapidly falling every minute since the volume spike.
Current trading volume. Is trading $100,000 in the current minute. Broad Market Vix at 25 and spiking. STOCK C: Average trailing 5,000 minute volume. Has traded an average of$1,000 every minute for the past 5,000 minutes.
Volatility of the trading range. Had not traded more than $100 in 90% of the minutes, but has had a huge volume spike in the past 10 minutes. Trading range over lookback period was in the$1 range, but has been rapidly rising every minute since the volume spike.

Imagine I’m trying to ‘sell’ these stocks.

I would guess that slippage is likely to be ‘negative’ with Stock C (I can make money and sell the stock for a higher price then in the current minute), very low for Stock A and very high for Stock B. What do these ‘boundary conditions’ this tell us?

Now, how would we rank these stocks in terms of the ‘slippage’ likely on trying to buy?

Stock C will have huge slippage. Stock B may have negative slippage and stock A will likely be very low and symmetrical on the buy and sell sides.

So, all this is simple to show that looking at the volume in the current minute is likely to produce VERY inaccurate slippage calculations.

To be highly accurate, we need to model what the overall market is doing. At a minimum, we need to look at some trailing multiday volume, price, volatility and trend/direction of the underlying - with some additional penalty for periods of very high overall broad market volatility.

If our model doesn’t take all of these into account and doesn’t draw on a huge data set and doesn’t differentiate buy side and sell side slippage based on a variety of market action, it is likely HIGHLY INACCURATE… and we should be HIGHLY cautious in relying on it - meaning that very high turnover systems (especially high turnover systems in lower liquidity stocks, and stocks that have really high vol, really rapid recent changes in price, or very uneven trading ranges) will have HUGE inaccuracies in their backtests.

That really leaves a few options:
a) Get the data sets needed to build highly accurate models
b) Make a simple model that is VERY conservative until we can do a).
a. For this simple model, longer-term lookbacks on the underlying matter. These models should likely include the following:
i. VOLATILITY MODIFIED LOOKBACK PERIOD VWAP.
1. The average of the 50 day average price*volume (VWAP), 10 day VWAP and the minimum 1 day VWAP value over the trailing 30 days on the stock (Higher values lowers slippage).
ii. Price volatility of the underlying over X-period lookback. (Lower values lowers slippage)
iii. RECENT PRICE ACTION.
1. Some form of EMA over the most recent 30 minute trading volume (Higher values lower slippage).
iv. Extra ‘slippage’ penalty during periods of market volatility with VIX over some threshold, say 25. Zero if VIX is lower then this.

It’s likely that the above four can just be put into a ‘slippage calculator.’

If you lack accurate data and can only use 2 of these and a 'guestimate', I would say that a) and b) likely matter more then the others. These seem more likely to be getting at how the algos of ‘market makers’ and various market participants are making their ‘fill order’ decisions. Not having a ‘volatility component’ seems a real mistake.

Until a long period of real data exists, covering 1 full market cycle with periods of huge vol (so at least 5 years), the defaults for Quantopian should be conservatively high with the ability for users to manually set them in their own sims and trading systems.

People can do what they want in their private trading, but for the fund the above seem to make sense.