Programmatic FIFO in Real-Time or Report (R Example)

GMONEY1GMONEY1 Posts: 426 Silver ✭✭✭✭
I'd love to see @Roy Sebag, @Darrell, and @Josh Crumb add a real-time First-in-first-out tracker for all buy and sell transactions. This would come in handy for tax season too. I did a mock-up in R to show what I mean. If anyone in the community uses R, feel free to run the demo. It has mock data that is similar to the transaction reports that we can download.

Basically, this looks at all of your sell orders in the year, and goes back through your buy orders chronologically to match them up.
(Change the gold_txn_fifo.txt to .R and demo.txt to .csv ..... I could only upload .txt files)

LIFO is harder to program because it needs to be last in based on the time of each sale... but that option would be cool too.

This is just to kick off an idea, so do NOT use this for something like your 2016 tax return.

But, BitCoin lovers, keep in mind you'll need some sort of logic like this if you are using FIFO to record the buying and selling of "property".

Comments

  • SpontaneousOrderSpontaneousOrder Posts: 307 Bronze ✭✭✭
    @GMONEY1, I did something similar to figure out my capital gains. I tried an Excel spreadsheet, then wrote some Javascript, and finally settled on a PHP script. I implemented "Highest in First Out" to minimize my gains, as well as FIFO and some others. My f8949 was 4 pages long with all the transactions I had.

    It's an interesting issue. Even if you buy a gold coin from a regular dealer, you have to calculate and report capital gains when you sell it. Same thing for works of art, jewelry, even Bitcoin as you said. So it's not just an issue for Goldmoney users. However, with Goldmoney we are probably all doing a lot more transactions than we would normally do with coins and bars from a conventional dealer. I've never even sold any physical yet, so haven't had to deal with it. But I use the Goldmoney pre-paid card a lot, so I had to come up to speed on the capital gains thing. The original GoldMoney accounts (now called "Wealth" accounts) deducted metal from each vault for storage fees. A few years ago they introduced an option to pay storage fees in cash. But I wonder how many long-time Wealth account holders are aware that capital gains taxes are owed on metal that was automatically sold for storage fees.

    It might be very difficult for Goldmoney to provide, for tax purposes, something beyond the simple transaction list in your selected currency. Lot selection can be complex, with different needs for taxpayers in different countries, and for each taxpayer depending on their tax situation during a given year. One person may want to maximize losses for offset other gains; another may want to accelerate gains into the current tax year because they have losses from selling other investments. And then from year to year you have to keep track of which tax lots are still open to apply against future sales.

    Accounting packages such as Quicken can be used to track purchases and sales and compute capital gains at tax time. But they can be cumbersome to use, and there would be no automatic way to load up the Goldmoney transaction file. I haven't come across any other helpful software. Most people probably just let their tax accountants deal with it all.

    Wouldn't it be nice if gold were recognized as money, and not subject to capital gains taxes :D ! But we need to protect our purchasing power with precious metals, and Goldmoney provides the best way to do that.
  • SpontaneousOrderSpontaneousOrder Posts: 307 Bronze ✭✭✭
    @GMONEY1, I did something similar to figure out my capital gains. I tried an Excel spreadsheet, then wrote some Javascript, and finally settled on a PHP script. I implemented "Highest in First Out" to minimize my gains, as well as FIFO and some others. My f8949 was 4 pages long with all the transactions I had.

    Instead of having fun with software :p , most people probably just let their tax accountants deal with capital gains. It's a complex subject. Even if you buy a gold coin from a regular dealer, you have to calculate and report capital gains when you sell it. Same thing for works of art, jewelry, even Bitcoin as you said. So it's not just an issue for Goldmoney users. However, with Goldmoney we are probably all doing a lot more transactions than we would normally do with coins and bars from a conventional dealer. I've never even sold any physical yet, so I haven't had to deal with it. But I use the Goldmoney pre-paid card a lot, so I had to come up to speed on calculating capital gains. The original GoldMoney accounts (now called "Wealth" accounts) deducted metal from each vault for storage fees. A few years ago they introduced an option to pay storage fees in cash. But I wonder how many long-time Wealth account holders are aware that capital gains taxes are owed on metal that was automatically sold for storage fees.

    It might be very difficult for Goldmoney to provide, for tax purposes, something beyond the simple transaction list in your selected currency. Capital gains can be complex, with different rules for taxpayers in different countries, and different goals for each taxpayer depending on their tax situation during a given year. One person may want to maximize losses to offset other gains; another may want to accelerate gains into the current tax year because they have losses from selling other investments. And then from year to year you have to keep track of which tax lots are still open to apply against future sales.

    Accounting packages such as Quicken can be used to track purchases and sales and compute capital gains at tax time. But they can be cumbersome to use, and there would be no automatic way to load up the Goldmoney transaction file. I haven't come across any other helpful software. Wouldn't it be nice if gold were recognized as money, and not subject to capital gains taxes! :D But we need to protect our purchasing power with precious metals, and Goldmoney provides the best way to do that.
Sign In or Register to comment.