Crypto Currencies : Tax Reporting   and   Charting

Crypto Currencies: Prerequisite

As of 6/18/2021, there're no brokers in the US that provides Crypto trading in tax-deferred accounts (e.g. IRAs, Rollover IRAs, Annuities) that I know of. The only choice left for the traders/taxpayes in the US, is to do the Crypto trading in a Taxable Accounts, and report every taxable transaction made in her/his tax-return to the IRS. Persoanlly, I like the IRS - their documents are crystal clear and are very easy to follow for a BSA/Developer such as myself. (Pretty much similar to the documents from ORACLE and Zuora, that I like to use in my professional life.)

Different brokers/exchanges have taken differing positions about which Tax Forms would be provided to the traders. The Broker I've selected Binance.US has taken a position that Form 1099-K would be provided, instead of the Form 1099-B. Major difference for the US Taxpayer is that the Form 1099-K does not provide the Cost Basis for every redemption. The Cost Basis is essential for computing the gain/loss when filling-in the Form 8949 - Sales and Other Dispositions of Capital Assets.

Being a BSA and a Developer, it was not all that difficult for me to figure out the transaction details, and the computations needed for determining Tax Reporting details I'd need - especially the Cost Basis - before starting trading Cryptos using my Blitz Algo that potentially would generate thousands of trades every tax year which I'd need to report to the IRS in perpetuity !!


Crypto: SEC

SEC - securities and exchange commission - is one of the regulators that governs all the 'securities' traded in the US, including Stocks, Bonds, ETFs, Mutual Funds etc. The stance taken by the SEC is evolving, so far as regulating the Crypto Currencies is concerned.

I have good experiences of dealing with SEC on a personal basis (Link 1, Link 2). I've enjoyed going over the lectures given by Professor Gary Gensler at MIT related to Blockchain, and Cryptos. Professor Gary Gensler is the current Chairman of the SEC, and is supremely knowledgeable about Cryptos.

Presently SEC does not consider Cryptos as 'securities', rather SEC considers cryptos as 'commodities', therefore these are not under the jurisdiction of the SEC. However, the Chariman has urged the US Congress to pass regulations related to Crypto Currencies, in order to protect the US entities (individuals/corporations) who choose to use Cryptos. I for one, would surely like to get protection by a strong regulatory body such as the SEC, when I trade Cryptos!

There are multiple firm that have applied for Exchange Traded Fund based on Cryptos, but so far SEC has approved none of the applications. Gemini, Van Eck, Wisdom Tree, Grayscale, Fidelity etc. have tried, and for some of them SEC has not yet rejected the formation of an ETF.

If SEC were to approve an ETF, then it would make it simple/easy for me to trade using my Blitz Algo in tax-deferred accounts, as I use ETFs for trading all the time. (A wrapper of an ETF around Crypto currencies would allow me to trade using tax-deferred accounts like IRAs, Rollover IRAs, Brokerage Window enabled 401(k)s pretty much like how I can trade the ETFs for Gold/Silver/Palladium such as GLD/SLV/PALL.) See links to my linked-in posts where I've given details of some my trades, alongwith the screen-grabs showing my trades using Think-or-Swim front-end of TD Ameritrade:

  1. Link 1 : Showing 177 orders I executed on 5/11/2021
  2. Link 2 : Showing a series of post for week of 5/4/2021


Crypto: IRS

The IRS does not actually regulate Cryptos at all, however the stance taken by the IRS matters for the Tax Returns. IRS considers Cryptos as a 'Capital Asset', which is on par with assets like 'property' or like 'collectibles', therefore the tax regulation that governs to purchase/redemption of any 'Capital Asset' applies to Cryptos, instead of 'Securities' such as Stock/Bonds/ETFs. IRS requires taxpayer to report taxable transactions using Form 8949 - Sales and Other Dispositions of Capital Assets.



The fields to be reported are:

  1. Description of property
  2. Date acquired
  3. Date sold
  4. Proceeds
  5. Cost or other basis
  6. Gain or (loss)

IRS allows using of "Specific Identification" of the Crypto lot that I'm selling. However, unfortunately the broker 'Binance.US' has no lot selection available to identify the lot that I'm selling, therefore the option I have is to use FIFO method 'first-in-first-out', which is to assume that I'm always disposing the lots in the chronological order of acquisition.


FIFO: First-in-first-out

