                             (filter #(= :buy (:action %)))
                             first)]
     (-> transaction
+        abs-items
         (assoc
           :action :buy
           :shares (:quantity commodity-item)

                (filter #(= :buy (:action %)))
                first)]
    (-> transaction
        (assoc :action :transfer
               :shares (:quantity to)
               :value (:value to)

               :split-date (:transaction-date transaction)
               :shares-gained (:quantity split-item)
               :commodity-account-id (:account-id split-item))
        (update-in [:items] adjust-trade-actions)
        (abs-items #(not= :split (:action %))))))

(defn- process-transaction-item
  [item]
