Tax Season - How To Properly Import Trades From Scottrade And InteractiveBrokers
Saturday, April 5th, 2008
Why do I dread doing taxes every year? One of the main reason was having to figure out ways to import hundreds of transactions from my stock brokers: Scottrade and InteractiveBrokers. I love IB but come on, it's 2008 and they still don't provide .txf files to import into TurboTax (or TaxCut, but I use TurboTax myself). Scottrade, on the other hand, is directly importable through TurboTax but it only imports sale amounts and not purchases, so TurboTax thinks I got my stocks for free and wants to tax me on the full sale amount rather than the profits. That is, of course, very incorrect. Here are the best solutions I could find to these problems:
1. Scottrade.
This one is easy. Instead of doing a direct import through the tax program itself, log into your Scottrade account, go to My Account -> GainsKeeper -> Export Data and download this report available in .txf format: Aggregate Realized for 20XX (whatever the tax year is). It contains both the properly filled out cost bases (amounts paid + commissions) and final sale amounts for all stocks traded. Then just import this file into your tax software. Done.
2. InteractiveBrokers (IB).
Since these guys have been too lazy to write a .txf exporter, only providing HTML, Excel, and PDF reports, you would either have to import all trades manually (yeah right), write a quick script (meh, boring), or use an existing tool to convert these reports into .txf. There are a few tools potentially suitable for this task, some costing hundreds of dollars but the absolute best and cost efficient option I found is InvestoTek Excel macro called ConverExcel2TXF. It only costs $5 and does the job perfectly. Here's what to do:
- log into your InteractiveBrokers account -> Report Management -> Tax Forms -> Schedule D Gain/Loss Summary Worksheet, select your tax year, MS Excel, and View Report. Now you have an Excel spreadsheet with all trades made.
- purchase and download the ConvertExcel2TXF macro. There's a trial macro that converts only 2 trades here, so try it out before you buy (but seriously, $5 is nothing). The macro comes as an Excel spreadsheet. Fire it up and enable macros.
- with the macro spreadsheet running, fire up the IB spreadsheet downloaded earlier. Go to View -> Macros (at least that's where they sit in my Office 2007) and run ConvertExcel2TXF.xls!Run
- Here's where you have to tell the macro which fields are which - I think it's all pretty self-explanatory. Take a look at a sample from my report:
- click Generate TXF File and import it into your tax software.
Well, that should do it. Tax time is arduous and stressful, hopefully you'll find this article helpful. Do you know a better way to import trades? Do you do it differently? Please share in the comments.

(No Ratings Yet)
beer planet is Artem Russakovskii's blog. Artem is a software engineer at
April 8th, 2008 at 7:25 pm
As earthsci mentioned in the comments on FatWallet, someone wrote a free TXF generator for Interactivebrokers, so you can just copy the transaction list from IB, which saves you $5. I've reimported my data using the tool and it matched what I got with investotek.
http://tax.earthsci.net/
April 9th, 2008 at 4:36 pm
What about calculating wash sales, etc.?
I also find that my IB schedule D form contains errors for stocks that I transferred to IB from other brokers… it puts in a cost basis that comes from who knows where.
Thanks!~
April 9th, 2008 at 6:51 pm
dan, I think wash sales are not supported by either program :-S but I'm not entirely sure. Thankfully, I didn't have any.
You can email Jeff from investotek and ask him any questions about it. I found him very responsive, which is especially important a week before taxes are due.
Last year I used SimplyTrack for IB and it worked wonderfully, including sorting out wash sales. It costs $50 though and I'm not confident that it works on this year's IB forms.
April 13th, 2008 at 11:01 am
Great article. Too bad your solution doesn't work.
There is no "proceeds" columns or a "shares" column on the IB report, so you're left with manually reformatting the data yourself.
April 13th, 2008 at 11:04 am
Never mind, my bad. IB's "sale price" is net proceeds. I thought this was teh per share price.
April 13th, 2008 at 2:19 pm
Yup, that's the one
May 18th, 2008 at 1:56 am
does JEff's program calculate wash sales when imported into turbotax?
May 18th, 2008 at 2:05 am
josh, please see my reply to dan above.
May 18th, 2008 at 4:45 am
Artem: thanks i emailed Jeff.
With the SimplyTrack, were you able to calculate wash sales this year with IB? Did it work the same way (export to excel then export to txf)
Thanks for replying so soon. IB has been a nightmare to do taxes with.
Josh
May 18th, 2008 at 11:58 am
Josh, I used SimplyTrack to do my taxes for the year of 2006 and it calculated everything wonderfully, including wash sales. I have not tried it for 2007, however, so I can't promise it would still work. Wash sales confuse the crap out of me, so I try to be a lot less of a day trader nowadays. Good luck!