I was looking at the recent Forum post by Shawn (‘scrichley’) about Mean Reversion: “QQQ mean reversion coding question.” What woke me up was the fact that when I tried to run a Sim based on Yuval’s settings, and I realized there is a critical selection that seems to no longer be available for “Price for Transactions” under the ‘General’ tab. Unless I’ve been living in a parallel universe and took the wrong off-ramp, didn’t we formerly have the following price option available for Sim transactions?

High + Low + (2 x Close) ÷ 4

DID I MISS SOMETHING??? Now all I see are these options:

• Previous Close
• Next Average of High and Low
• Next Open
• Next Close

I have run an investment advisory website based on quantitative/algorithmic investing for the last 23 years, and since 2003-2004 have used Portfolio123 for my testing and portfolio-management needs (with an ‘Ultimate’ membership) because I was able to most accurately test and operate strategies here. I hope that hasn’t changed!

We recommend in our ‘Best Practices’ article for clients, and it is a generally accepted Best Practice in the ETF industry that buyers and sellers of ETFs should avoid the opening and closing hours, due to the increased price volatility of constituent stocks during those hours. An ETF’s price represents the prices of dozens, hundreds, or thousands of individual companies, depending on the ETF. Those individual equities can have wide price swings and wide spreads during the opening and closing hours - a time when stock volume and volatility are at their highest, largely because of the increased activity of prop desks and day traders. Because of these extremes, at the open and close, ETF prices are (at best) an approximation of the accurate price.

To reflect this advice, my models have always used this formula (available in P123) to best reflect a mid-day price: High + Low + (2 x Close) ÷ 4

It now appears that option is no longer available to us in Sims. Can I ask why? Did I miss an announcement?

I don’t know when this setting was removed, but of the six live strategies I currently offer at, there was only one transaction this past Monday. When I calculate the price recorded for SSO on Monday, November 30 ($139.72) in the Live Portfolio version of my ‘S&P 500 Bull/Bear Strategy,’ it appears to be calculated using the formula mentioned above, which gives a heavier weight to the Closing Price than it does the High and Low prices.

So, if the prices used for transactions in a LIVE Strategy are still based on the regular formula (High + Low + (2 x Close) ÷ 4), why has that option been removed from the transaction options in Simulations? Aren’t simulations intended to provide us with accurate representations of Annualized Return and Max Drawdown (i.e., Proof of Concept)? If we can’t price transactions in our Sims to accurately reflect the prices obtained in Live Ports, hasn’t that removed a significant advantage of P123? Thank you.

I’ve never seen that listed as an option, and I’ve been a user for quite a few years now.

That was my impression/belief: That I had never seen this in a sim. But P123 has used this.

I think Yuval will say (we discussed before in a thread that compared a sim with a port on auto) that this method is what a port uses when it is put on auto. Perhaps, that is where the idea come from.

Indeed, as Daniel and Jim say, that option has never been available in simulations. It is the formula we use for prices in live models.

OK, I guess I got confused.

For what it’s worth I’ve had a post-surgical infection in my back for a while that is causing me to have a high fever. Doctors are unable to resolve it (so far).

That’s my excuse and I’m sticking with it. I’ll try not to sign any important papers for a while. This would be the optimum time to sell me a bridge in Florida. haha

Maybe there is a logical reason about which I’m not familiar, but why in the world would P123 not offer this formula in sims…

High + Low + (2 x Close) ÷ 4

…if it is the default formula for the price of Live Trades? I have run backtests on thousands of Sims during the past 17 years that I’ve been a member of P123. I have tried all the options for pricing many times, and there can be significant differences in the results depending on the option selected.

As a practical matter, I have also attempted to make trades at the Open and at the Close of the trading day. I can’t know the experience of other users, but I have found it impossible to match the recorded historical prices at the Open and Close. For example, if we try to buy or sell at the Close of the session, we can miss out on that trade by a fraction of a second - depending on the speed of our order’s transmission and it won’t be filled. Prices also change dramatically as the close gets closer. The accuracy of the execution of trades varies widely from one broker to another.

It seems pretty obvious that the formula above is what we would want to use for pricing in our Sims if we are seeking to assess potential Out-of-Sample results. It also seems that it would be incredibly easy to add this option since it’s just basic math. Since you’re supposed to be the product manager, Yuval, can you enlighten me on why this formula can’t be added as an option for the transaction price in Sims?


It would be nice to be able to compare a port on auto directly to its sim without having to go through all of the hand-waving about the differences in the prices for each affecting any comparisons. Or without having to edit each of the transactions in the port to be sure that there is not a meaningful difference between the sim and port’s transaction prices.

It would not matter to me whether that involved a change in the sims or a change in the ports.




It is a problem if we have to deal with different results between ports/sims and should be addressed in a serious manner. It affects how much we can trust/rely on the sims to make actual profit (and to stick to the strategy during period of drawdowns).

By the way, I just send you a message.

Pls check your email.



Or price all models with daily VWAP.