<Rant>So I've been struggling with the 67,000 page US tax code, spending my fair share of the estimated 6 billion hours lost to that colossally complicated waste of time. This year, I figure the economic value to the economy that was lost by my having to comply with the beast is equal to 50% of my taxes paid. That is to say that the value of the time I spent on taxes and required record keeping, rather than more productive endeavors is equal to 50% of the money I send to Uncle Sam. I would gladly pay, say 20% more tax this year if I could just fill out a postcard (PDF), because it would leave me free to pursue other things like life, liberty, and the pursuit of happiness, which the good old USA is supposed to be about. Uncle Sam threw away the memo that simplicity is an ingredient of happiness. I long for the simple days when my filing system could be this easy. Other countries have adopted a simple tax and brought in more revenue. The reason why is clear to me; I have no idea why this is a partisan issue.
Speaking of record keeping and happiness, keeping records as a trader is not fun. Basically, to comply with the tax code, some people recommend you keep trade confirmations forever. I admit that I'm completely ignorant of whether this situation would be simplified if I elected trader status - that's one part of the tax code I have not explored yet. I elected an electronic records option with E*Trade long ago to avoid the mountain of dead trees. Unfortunately, though, I discovered E*Trade is deleting my records older than 7 years, so now I must download them to protect them and comply with record keeping requirements. E*Trade believes I should do this one at a time, which would cost me an estimated 24 hours of my life - or more. The way their website functions, it's almost as if it's intended to be that way. They save a lot of money by not mailing confirmations, but they eliminate (almost) every known method of downloading these things in bulk. A telephone call to customer service confirmed that it is impossible to get these things in bulk but downloading every trade confirmation "was very good advice."
I have recently rediscovered, however, the joys of automation. In a couple of hours, I cobbled together a total kludge of a program in VB.NET to automated E*TRADE in my browser. Basically, the program sends keystrokes (via the trusty SendKeys command) to Mozilla Firefox, simulating button presses on the E*TRADE website, telling Firefox to download and print each confirmation to Microsoft Document Imaging Format (MDI) rather than the PDF. GetMainWindowTitle allows a check of the title bar of Firefox to ensure things are going as expected on the E*TRADE website. A FileSystemWatcher makes sure the file was downloaded and even gets the name. This even allows the program to wait for E*TRADE to respond - it's pretty slow now. I can even screen scrape the website to match the trade confirmations to the more descriptive links on E*Trade. I was unfamiliar with MDI format, but just happened to try it out for this purpose. I was pleasantly surprised to find that I can even screen scrape the trade confirmations (convert the trade confirmation images back to text) using Microsoft Document Imaging should I so desire! I may do this to verify the downloads and create an index to them, with amounts, shares and symbols.
I've eaten breakfast, showered, and typed this blog post while the program has downloaded some 250 confirmations, and I've reached the break-even point of my efforts (hours coding vs. hours I would have spent) with only a few easily fixed glitches so far. As far as advice for rookie programmers, number one on my list would be learn how to automate, and use it whenever you can. For me, using programming to get around a fubar system or save myself a ton of tedious work always puts a big smile on my face.
It even occured to me that I could automate CASTrader trading via the same technique with a few hours of code and some very detailed bulletproofing (screen scraping each screen to verify the expected response). This isn't a fail-safe programming technique without some very careful programming - basically, I'd probably have to babysit it. Or, I could just switch to the Interactive Brokers API. I wonder if they allow automatic downloads of electronic trade confirmations?</rant>
Update: an excellent article with some discussion on screen scraping, it's drawbacks, and alternatives.
Alan, if you are serious about trading, I highly recommend filing under Trader Status and using a CPA. This only applies if day trading is your primary income. I am a DIY person by nature, but using CPA has many benefits. One of the biggest is that they provide a large measure of audit defense - most IRS officers don't know squat about trader status, so a CPA will keep you out of trouble. The one I use is www.traderstatus.com.
Posted by: Ken | April 15, 2007 at 07:57 PM
Ken-
I fit the qualifications for trader status, although as I understand it, my investing style does not, since only a portion of my port turns over (although I've heard that's still not a roadblock). That will hopefully change once CASTrader is finished, however, since the first simulation had a high turnover. I'll certainly investigate it, and your advice is sound regarding retaining a CPA.
Posted by: Alan J | April 17, 2007 at 07:18 PM