Figuring out the cost-basis is to compute the amount that was spent to acquire the assets which are being disposed of.   Superficially it sounds rather simple, however it's not simple at all.   The Developers/BSAs who have some background in ORACLE Costing would recognize the FIFO (and LIFO as well) quickly.   These Layered Costing methods are used to value the inventory perpetually by using chronological order of acquisition (, or the reverse-chronological order). This is what I'd need, when I'm determining the cost-basis.

Why is FIFO complicated? The merchants, and the shop-keepers must have used this for centuries, so it ought to be simple enough -   .... No?

Consider a few examples,

  1. say I'm buying 1 sack of wheat for 10 successive days at prices $101, $102, $103 etc. and then on 11th day I'm selling 5 sacks at $111, and remaining 5 sacks on 12th for $112. What would be the cost basis for each 'sell' transaction?

  2. now say I'm buying 1 sack of wheat for 6 successive days at prices $101, $102, $103 etc. and then on 7th day I'm selling 5 sacks at $107, and then I countinue on the 8th, 9th, 10th and 11th day at $108, $109, $110, $111, and I sell remaining 5 sacks on 12th day at $112. What would be the cost basis for each 'sell' transaction?

  3. and finally say I'm buying 1 sack of wheat for 3 successive days at prices $101, $102, $103, and then I sell 1 sack on 4th day at $104, then I buy on 5th, 6th and 7th day at $105, $106, and $107, and then on 8th day I sell 1 sack at $108, after that I buy 1 scak each on 9th, 10th and 11th day at $109, $110, and $111, and finally I sell all on 12th day at $112. What would be the cost basis for each 'sell' transaction?

Cost Basis is the field #5 that I gave above, in Form 8949 that I'd need to figure out, to accurately report my gain/loss to the IRS. The above examples are rather simple, and perhaps one can do the calculation using basic tools like paper and pencil.

Doing this sort of calculation using paper and pencil would get impractical when one is dealing with thousands of Crypto transactions per tax year, where the numbers are upto 4 to 6 decimal digits after the decimal point! These numbers are for both the amounts as well as the quantity.


Cost Basis: Examples = Worked out

The above examples have the following Cost Basis and other fields required for reporting on Form 8949. Of course I've not done this by using paper and pencil at all, rather this is by automation. This would work prepetually, as required by IRS. I've kept this simple, but I'd be able to factor-in the commission paid to Binance.US that would affect the cost basis, and I'd be able to make a distinction between the short-term and long-term (more than 1 year) holding periods as well, because the tax rate is different for short/long term holding periods. (I'd be using Blitz Algo, so I don't anticipate the holding time would be longer than a few days or weeks.)


Wash Sales: Securities vis-a-vis Capital Assets

IRS allows deducting the losses incurred from the taxable income, to lower the total tax burden.

Like any other trader, I dislike losses. (That's why I say 'I hate to earn the same money twice !!' I don't want to lose money that I've already earned in the first place, so that I don't have to make-up for the money I lost, by earning it once again the second time.) However, losses are just part of doing trading.

IRS also has an exception called as 'Wash Sale' where the losses incurred cannot be deducted from taxable income if the 'security' for which the loss is incurred is traded again within 30 days of incurring the loss. (e.g. If I were to incur loss on, say HIBL, on January 10, then I may not deduct the loss if I were to trade HIBL again till Feb 9th.) This Wash Sale rule creates an onerous task of tracking the redemption of a security and associating it with any subsequent purchase I'd make for the same security in the future. Yes, the logic for this can be developed of course, however I've not done that just yet.

This Wash Sale rule is applicable for 'securities', and since IRS considers the Cryptos as 'capital assets' the Wash Sale does not apply to Cryptos. A few choose to call this as a tax-loophole, however I merely consider this as one piece of logic, that I need not code/test/implement in my trading Algo.


Cryptos: Line Charting using Python/MatPlotLib

Presently there are 800+ Crypto Currencies in existance. Out of these about 50 are offered on Binance.US platform for trading.

I download the OHLCV (open-high-low-close-volume) data for some of these every day using Python. The data is available for free on Binance site. See the post I made related to free data on Linked in.

Following is the slide presentation of all the Crypto Charts I generated on 6/18/2021. This is in a loop with delay of 3 seconds for each slide. It goes from chart for AAVE thru SOL. (It cannot be paused.) I've done the charting in Python/MatPlotLib.




