Custom slippage feature

Can you please add the ability for the user to create a custom slippage formula to the road map?

Thanks
Tony

2 Likes

We have released a new "Advanced Slippage" that may do what you need. A formal announcement is coming soon. Here's the KB article about it Transaction Cost Models

You can find Advanced Slippage in the General tab of portfolio simulations:

5 Likes

Thanks Marco!!!. With K = 2.5 most of the decay from my sim results vs live out-of-sample for my port results is gone. This is a huge advance as far as realistic expectations for future returns based on a backtest.

It also suggests that overfitting is not always the major cause of out-of-sample decay. Maybe realistic return expectations for our ML models using validation and test samples (which reduces any overtftting) is possible!!! That is impressive.

But also, I think this will give a much better determination of the best sell rule based on RankPos or Rank in a sim—balancing signal decay and transaction costs with realistic numbers for the transaction costs. So it has a use-case for making better models. I have already changed the sell rule in my port.

Excellent!

3 Likes

Here is a Public Slippage Calculator using P123's default K and L. It can also be used to regress K and L using the calculated impact and spread in this screen.

Note: K and L are not universal constants and will vary according to your trading method.

Screenshot of rules:

Please let me know if I made an error or if this differs significantly from P123's method. My contribution on what I know:

This uses P123's PctDev and may not use log returns to calculate volatility. P123 says it uses the standard deviation of the log returns to calculate volatility here: Transaction Cost Model (a.k.a. Slippage) - Portfolio123 - Help Center. I think there is no practical difference between returns and log returns for this application and I did not develop a custom formula using log returns.

Any other errors or deviation from P123's method much appreciated!