Hi,
When I sell an instrument without holding it (short selling), and when I buy it back later on, I don’t see it’s impact on the Realized Capital Gains.
Also in Trades section I see the error “No holdings for sell transaction in securities account” for all my short sells (mostly covered call or cash secured put options), which I simply ignore.
Does Portfolio Performance not support short selling in calculations of performance, especially realized capital gains when I buy the position back for gain/loss or am I doing something wrong?
Thanks
Yes, it is not supported.
It would be great if it could be supported in a future upgrade. I don’t know how complicated it would be to incorporate this in the existing functionality, but from a user perspective there is no difference between making a capital gain from a short position or from a long position. It’s merely a question of the sequence of the buy vs. sell. A profit is still a profit, right?
One of the challenges is the fact PP is calculating everything at runtime. This leads to a point where calculations are tagged to an operation. For instance, the internal model expects a buy before a sell in order to run the calculation model.
Thanks for the answer.
Is there no way that the first “operation” that the internal model expects, could be a credit?
I trade vertical options on the SPX on a weekly basis, where I buy one option and sell another at the same time. Then a few days later I close the vertical by reversing the two trades. In these trades it is only the ‘losing’ trade, that shows up under “Realized Capital Gains”:
In the “Trades Profit/Loss” the correct net value of the collective trade is shown; one profitable and one loser. Here is a breakdown of the collective trade:
![]()
I appreciate that when the engine has been built to calculate in a certain way it may be complicated to change, but if or when this affects the performance calculation for standard transactions like shorting, it may be worth having a second look at.
I’m keeping my fingers crossed.
This holds true only, when you use PP in a way it was not intended. It’s not like I do not understand your need, but the core of PP was build almost 15 years ago with a buy and hold purpose and from there it grew over time.
So it’s not a question if something useful is missing or not. It’s a question of who, when and how to implement.
I get it, and understand that it’s not easy or even possible to change something which is so ingrown in the whole system.
So I’ve decided to go for a workaround that solves the issue for me: I simply reverse the sell and buy dates for the shorted option, so it appears correctly in the calculation window. I add a note on each transaction with the correct transaction date, just for future reference. I hope this can work for you too @TT77.
This is very similar to what I’ve been doing as a workaround.
If I short sold something, when I buy to close I change the transaction date of the Sell to Open order to the “same day” of the Buy to Close (not reversing dates like you) and add a personal note with the “actual date” of the Sell to Open transaction.
It’s not ideal but at least now I can track gains/losses correctly.
In general, I still don’t think it would be super complicated to modify the code in a way that a BUY transaction is not expected before a SELL transaction for the calculations. After all we can already enter a SELL transaction without a BUY transaction and in Statement of Assets we see the -100 positions for instance. It’s just that later if the Buy to Close date is after Sell to Open, the position disappears from Statement normally but financial calculations are not run since the code expects the BUY date before the SELL date as @Sn1kk3r5 pointed out.
Let’s hope they will implement this relatively small modification in the code at some point. Maybe we just need more lobbying for this ![]()
It’s a question of who, when and how to implement.
We’re talking about Open Source Software here. So anyone with coding skills who want this feature is free to edit the code to implement it. I could give it a shot together with some friends. What is the procedure to upload the updated software to the site? Who officially manages the site and the source? Also I couldn’t find a link to the source code on the website.
Main responsible is @AndreasB
Coming back to your “I could give it a shot together with some friends”.
I have access to an older stock management application, which unfortunately has been shut down, where the solution for short selling is like described below:
A short sale is registered as one of the possible choices under a “Buy” transaction on the actual date of shorting the stock or -option.
… and then to close out the trade you would go to the “Sell” transaction and select “Cover short”:
This will register the long 6780 as a negative (expense) and the short 6790 as a positive (income) on the same day, and vice-versa when the trade is closed out a few days later:

If this can somehow be implemented in PP it would make the handling of options and regular short selling of stocks really powerful. Especially if you are selling options with long time to expiration.
Thanks for trying this out and Good Luck,
Tom
Well, as long as nobody is providing reliable information, how and when the figures like IRR, TTWROR and further figures is to be calculated, it’s want be.
Implementing new transaction types is one thing. But how to calculate the figures for short trading is unknown so far.
Hi @Rafa
In case you need information about TTWROR you can find it here:
and about IRR, there is this section:
I am not sure about your comment “But how to calculate the figures for short trading is unknown so far”.
I hoped that my suggestion of handling a short sale as a “Buy” transaction with a positive/incoming cash flow instead of an outbound one - and a short cover as a “Sell” transaction with an outbound cash flow, would be sufficient to deal with the calculation for short selling. Again, I don’t know the inner workings of PP and I am by no means a programmer, but I have enough knowledge of complex systems to respect that implementing a seemingly straightforward concept can be a daunting task in reality. But maybe @TT77 might have an idea.
Still keeping my fingers crossed.



