Foreign currency history off by several orders of magnitude

Brian's Avatar

Brian

25 Oct, 2020 12:30 AM

The exchange rates downloaded by Alphadvantage seem to always be correct, but if I go into the currency history, the values are off by an enormous amount. I have attached a screenshot of this. If I go into the history dialog and exit out of it, the value used on the summary page will be changed from the correct one downloaded by Alphadvantage to the erroneous one. To get it back to correct, I need to manually select "Download quotes and exchange rates now", wait for it to finish, then exit moneydance and open it again.

  1. 1 Posted by derekkent23 on 25 Oct, 2020 08:55 AM

    derekkent23's Avatar

    I am not support staff, just a user.
    Hi Brian

    What version and build op Moneydance are you running? e.g. 2021(2007).

    Within the extension Quote and Exchange Rate Updater you should be using the source European Central Bank not Alpha Vantage. If this does not help try the extension Quote Loader.

    There are two methods within Moneydance for obtaining security prices and exchange rates automatically.

    The extension “Quote and Exchange Rate Updater” found under EXTENSIONS – MANAGE EXTENSIONS. Check you are running the latest build v1024. For exchange rates use the source European Central Bank. Alpha Vantage covers the US as well as some securities outside the US, but is very, very slow. It’s my understanding that the source IEX Trading no longer works.

    If the Quote and exchange rate updater does not work well for you try the extension Quote Loader under EXTENSIONS – MANAGE EXTENSION

    For information see post 63 at
    https://infinitekind.tenderapp.com/discussions/investments/4914-the...

    Download the PDF attached to posts 63 and have a read.

    To get an overview take a look at the YouTube videos by using the links on page 1 and 2 of the PDF.

    Let us know how you get on or if you need help just post.

    Hope this helps.

  2. 2 Posted by Brian on 26 Oct, 2020 09:18 PM

    Brian's Avatar

    I am running Moneydance 2021 build 2007. I'm unable to get the quote loader extension to download the exchange rate. I noticed that no matter how many times I update the currencies dialog, the next time I open it up, the Rate is always 0.003588. When I change it, the value on the summary page is updated correctly, but the next time I go into the currencies dialog, it shows 0.003588 again. Quitting out of that dialog actually updates the summary page to the 0.003588 value. That makes sense why this is only a problem when opening and closing that dialog box. Seems that is actually a bug in moneydance, not in the extension.

  3. 3 Posted by derekkent23 on 26 Oct, 2020 09:50 PM

    derekkent23's Avatar

    I am not support staff, just a user.
    Hi Brian

    Is it only the Australian Dollar exchange rate you are having problems with?

    As you can see from the screen shots of a test data set, I just set up in 2021(2007). I am not seeing any exchange rate issues.

    When you say I'm unable to get the Quote Loader extension to download the exchange rate, do you mean Quote Loader is not performing as the first screen shot or do you mean when you click Save Selected Values they are not saving to the Currency/Security history window second screen shot.

    Before you click Save Selected Values make sure you have removed incorrect data from the relevant Currency/Security history window.

    Please provide more detail on why you think you are unable to get the Quote Loader extension to download the exchange rate.

    If you look under TOOL – CURRENCIES do you see only one instance of the Australian Dollar?

    Hope this helps.

  4. 4 Posted by Brian on 27 Oct, 2020 01:42 AM

    Brian's Avatar

    As a test I removed all of the extensions and restarted Moneydance. Then I went into the currencies dialog and set the exchange rate manually to 0.9. The summary page changed with the rate set to 0.9, but when I re-opened the currencies dialog, it was again set to 0.003588. I think that part is a but in Moneydance itself, or something corrupted in my data, since it does that with no extensions.

  5. 5 Posted by Brian on 27 Oct, 2020 01:44 AM

    Brian's Avatar

    Here is a screenshot of the currency list. There are only 2 entries, US and AU.

  6. 6 Posted by Stuart Beesley ... on 27 Oct, 2020 06:37 AM

    Stuart Beesley - JUST A FELLOW USER's Avatar

    Can you screen shot the first page of each currency’s history?

  7. 7 Posted by Brian on 27 Oct, 2020 08:10 AM

    Brian's Avatar

    The history for "Australian Dollar" is empty. There is no history when double clicking on "US Dollar", just an edit dialog.

  8. 8 Posted by derekkent23 on 27 Oct, 2020 10:59 AM

    derekkent23's Avatar

    I am not support staff, just a user.
    Hi Brian

    Unless you have deleted all the currencies under TOOL – CURRENCIES there should lots more than two, see screen shot. Did you delete all the others?

    If you click on Australian Dollars under TOOL – CURRENCIES then edit does it look like my second screen shot? Does it have a ticker symbol of A$
    Is the SHOW ON SUMMARY PAGE box ticked?

    If you double click on US Dollar as the Base currency you should not see a exchange rate history just the window in my third screen shot.

    Post screen shots as I have.

    Hope this helps.

  9. 9 Posted by Brian on 27 Oct, 2020 08:02 PM

    Brian's Avatar

    I remember deleting the others I wasn't using some time ago. Screenshots attached.

  10. 10 Posted by derekkent23 on 27 Oct, 2020 08:48 PM

    derekkent23's Avatar

    I am not support staff, just a user.
    Hi Brain

    Open Quote Loader under extensions and set up as in first screen shot.
    Then click GET PRICES the result should be as seconds screen shot.
    Tick SELECT and click SAVE SELECTED PRICES - OK to give third screen shot.
    Now TOOLS – CURRENCIES, double click Australian Dollar the to give fourth screen shot.

    Take screen shots at each stage a I have in case you have a problem and need to post them.

    Hope this helps.

  11. 11 Posted by Brian on 27 Oct, 2020 09:01 PM

    Brian's Avatar

    Performing the steps you gave works, with the exception of the current Rate. That is still stuck at 0.003588.

    Since the current rate is always stuck, even if the extensions are not installed, I really think it is a moneydance bug.

  12. 12 Posted by Brian on 27 Oct, 2020 09:11 PM

    Brian's Avatar

    I tried renaming the old AUD entry and creating a new one, then it is no longer stuck at that value. However, I am unable to edit my existing accounts to change the currency (the currency cannot be changed in the edit account dialog). Additionally, whenever I open up my new AUD history, the current rate is subtracted by a small amount. If I keep opening up the history dialog and closing it, the Rate will keep decreasing (and this is also shown on the summary page).

  13. 13 Posted by derekkent23 on 27 Oct, 2020 09:32 PM

    derekkent23's Avatar

    I am not support staff, just a user.
    Hi Brian

    Your last post was interesting. You seems to have created some typed of loop possible, subtracting 0.003588 each time he opens the exchange rate window. I can’t see the next step to advice, so I have posted a link to this discussion on Sean’s the Moneydance developers slack site in the hope he will take a look.

    Hope this helps.

  14. 14 Posted by Stuart Beesley ... on 27 Oct, 2020 10:05 PM

    Stuart Beesley - JUST A FELLOW USER's Avatar

    Out of interest, on the currency you renamed (the ‘corrupt’) one, have you renamed both the ID and the name? Also have you checked that the new currency is not referencing / linked to the old currency?

  15. 15 Posted by Brian on 27 Oct, 2020 10:10 PM

    Brian's Avatar

    I have changed the Currency ID, Currency Name, and Value Prefix of the old one. The new one has the same values for these 3 fields as the old one.

    Also, the amount that gets subtracted from the rate after closing/opening the currency history is not consistent. I think maybe it is getting divided by something, or perhaps something more complex.

  16. 16 Posted by Brian on 27 Oct, 2020 10:18 PM

    Brian's Avatar

    Both of the australian dollar currencies only reference the us dollar.

  17. Support Staff 17 Posted by Sean Reilly on 27 Oct, 2020 10:29 PM

    Sean Reilly's Avatar

    Hi Brian,

    The exchange rate should obviously be changing and staying changed when you adjust it in the currency window. Can you try displaying the console window (using the Help -> Console Window menu), keeping it open, and then trying to manually change the currency rate by clicking on the currency from the summary page or from the Tools->Currencies menu? Then can you send a copy of the console text to me or attach it to a message here? Hopefully that will show some kind of error message which hints at the root problem.

    One other thing to try is to run the attached python script (which you'll have to unzip first). To run this can you open Moneydance, select the Window->Show MoneyBot Console, then click the Open Script button, select the unzipped python script (called reset_relative_currencies.py), and then select the "Run" button. Give it a few seconds to process and then can you send me a copy-and-paste of the text in the results text area at the bottom of that window?

    Thanks,
    Sean

    --
    Sean Reilly
    Developer, The Infinite Kind
    https://infinitekind.com

  18. 18 Posted by Brian on 27 Oct, 2020 10:39 PM

    Brian's Avatar

    I started with clearing the log, then opening Tools -> Currencies -> Australian Dollar. I changed the rate and closed the window. Then I opened up Australian Dollar again and closed it without changing anything. The only thing that showed up in the console log was this:

    logging txn; file: tiksync/out/20201027223144_582.txn-tmp
    logging txn; file: tiksync/out/20201027223214_586.txn-tmp

    I checked but did not find those files in the ~/.moneydance directory.

    I do not see a zip file on this page. I did try running the reset_relative_currencies.py script linked on https://infinitekind.tenderapp.com/discussions/suggestions/13441-please-allow-changing-the-currency-in-edit-account, but it did not help. The md5sum of that script is ec6bd26de3dad6790e6829a0655e9b3e. I have attached the log from running that script.

  19. 19 Posted by Stuart Beesley ... on 27 Oct, 2020 10:48 PM

    Stuart Beesley - JUST A FELLOW USER's Avatar

    A quick thought. Do you have syncing on? Try turning sync off and then correcting the currency. I wonder if you have a corrupt sync that’s redoing (wrong) changes?

  20. 20 Posted by Brian on 27 Oct, 2020 10:53 PM

    Brian's Avatar

    Which sync are you referring to? If it's related to the extensions, it shouldn't be related since the problem exists even with the extensions uninstalled.

  21. 21 Posted by dwg on 27 Oct, 2020 11:11 PM

    dwg's Avatar

    Stuart is referring to Moneydance Syncing i.e. syncing information between Moneydance instances on different machines.

  22. 22 Posted by Brian on 27 Oct, 2020 11:21 PM

    Brian's Avatar

    No I only use it on this machine, there is no sync configured, and the ~/.moneydance directory is not on any type of filesystem that does sync under it.

  23. Support Staff 23 Posted by Sean Reilly on 27 Oct, 2020 11:31 PM

    Sean Reilly's Avatar

    Hi Brian,

    Thanks for sending the log, and I'm pretty sure I know what the problem is now. Your base currency is USD, but apparently USD has a "rate" of 0.0035875600816215785 however because it is the base currency it should always have a rate of 1. I'm pretty sure this is a result of a bug that seems to only occur when the base currency is changed.

    Anyway, I've attached a zipped python script which should fix this. It's a similar script to the one that you ran but with one extra bit to fix the non-1.0 base currency rates. That is, if I've remembered to attach it this time!

    Can you please run this and let me know the results via copy-and-paste of the output text?

    Thanks,
    Sean

  24. 24 Posted by Brian on 27 Oct, 2020 11:39 PM

    Brian's Avatar

    Yes, that worked! Thanks so much! I have attached the log as requested.

  25. Support Staff 25 Posted by Sean Reilly on 27 Oct, 2020 11:46 PM

    Sean Reilly's Avatar

    Fantastic! Thanks for the confirmation as it showed the problem was what I had thought. It shouldn't be any more trouble now, and the exchange rate and security price updaters should all work properly now. Although to be honest I'd recommend using the European Central Bank source for exchange rates as those can all be retrieved in one shot, making them a lot faster than Alphavantage in general.

    Thanks,
    Sean

  26. 26 Posted by derekkent23 on 28 Oct, 2020 08:52 AM

    derekkent23's Avatar

    I am not support staff, just a user.
    Hi Brian

    Glad to see Sean responded as I thought he would and fixed your issue.

    Have Fun, Stay Safe.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • moneydance-currency.png 31.1 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac