How is account strategy performance calculated?

Happy Thanksgiving folks.

I’m hoping someone at p123 can explain how performance is calculated for an account strategy, specifically for an account strategy that has both long and short positions. By account strategy performance, I mean the strategy performance shown at https://www.portfolio123.com/app/account/details?id=<account_id>&t=perf.

Under the Manage umbrella, I can see three different measures of performance:

  1. Account Performance
  2. Strategy Performance
  3. Model Performance

I can clearly see that the account performance (#1) is computed as the change in account net asset value (NAV). Similarly, if I drill down into the model (live book or strategy) that an account strategy may follow, I can see the model performance (#3) is exactly the change in NAV of the underlying live book/strategy.

But for #2, I can’t figure out how the strategy performance is computed for a long/short strategy. It doesn’t seem to be equal to the return relative to NAV, gross exposure (long + abs(short) equity), or net exposure (long + short), though the plot of strategy “Value” shown underneath looks to be net exposure.

Could you help illuminate this please?

Thanks.

There is a bug in the way strategy performance is computed when a strategy has short positions. We are working on getting it fixed, but for now strategy performance with long/short models isn’t quite correct.

Thanks Yuval, appreciate the quick response. Good to know I’m not going crazy…

Yuval, are you able to provide any color here on what the proposed fix is and when it will be implemented?

Thanks.

@yuvaltaylor Was this fixed? Thanks.

No, it was never fixed. Short performance in Manage strategies is still incorrect.

@marco Thanks Yuval. Any plans Marco to fix this? Thanks

I'll take a look tomorrow. Thanks

OK, so this is about strategies in the "Manage" section, not "Research". I think that explains why this was forgotten. A bit of background...

The Manage tools were geared for retail to connect with their brokers and follow models from either Research or prebuilt P123 or Designer models. It was intended to offer a unified interface to your brokerage accounts, and offer a better tools for sending multiple orders. Shorting was not fully tested since most people don't do that.

It's a free section of the site. We need to brainstorm a bit where we want to take Manage. For example we're in the planning phase for risk management tools (portfolio construction, risk decomposition, tracking error), but they will most likely end up in the Research section. The Manage section will likely remain relatively simple in comparison.

But performance tracking must be correct. So it should be a priority for us even if it affects other projects.

Thanks

1 Like

For what it is worth, when I came back to P123 after many years, I have the Manage section extremely valuable for me. I can easily mange the different strategies I use including non-P123 systems.

1 Like

For me too. I hate using IB's interface. If we had 1M free members just using Manage it would add incredibly to our valuation. But I guess it's not good enough. We really need to connect with more brokers. And fix the bugs.

Would you sell the site to PE/VC? I think they would buy it for a high price in this AI mania if they donated millions to the bad AI system in that video.

I agree with this 100%. The manage/linked trading is so incredibly useful right now, even though doesn't get a lot of development resources. I also use it to manage a few non-p123 strategies and be able to differentiate and track multiple strategies and books within a single broker account. There are surprisingly few offerings like that in the retail space.

And imagine the possibilities if it got a little TLC:

  • First class support for short strategies
  • Support for Canada and Europe (and Asia)
  • Support for all IBKR algos and their parameters
  • Transaction cost analysis reports broken down by strategy and order type
  • Better handling of unsupported securities in the account, e.g. options for covered calls
  • Randomized order types
  • Automatic sequencing of sell and buy orders for non-margin accounts
  • Support for IBKR Non-Professional Advisor (Friends and Family) accounts
  • More brokers

Would truly take this already excellent and unique offering to the next level.

Yes, I haven't found anything like manage available as stand alone.

Can also add better statistics, drawdown graph etc similar to sims

Thanks. I copy/pasted all the suggestions in our project brainstorming system.

I am a big fan of Manage. We'll do the more pressing things for now. But, if we finally get some altitude, or funding, we're back on it.

@marco Can I also suggest another addition. Can we have the ability to combine multiple broker accounts to see total performance, graphs etc

1 Like

I have adjusted the logic which computes Manage strategy performance to better deal short positions and have recomputed the performance all Manage strategies that have ever held short positions. I know it's a long time coming, but hopefully the performance seen now should better represent what happened in the strategy.

@feldy Take a look at the strategy's performance now and tell me what you think!

Implementation details:
We use something we call exposure value for Manage strategy performance, dividing values day over day to compute 1-day percent change, which are then combined as a cumulative product for strategy performance. Exposure value is meant to express the total value of positions, forcing a leverage of 1 at all times.

The old method for computing this was L - S, where L is liquidation value of long positions, S is the liquidation value of short positions (negative). The old method simply flipped short positions to long positions, which was problematic.

The new method is L + (SC + (SC + S)), where SC is the cost of the short positions (positive). The new method factors in short cost to compute value of shorts, which is a increase/decrease from the original cost in the opposite direction from a long position of the same cost.

I'm heading out the door, so I'll have to look at this more later, but I took a quick look at the manage strategy performance history and it does not look correct to me -- looks to be overly inflated. Will look at this more later tomorrow though.

What exactly is this short position cost SC?

Short cost is the total cost at which a security was shorted excluding any dividends that have been paid since. It's a proxy for the cash component of a short position since strategies don't retain a cash position.

The managed strategy performance looks way, way off to me for strategies with short positions -- in fact, by so much that I think a sign could be flipped somwhere. For example, the managed strategy performance is showing +14.42% for the month of September 2024 including a +9.52% day on 09/03/2024. Likewise, 01/06/2025 is showing as a +15% day in managed strategy performance when it should be slightly negative.

Feel free to DM me if you want help debugging this example further.

It's still not clear me to what SC represents here and why it's included twice. Presumably, the cost of any dividend paid is reflected in the total return price series of the asset. I don't believe any of the stocks shorted here were dividend paying.

We should be able to compute the portfolio return as a weighted sum of per-asset returns such that the weights of the portfoio sum to 1. In the case of a short sale, there's a negative weight associated with the short stock, and a positive weight corresponding to the positive cash position from the short sale. For simplictly, we could assume a zero return on the cash position as p123 is generally blind to broker-specific costs (margin, interest, and borrowing fees) -- these are reconciled separately right now.

This approach would seem consistent with computing account level performance relative to NAV. A short sale doesn't affect the NAV of the account by itself as it creates offseting negative stock and positive cash positions.