Ameritrade CSV
This page reflects my current understanding of the Ameritrade CSV file format. It is not comprehensive or authoritative.
There are 9 fields, each separated by a comma. The first field is the date in mm/yy/dddd format. The second field is the transaction ID which is not used by Icarra. The third field is the description which determines the type of transaction (see more below). The fourth field is quantity which is the number of shares purchased/sold. The fifth field is the symbol. The sixth field is the price per share. The seventh field is the commission for buy transactions. The eight field is total amount including fees. The ninth and final field is the fee for sell transactions.
The following descriptions (transaction types) are supported. Uppercase and lowercase is important:
- Bought: If the description begins with Bought it is a buy transaction
- Sold: If the description begins with Sold it is a sell transaction
- STOCK SPLIT: A stock split. The quantity field is the number of shares received due to the split.
- ACCOUNT TRANSFER INCOMING, PERSONAL CHECK RECEIPT, CASH RECEIPTS THIRD PARTY, CASH RECEIPT: All synonyms for Deposit.
- ORDINARY DIVIDEND, LONG TERM GAIN DISTRIBUTION, QUALIFIED DIVIDEND: Dividend.
- DIVIDEND REINVESTMENT: A dividend reinvestment transaction, equivalent to a Dividend and a Buy.
- DIVIDEND OR INTEREST: If the ticker is present it is a Dividend, if not it is an Adjustment.
- FREE BALANCE INTEREST ADJUSTMENT: A cash Adjustment (interest).
- QUARTERLY MAINTENANCE FEE: A negative cash Adjustment.
Here is a sample .csv file:
DATE,TRANSACTION ID,DESCRIPTION,QUANTITY,SYMBOL,PRICE,COMMISSION,AMOUNT,SALES FEE12/20/2005,2109615645,ACCOUNT TRANSFER INCOMING (VIA CHECK),,,,,346.56,
12/29/2005,2118044838,ORDINARY DIVIDEND (DVY),,DVY,,,14.84,
12/30/2005,2119781051,ORDINARY DIVIDEND (EFA),,EFA,,,39.95,
12/30/2005,2119794442,ORDINARY DIVIDEND (IJR),,IJR,,,4.79,
01/03/2006,2121217233,FREE BALANCE INTEREST ADJUSTMENT,,,,,0.02,
01/06/2006,2127989271,ORDINARY DIVIDEND (AGG),,AGG,,,10.75,
01/06/2006,2127995089,ORDINARY DIVIDEND (SHY),,SHY,,,8.98,
08/03/2006,2371115928,Bought 11 AGG @ 98.39,11,AGG,98.39,9.99,-1092.28,