         (:buy actions)                :purchase
         (:split actions)              :split))))
 
+(defn- abs
+  [^BigDecimal value]
+  (.abs value))
+
+(defn- abs-items
+  ([transaction]
+   (abs-items transaction (constantly true)))
+  ([transaction pred]
+   (update-in transaction
+              [:items]
+              (fn [items]
+                (map #(if (pred %)
+                        (-> %
+                            (update-in [:quantity] abs)
+                            (update-in [:value] abs))
+                        %)
+                     items)))))
+
 (defmethod ^:private refine-trading-transaction :default
   [transaction]
-  transaction)
-
-(defmethod ^:private refine-trading-transaction :none [t] t)
+  (abs-items transaction))
 
 (def ^:private trade-actions-map
   {:buy :debit

               :split-date (:transaction-date transaction)
               :shares-gained (:quantity split-item)
               :commodity-account-id (:account-id split-item))
        (update-in [:items] adjust-trade-actions))))

(defn- process-transaction-item
  [item]


(defn- parse-decimal
  [string-decimal]
  (when-let [match (re-find #"(-?\d+)\/(\d+)" string-decimal)]
    (with-precision 12
      (apply / (->> match
                    rest
