Wrong transaction price in simulation

Transaction prices in sim are not correct, and therefore the performance is totally wrong.
See this very simple sim:
https://www.portfolio123.com/port_summary.jsp?portid=1511047

Here is the exposure list used in this sim:
01/01/07 11/14/17
11/17/17 11/30/17

For “Next Open”, the following prices are used in sim:
Date Type Ticker Shares Price
11/17/17 SELL -928.0 $107.91
11/15/17 BUY 928.0 $107.69

But from https://www.portfolio123.com/app/stock/prices/XIV
Date Open High Low Close Volume
11/17/17 108.01 110.51 107.85 109.70 7,489,223
11/16/17 107.19 109.25 107.19 107.91 6,631,608
11/15/17 104.58 106.20 101.82 103.50 11,429,820

XIV open price is $108.01 on 11/17/17
XIV price never goes up to $107 on 11/15/17

Looks like it is buying at the previous close instead of the next open.

11/15 buy of 107.69. 11/14 close is 107.69.

11/17 sell of 107.91. 11/16 close is 107.91.

Yes, you are correct that P123 is using “Previous Close” price for “Next Open” transaction.
The bug makes “Next Open” simulations useless. Hope the problem is not widespread.

I did more tests and found this bug very interesting.

P123 still uses “Previous Close” price in simulation even I choose “Next Average of Hi and Low” and “Next Close” for “Price for Transactions”.

It’s falling back to previous close on the final week of the backtest (affecting daily rebalance), so it’s not a widespread issue. I’ll see what I can do. Thanks for investigating it.

It should be behaving as expected now.