Tutorial on How to create a Pseudo Line-by-Line Portfolio in Stock + Pro

Today I am going to walk through an example of how to mimic a line-by-line portfolio with multiple transactions for the same stock.  The goal is to more accurately represent Gain/Loss by accounting for multiple buy/sells, dividends, cash holdings, and reinvestments.

For starters, this is only possible in Stock + Pro v3.2 or later.

This is an advanced tutorial.  A much simpler way of doing this will be available in v4.

Step 1: Set Up A Watchlist

To begin with, we are going to create a new Watchlist, named “Pseudo Portfolio”.  See this help article if you are unsure of how to do this.

Screen Shot 2015-10-23 at 10.38.59 AM

To make our lives easier, I am going to include only the table columns that we need, “Name”, “Symbol”, “Price”, “# of Shares Owned”, and “Cost of Shares”.  I also turned on “Manual Sorting” by the View > Sort By menu.

Screen Shot 2015-10-23 at 10.41.37 AM

Finally, the Inspector Pane is visible on the right side of the window (Cmd+I) to show or hide it.

Step 2: Add the First Transaction

Now that our watchlist is set up, we are going to add the first transaction.  I am going to be using this watchlist to track my shares of XYZ company.

My first transaction is buying 50 shares of XYZ at $25/share with a $7 trade commission. (click on any image to see a larger version).

Screen Shot 2015-10-23 at 10.46.01 AM

If we switch over to Portfolio Summary, we see that my All Time Gain/Loss is negative $7 (the trade commission).

Screen Shot 2015-10-23 at 10.47.51 AM

Step 3: Adding a Sell Transaction

Over time, I eventually sell 10 shares of XYZ at $30/share and a $7 trade commission.  I enter in a new symbol for my watchlist $$SellXYZ, assign it a Price/Value of 30.00, assign it 10 shares, and a total cost of $7.

Screen Shot 2015-10-23 at 10.52.56 AM

Great! We added a sell transaction to our trading history, but this throws off our Gain/Loss calculation.  It is now showing as -314.  When we sold, we converted shares into cash.  so let’s add a new cash holding to represent that.

Add a new symbol $$CashXYZ with a price of 300, 2 shares owned, and 0 cost.  We also have to deduct 10 shares from our original purchase.  To get an accurate Gain/Loss, it is important to know what Lot of shares are being sold off.  Usually brokerages default to a FIFO, first in first out, order.

If we didn’t deduct Shares Owned from the original purchase it would throw off later calculations.  In order to keep our Total Assets value correct, we need to account for those deducted shares in the cash holding, hence 2 shares of the cash holding instead of 1.

Screen Shot 2015-10-23 at 11.21.23 AM

As expected, we have a $36 Net Gain.  $50 in profit from the sale minus $14 in trade commissions.

Screen Shot 2015-10-23 at 11.22.14 AM

Step 4: Manually Adjusting Current Market Price

Of course, XYZ stock won’t stay at $25 forever.  Once a day, or how ever often you want to, update the Price of all BUY transactions to the latest market price.  For example, today XYZ started trading at $31.50, so I would update the price of $$BuyXYZ to 31.50.

Screen Shot 2015-10-23 at 11.28.41 AM

Now those 40 remaining shares of XYZ benefit from the increased price and will raise up the Gain/Loss accordingly.

Step 5: Dividends, Reinvestments, & Closing Positions

The rest of the normal trading scenarios are easy to handle.

For dividends, treat them as just a regular cash position.  If XYZ pays out 10¢ a share and you have 40 shares, add $$DivXYZ, 40 shares, $0.10 price, $0 cost.

Reinvestments are handled just as Buys would be.  You’ll be getting a set number of shares at a set price and cost.  You will have to update the Price and Number of Shares as you sell off part of your position.

Finally, when you sell off the entirety of a lot of shares, do not set the # of Shares to 0.  Instead set it to a very small fractional number such as 0.00001.  By setting it to 0, that position’s Total Cost will no longer be calculated in the Gain/Loss.



If you are having trouble with this pseudo portfolio method, I would recommend waiting for v4 and true line-by-line independent portfolios.  The steps outlined above show a way to abuse the $$ user symbols to force the app to do something it wasn’t really designed to do.

Leave a Reply

Your email address will not be published. Required fields are marked *