OFX transaction dilemma

David Reiser dbreiser at icloud.com
Mon Feb 9 18:26:56 EST 2015


> On Feb 9, 2015, at 5:59 PM, David Reiser <dbreiser at icloud.com> wrote:
> 
> 
>> On Feb 9, 2015, at 11:06 AM, harphauler <hurst.lou at gmail.com> wrote:
>> 
>> I'll paste part of a QFX download below, have added some line feeds for a
>> little more clarity.  In this example there's just one dividend paid of
>> $10.10 and a new share purchased as a reinvest for $9.92.  If I keep things
>> simple, running this through the cash account only as two transactions and
>> accepting the transactions as is, the $9.92 purchase/reinvest results in
>> $9.92 too much cash in the cash account and -1 share in the investment
>> account.
>> 
>> Thanks!  Lou
>> 
>> OFXHEADER:100
>> DATA:OFXSGML
>> VERSION:102
>> SECURITY:NONE
>> ENCODING:USASCII
>> CHARSET:1252
>> COMPRESSION:NONE
>> OLDFILEUID:NONE
>> NEWFILEUID:NONE
>> 
>> <OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0<SEVERITY>INFO<MESSAGE>SUCCESS</STATUS><DTSERVER>20150209074656.443[-7:MST]<LANGUAGE>ENG<FI><ORG>dadco.com<FID>59401</FI><INTU.BID>17850<INTU.USERID>******</SONRS></SIGNONMSGSRSV1><INVSTMTMSGSRSV1><INVSTMTTRNRS><TRNUID>******<STATUS><CODE>0<SEVERITY>INFO<MESSAGE>SUCCESS</STATUS><INVSTMTRS><DTASOF>20150209074658.317
>> 
>> [-7:MST]<CURDEF>USD<INVACCTFROM><BROKERID>dadco.com<ACCTID>******</INVACCTFROM><INVTRANLIST><DTSTART>20150109000000.000[-7:MST]<DTEND>20150209074658.573
>> 
>> [-7:MST]<REINVEST><INVTRAN><FITID>R238269573826956<DTTRADE>20150126173000.000[-7:MST]<DTSETTLE>20150126173000.000[-7:MST]<MEMO>FIRST
>> TRUST DIV STRENGTH 25 MO
>> RE</INVTRAN><SECID><UNIQUEID>30284Y695<UNIQUEIDTYPE>CUSIP</SECID><INCOMETYPE>DIV<TOTAL>9.9200<SUBACCTSEC>CASH<UNITS>1.0000<UNITPRICE>9.920000<CURRENCY><CURRATE>1<CURSYM>USD</CURRENCY></REINVEST><INVBANKTRAN><STMTTRN><TRNTYPE>DIV<DTPOSTED>20150126173000.000[-7:MST]<TRNAMT>10.1000<FITID>187616018761601<MEMO>FIRST
>> TRUST DIV STRENGTH 25 MO RE 012515        
>> 669</STMTTRN><SUBACCTFUND>CASH</INVBANKTRAN>
>> 
>> </OFX> 
>> 
> 
> If the above transaction works in Quicken, then Intuit is violating their own standard. The OFX standard (versions 1.0.3, 2.0.3, and 2.1.1 are the ones I checked) clearly states: 
> 
> "Briefly, quantities and total values should be signed from the perspective of the user. In a stock buy, the total value is negative, the unit price is always positive, and the number of units is positive."
> 
> Under the description of <REINVEST>, version 2.0.3 states (and the others agree):
> 
> "TOTAL and UNITS are signed as for an investment buy" and earlier in the investments discussion "an investment buy would contain a negative TOTAL and positive UNITS"
> 
> So to comply with the OFX standard (QFX is an extension of OFX, not otherwise modifying it), the 
> <TOTAL>9.92
> in the above OFX stream should be
> <TOTAL>-9.92
> 
> Dave
> --
> Dave Reiser
> dbreiser at icloud.com
> 
It occurs to me that in cases where the dividend and reinvested amounts are not the same, the use of REINVEST might be incorrect. The OFX standard also says: 

"REINVEST is a single transaction that contains both income and an investment transaction. If servers can’t track this as a single transaction they should return an INCOME transaction and an INVTRAN."

All of the reinvestment OFX transactions I have access to are full reinvestment in fractional shares, so I've never seen a reinvestment 'with some left over' in my accounts.

When I have read the quote above in the past, I've always read it as a comment about inadequacies of a server or its programmers, rather than an inherent problem with a more complex reinvestment transaction.

The other option for getting your gnucash numbers right is for the <TRNAMT> of the leftover value piece to be (total dividend - reinvested amount). But I suspect accountants would object that such a strategy would be frowned upon as hard to audit at some time in the future.

Dave





More information about the gnucash-user mailing list