appends profit/loss to a list of purchase/sell transactions (for fifo capital gains)
git clone git@github.com:colealbon/capital-gains-calculator.git
cp transactions.txt.example transactions.txt
modify transactions.txt with your own transactions
node index.js | jq .
or just
node index.js
it might be possible to remove the reverse() on line 12 for lifo (we didn't try)