Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Problem with transfer in/out (Cost Basis)

Hi,

I’m facing an issue with capital gains after transferring VEQT shares between two accounts, and I need help understanding why there’s a negative realized gain.

Situation:

I transferred 130,000 VEQT from HOLDCO to HOLDCO2 on 2025-12-11.

I set CostBasisOverride to 5,380,459 for both the TransferOut in HOLDCO and TransferIn in HOLDCO2.

Transfer price was 54.68 in both accounts, which was the price the day the transfer was made

What I’m seeing:

HOLDCO2 is showing a negative realized capital gain of -1,7M, even though it should be zero. Its also showing a 1.7M Unrealized capital gain.

Unrealized gain looks correct, but the realized gain doesn't make sense.

Is there something I’m missing with how the system handles internal transfers?

Any help would be greatly appreciated! Thanks.

Comments

  • edited December 2025
    Can you please confirm that:
    1. You used transaction types:
    SymbolTransferOut
    SymbolTransferIn

    2. Both HOLDCO and HOLDCO2 are accounts in CAD currency.

    3. Symbol VEQT has assigned currency CAD.
  • Hi Vidas,


    Thx for the quick reply, confirmed for all 3 points!

    1. Yes, as per documentation
    2. Yes, both are CAD
    3. Yes!

    Attached is an extract of my VEQT related transactions:
    https://www.dropbox.com/scl/fi/j56vb35bgz7b3fxyc2bch/veqt.xlsx?rlkey=27yip7n0qf6xdi7de6kyvubjq&st=7q4gfejw&dl=0

    Nothing fancy, i am puzzled
  • It is also important to mention that the negative realised capital gain is displayed in the 'Overview' tab, in the 'Summary by account' section. It looks correct in the Holdings tab.
  • I believe this is a bug that was reported and fixed some time ago, but the fix is not released yet.

    In the release workbook the formulas are:
    Rlzd Cap Gain:=ROUND(
    CALCULATE(
     SUMX(FILTER(Transactions, NOT(IsBlank(Transactions[TransID])))
        , [TotalAmnt] * [TransExchRate] + 
          var currID = IF(HASONEVALUE(ReportCurrency[CurrencyID]), VALUES(ReportCurrency[CurrencyID]), 0)
          RETURN SWITCH(currID, 0, [CostBasisImpact], 1, [CostBasisImpactRpt1], 2, [CostBasisImpactRpt2], 3, [CostBasisImpactRpt3], [CostBasisImpact])
     )
     , TransType[BookValueSign] = -1, TransType[TransTypeGroup] <> "Transfer"
    ), 2)
    Rlzd Cap Gain w/o Sell Fee:=ROUND(
    CALCULATE(
     SUMX(FILTER(Transactions, NOT(IsBlank(Transactions[TransID])))
        , ([TotalAmnt] + [Fee]) * [TransExchRate] + 
          var currID = IF(HASONEVALUE(ReportCurrency[CurrencyID]), VALUES(ReportCurrency[CurrencyID]), 0)
          RETURN SWITCH(currID, 0, [CostBasisImpact], 1, [CostBasisImpactRpt1], 2, [CostBasisImpactRpt2], 3, [CostBasisImpactRpt3], [CostBasisImpact])
     )
     , TransType[BookValueSign] = -1
    ), 2)

    Updated formulas should be:
    Rlzd Cap Gain:=IF([Sales Amnt] <> 0,
    ROUND(
    CALCULATE(
     SUMX(FILTER(Transactions, NOT(IsBlank(Transactions[TransID])))
        , [TotalAmnt] * [TransExchRate] + 
          var currID = IF(HASONEVALUE(ReportCurrency[CurrencyID]), VALUES(ReportCurrency[CurrencyID]), 0)
          RETURN SWITCH(currID, 0, [CostBasisImpact], 1, [CostBasisImpactRpt1], 2, [CostBasisImpactRpt2], 3, [CostBasisImpactRpt3], [CostBasisImpact])
     )
     , TransType[BookValueSign] = -1, NOT(TransType[TransType] IN {"SymbolTransferIn","SymbolTransferOut"})
    ), 2)
    )
    Rlzd Cap Gain w/o Sell Fee:=IF([Sales Amnt] <> 0,
    ROUND(
    CALCULATE(
     SUMX(FILTER(Transactions, NOT(IsBlank(Transactions[TransID])))
        , ([TotalAmnt] + [Fee]) * [TransExchRate] + 
          var currID = IF(HASONEVALUE(ReportCurrency[CurrencyID]), VALUES(ReportCurrency[CurrencyID]), 0)
          RETURN SWITCH(currID, 0, [CostBasisImpact], 1, [CostBasisImpactRpt1], 2, [CostBasisImpactRpt2], 3, [CostBasisImpactRpt3], [CostBasisImpact])
     )
     , TransType[BookValueSign] = -1, NOT(TransType[TransType] IN {"SymbolTransferIn","SymbolTransferOut"})
    ), 2)
    )

    Are you able to update these formulas in your Report workbook yourself?
    You would need save a backup of your workbook (just in case), then go into PowerPivot tab and then select Measures->Manage Measures, select "Rlzd Cap Gain", click "Edit" and replace formula from (including) = sign.
  • I dont see "Rlzd Cap Gain" formula in PowerPivot tab -> Measures-> Manage Measures.

    I do see "Realized Cap Gain" but the formula is:

    =CALCULATE(Report[Capital Gain], DATESBETWEEN(Dates[Date], Blank(), MAX(Dates[Date]))) - Report[Unrealized Capital Gain]

    FYI, this is a 2.4 PS workbook!
  • edited December 2025
    For v2.4 can you please test this formula for [Realized Cap Gain]:

    =IF([Sales Amnt] <> 0, CALCULATE(Report[Capital Gain], DATESBETWEEN(Dates[Date], Blank(), MAX(Dates[Date]))) - Report[Unrealized Capital Gain])


    Please note that if formula does not work, I might need further adjustments to fix it. Please let me know.
  • FIXED !!!

    Thanks Vidas, top notch support (as always!)

    Is there any plan for an updated PS release anytime soon ? With AI i assume it would be relatively easy to refactor and/or add new charts, features, etc.
  • There are no plans to do another release soon. I am not sure if there is a need for more charts (negative: more charts = more refresh time). There is some functionality that I would like to add, but I am not able to work on its development for now.
  • Hi Vidas,

    I am still encountering a significant calculation error regarding a realized capital gain following an inter-account transfer (HOLDCO to HOLDCO2).

    The Issue: After selling a position in HOLDCO2, the system reports a negative Realized Capital Gain of -$1.359M. Based on my cost basis, the result should be a positive gain of approximately +$368k.

    Transaction Details:
    Transfer (2025-12-11):
    Transferred 130,000 VEQT from HOLDCO to HOLDCO2.
    Transfer Price: 54.68 (Market price on transfer day).
    CostBasisOverride: I set this to 5,380,459 for both the TransferOut (HOLDCO) and TransferIn (HOLDCO2) to reflect the original buy price of 41.39.

    Sale (2026-01-07):
    Sold 27,363 VEQT at 54.84 in HOLDCO2.

    It appears the software is not handling the CostBasisOverride correctly during the sale calculation. Is there a specific formula or adjustment required in PS 2.4 to correct this?

    Thx again :)
  • Can you please check Sales tab and see what numbers are reported. Is Sales Cost Basis calculated OK there?
  • edited January 14
    Yes, i confirm that the info is correct in the "Sales" tab:



  • I tried to figure out the issue, but it is complicated and it is old code. So lets try this simple solution - replace [Realized Cap Gain] code to match [Sales Capital Gain]. I am not sure if there will be any other side effects, but can you please try this code for [Realized Cap Gain]:
    =Report[Sales Amnt] - Report[Sales Cost Basis] + Report[Sales Fees]
    - CALCULATE(SUM(Trans[AccruedInterest])
    	, TransType[BookValueSign]=-1
      )
  • Not sure if it broke anything but it look like it worked !!!

    Thx again :smile:
Sign In or Register to comment.