Updating quotes via OFX


I’ve located a Microsoft document that some may find useful in digging into OFX further.  One complaint that we’ve all expressed (or at least read from others) is that, unlike getting Online quotes via MSN which will constantly overwrite themselves with the most recent value for that particular day, the Python scripted version only takes the first value received that day.   Only by deleting that entry (or manually changing the value) are you able to download a new value for the day.   Maybe someone can figure out if this excerpt will help get around this behavior…

Prices Received From Brokerage

Brokerages are required by OFX spec to always send UNITPRICE in INVPOS. However, Money does not always use this feed to update price history. Money only updates price history with price from INVPOS when it makes an adjustment, an add or remove shares, based upon this position information. This is by design.

Money expects that security prices will be kept up to date by our quote feed. On a first call known securities that need no position update will have price as of last transaction. Future calls will update to current price from quote feed.  What this means, however, is that Money never updates prices for securities without known TICKERs, such as Bonds, or brokerage funds that are not publicly traded. Users will need to update these manually.

Also, for those that have wondered why the date is sometimes behind by a day…

According to OFX specification 3.2.8.2:

Date and datetime also accept values with fields omitted from the right. They assume the following defaults if a field is missing:

Specified date or datetime Assumed defaults
YYYYMMDD 12:00 AM (the start of the day), GMT
YYYYMMDDHHMMSS GMT
YYYYMMDDHHMMSS.XXX GMT

 

Banking/Investment implementation

If a date does not have any hours or GMT adjustment values, Money interprets the time of the statement as midnight GMT. Since midnight GMT is 5 hours before midnight EST, Money would interpret a <DTPOSTED>19990505 as 7 PM on 5/4/99 if the system time zone were EST. In this case, Money would display the date as 5/4/99, rather than 5/5/99.

Additionally, if the date includes a datetime designation such as 20000505050000 for a server in EST, Money converts the date to GMT, and then converts it back to the LOCAL time zone (not the server’s). If a customer were connecting from the Pacific coast, Money considers the time of the transaction to be 9PM 5/4/00, which is one day earlier than expected.

Recommendations

Microsoft recommends that servers either send server time in full datetime format or send dates with a datetime format that equates to Noon GMT, such as CCYYMMDD120000. With this format, Money displays the expected date for almost any time in the world. In the example above, a 20000505120000 would always display as 5/5/00 anywhere the world except for the center of the Pacific Ocean.

Advertisements

5 Comments »

  1. Phillip said

    Ameridan – I will not comment on the Python sctipts since I have not used one, however, the behaviour of money (as per excerpt) is not un-usual for transaction downloads compared to other PFMs.

    A workaround that I use for my “bespoke” Office Accounting investment account is that I post a single share “dummy” buy and sell (or vice versa) for all investments in my portfolio and upload transaction statements (with the updated prices).

  2. Norm said

    Question. I’m using the Python OFX scripts for a TD Ameritrade account. The file OFX updates account activity, but not the stock value. Looking at the OFX download, TD Ameritrade is reporting the number of units and the closing price, but MONEY isn’t looking at the data.

    Do I need to set up and maintain a separate quote file? From what I read, the brokerage account should update the holdings and a separate quote account is needed only if it is desited to track a stock that is not in a specific account. Am I incorrect?

  3. ameridan said

    You are correct Norm. When downloading the statement, it should first be matched to the proper account, and then it should be asking you to match up the each investment within that account – and making sure each symbol is there for subsequent downloads. You didn’t first try to get quotes for those holdings in your dummy account via Yahoo, did you?

  4. Norm said

    Never had a dummy account. The daily values for stocks is included in the OFX file received from Ameritrade, but not updated in Money. I have a T Rowe Price mutual fund in the same MONEY investment account and this does update with the latest closing unit value.

    I have changed the ‘send stock/fund quotes to Money first’ from NO to YES and didn’t solve the problem. Not a big issue, but it seems that it should work. I do receive account changes such as dividends and sales/purchases, just not price update

    I don’t recall having to match each investment when I first ran the script.

  5. ameridan said

    You wouldn’t if it was just carryover from the Money Online updates, because the symbols didn’t change, just the method of getting the OFX file.

RSS feed for comments on this post

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: