imo, you don't need cra_realized_gainloss and cra_settlement_amount.
based on your form, they are Calculated based on the calculation you showed
on the form, therefore, no need to add extra Calculated field (adjusted).
CRA_Realized_GainLoss:IIF(Transaction_Type = "Sold_$"...