"Simulated Book" of "Live Strategies" statistics is screwed up after cash is added/removed

This is a “Simulated Book” test case showing the bug:
https://www.portfolio123.com/port_summary.jsp?portid=1625113

After cash is added to both “Live Strategies” assets, all performance/return statistics go haywire.

I wonder if it is possible to fix?

No. The “book” performance is always calculated simply on the basis of the assets it holds, without regard to how much of the assets is in cash. Since the assets increased in value, the performance increased as well.

Yuval,

I have noticed what Hengfu is saying before with Books (and not with individual sims or ports). Marco confirmed this behavior soon after the Book feature was release in a thread where I gave an example as Hengfu has done here.

I was going to duplicate the behavior (again) but Hengfu has already made this point quite well I think (image below is from his link above).

Hegnfu’s book had 2 assets (Value & Mom $100K - N/A neg impact - Copy and GARP $100K - Copy). Neither is responsible for the spike at the end as near as I can tell. The equity curve for these individual ports are below.

Neither of these assets seem to be responsible for the spike in the equity curve at the end for the Book.

Numerically, the risk measurements do not look right to me either. I can always miss something (and am looking for what I may have missed) but I cannot find it here. Which asset is responsible for the great Book result?

So far, I can see why Hengfu might think the equity curve for the Books can be misleading. I might be making multiple errors and perhaps Books have been changed since my first post on this subject (and I missed it). But I use P123’s Accounts and never Books for my ports because of this apparent behavior. Sims are clearly okay since they do not add money during the backtest.

Thank you Hengfu for giving what appears (to me) to be a clear example at this point.

Best,

Jim





The component models each added $100,000 of new cash on 9/21/2020. That is not related to performance. It would appear that the book calculates performance from the Total Equity in the underlying models without taking account of the new cash added, which is a mistake.

I confirm Georg’s statement and also observed the same issue (not new - has been there for years)

Jerome

In the test case, I add $100k cash to magnify the problem, but if a user just add/remove a small amount of cash, s/he probably would not notice the spike and would be misled by the “Simulated Book” result.

In an actual portfolio of multiple “Live Strategies”, cash is added or removed across “Live Strategies” to rebalance the portfolio regularly over the years. “Simulated Book” is a very useful feature to try different combination of existing “Live Strategies”, if the statistics is calculated correctly. I almost made a wrong decision to pick which “Live Strategies” to use, had I not looked into the data carefully.

Book of “Simulated Strategies” cannot replace this useful feature, since “Simulated Strategies” can deviate from “Live Strategies” significantly.

Of course we can do the book calculation manually in Excel to come up with the right statistics, but it would be great to address the issue on P123 side since others have experienced the same problem.

Thanks a lot!

Hengfu

When you do a simulation–never mind a book–the returns and stats of the simulation reflect the total portfolio balance, not only the equity. This is what makes it possible for us to give you returns on a simulation that holds cash during some periods, or that only buys 5 positions and leaves the rest in cash, or that uses leverage, or that goes short.

I don’t think anyone really wants a book to behave completely differently from a simulation when giving you performance measures, right? So the performance of a book can’t ignore cash while the performance of a simulation takes cash into account.

Yuval, what does that mean?
If something can’t ignore cash, while something else takes cash into account, then both do the same.

Yeah. And Jerome caught it on his own too. Jerome is good at this. A pro I think. You too perhaps?

I caught it only because I added a large amount of money to a strategy at once. I would not have caught if with my yearly contributions around tax time. But over time I would have had a wrong impression about how well I was doing. At lease if I was focused on the equity curve. Some of the statistics seem okay.

What is clear is that EVERY single person who has posted on this thread was surprised (at some point) by the behavior of books with live ports where cash has been added. They found the book was not doing what they thought it was. What they thought was true wasn’t true at all.

Books needs to used with caution (if at all) with live ports.

Thank you Hengfu for posting this important insight!!!

Best,

Jim

Exactly. Books and simulations act the same way. They both have to take cash into account, they can’t ignore it. What was being asked on this thread was for books to ignore cash while leaving simulations the same as they’ve always been.

I do not care what P123 does with this. Books for live ports are useless. I do not use it for live ports and never will.

But I wonder if we might be able to stick with the topic of this thread.

Presumably a good thing. But the point of this thread is that books and live ports do not behave the same (when cash is added or removed).

It is right there in the title of this thread.

It is obvious already that P123 will not change this. Probably for good reasons. And I do not know how difficult it would be to make any changes.

But please, lets stick to the subject of the thread if there is some important reason that we need to be convinced that we prefer things the way they are.

Best,

Jim