Comment Comment by bdangubic It is not messy at all if you use KISS. You do not differentiate ever - ANY usage of unrealized gains makes them realized. Very simple to implement but of course won't ever happen :) parent bdangubic 2 years ago