Crypto: Heatmaps using Python/Pandas/Palettable

Besides line-charts, I plot Heatmaps every day as well, for Cryptos. I'm giving below the three Heatmaps for three different Technical Indicators.

Click here to see the details about Heatmaps/Python/Palettable.

  1. ROC-1 : This is a the rate-of-change for 1 day, which is the percentage gain/loss for one day.





  2. CCI-19: This is a the Commodity-Channel-Index for 19 days. CCI-19 is my most used Technical Indicator. (Click here to see details.)




  3. NATR-14: This is a the Normalized-Average-True-Range over 14 days. Average-True-Range is a is a measure of Volitility that I frequently use.






Crypto: Present/Future

It appears as if there is plenty of interest, at present, in Cryptos.

  1. Facebook famously started it's efforts to form a new Cryptocurrency Libra.

  2. Fidelity, Grayscale, Van Eck, Wisdom Tree - some of the top companies in Financial Sector have filed papers with SEC for forming an ETF for Crypto. (So far the SEC has not approved any, however there are many ETFs based on Cryptos in Canada, and Europe.)

  3. Paypal has enabled the buy/sell/Checkout using Cryptos in all the US states, except Hawaii.

  4. Tesla is going back-n-forth about allowing Cryptos for purchases of their vehicles, however the compnay itself has purchased more than a billion dollars worth of Bitcoins.

  5. El Salvador recently passed a law by supermajority to make Bitcoin a 'legal tender'. Admittedly El Salvador is a tiny country with miniscule GDP, but this is a start nevertheless.

  6. Texas Department of Banking has published a notice on June 10, 2021 - that's just last week - to affirm that Texas Chartered Banks may provide Crypto custodial services.

  7. Most importantly, Chairman Jerome Powell of the US Federal Reserve, remarked on May 20, 2021 - that's just within the last month - that the FEDs are exploring forming Crypto Currency of their own. (The technical term for this is CBDC = central bank digital currency.)

It appears as if the usage of Crypto would become widespread/mainstream in the near future.
The feeling I get is that those who choose to defer/delay adapting to the new Crypto Economy put themselves in the risky position of being left behind.
I wonder when would my supplier NetFlix allow me to purchase subscription for Digitial Streaming by paying with Digital Currency ?? *smile*


API setup: Another Prerequisite

I had completed another prerequisite, that of setting up of API for the broker Binance.US on 6/12/2021, as I had posted on Linked In Post and the Comment to the Post.

With the full prerequisites is place, I will be starting Crypto Trading on Juneteenth.

Yes, the President of the United States, Joseph Robinette Biden Jr., signed the Law making Juneteenth a national holiday just yesterday, however I need not wait for the next Business Day, because the Currency Markets are always open - 24/7/365 !!




Update of 6/20/2021: Trading has started !

Yes, I had observed large volatility of Cryptos, which is ideally suited for Algo Trading. Rather than going in with large amounts at the get-go, I had just entered a couple of small trades - just about $250 each for Cryptos COMP and LINK.

I was expecting quick round-trip trades, and exactly as I had expected, the rapid trades came thru!

I'm giving a screen-grab of my Firefox window showing Binance.US site, and within that the 'Trade History'. Exactly as I had anticipated, the trades both for 'buy' and 'sell' went thru rapidly. In total I got two round-trips.

Generally, I tend not to give amounts - I tend to redact amounts; however since this is just the starting-up; I'm not redacting the amounts.

The 'buy' trade for LINK executed at 3:25 and 'sell' at 14.57 today, similarly 'buy' trade for COMP executed at 4:24, and 'sell' at 14:55. (I'm not clear yet what's the time-zone, however at 3:25 I was not awake no matter whether it's Eastern-time or Pacific-time *smile*.) For LINK trade I got $30.74, and for COMP trade I got $26.21. The fees in USD for 'sell' for both is $0.28 each, and fees for 'buy' converted to USD is the product of Price of LINK and COMP times the Fees paid in LINK and COMP currency respectively - which is about $0.25 each.

The percentage gain is about 10% for COMP trade, and about 12% for LINK trade. This sort of gain within one day is quite good.

This algo trading is pure Price-Speculation using Technical Analysis (while totally dis-considering the Fundamental Analysis).






Using this data I've filled-in IRS Form 8949.


Copyright © 2021 Salil V Gangal, All Rights Reserved.