assorted liked I have anyksokwA

2018-03-18 Thread Justin Smith
Wasn'tko
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: Online quotes fetching latest stock price but incorrect date; currency exchange rate also not working

2018-02-19 Thread Justin Smith
>
> Hi Justin,
> I've been chasing this issue for a couple of weeks - I'm pretty sure
> this is an ASX specific problem. Unfortunately, I think the problem
> lies in the alpha vantage data source - we're going to need to chase
> up with them to sort a fix, and may then need an update to
> Finance::Quote as well. Alternatively, we need to fix ASX.pm (per my
> previous post on this issue).
> Here's what I've found to date:
> 1) Finance::Quote pulls data from alphavantage using an address of the
> form:
>
> https://www.alphavantage.co/query?function=TIME_SERIES_DAILY=TLS.AX=*
> (You can test this directly with your own api key)
> From the comments in the Perl alphavantage module, this data set
> includes date and time data *if* the market is open. Otherwise it only
> returns date data only. The perl module removes the time data and
> returns the date data.
> 2) As you have observed (and as can be seen from the above link), the
> date returned by alpha vantage for normal ASX stocks is *early* by 1
> day - for example, the data set I ran on Sunday 19th returned correct
> prices for Monday 12th through Friday 16th, but assigned these to
> Sunday 11th through Thursday 15th.
> 3) I don't believe this can be corrected by timezone shifts - I
> suspect that because the alpha vantage module does not return a time,
> the perl will (reasonably) assume that the alphavantage data is
> returned at mid-night (i.e. if alpha vantage returns 12/2/2018, then
> perl/gnucash will treat this as 12/2/2018 00:00 for the purposes of
> time zone calcs). If this is the case, it doesn't matter what time
> zone shift you apply, it won't change the date.
> I ran a set of test on this in gnucash, and couldn't make the date
> change no matter what time zone I chose (I'm on East Coast Australian
> time).
> 4) ETFs and possibly managed funds in general are updated later, and
> just the at the moment these get the correct date. e.g.
>
> https://www.alphavantage.co/query?function=TIME_SERIES_DAILY=VAS.AX=*
> Further notes on this - a) from comments elsewhere on the net, it
> looks as though ETFs/managed funds are only updated once per day, and
> b) weird things happen to this data on the weekend - e.g. VAS has
> correct price information for Friday 16th, but the next available data
> point is 4th Feb. This anomaly gets corrected at the start of the week
> (don't think this matters for Gnucash use).

5) I'm having the same problem with USD currency rates. Maybe a change
> in the API or the constants for AUD/USD. I haven't looked into the
> code for this yet.
> 6) All this may change when daylight saving changes here and/or in the
> US - right at the moment, the ASX is closing spot on midnight East
> Coast US time (alpha vantage reference time zone) - our data may
> suddenly start working correctly when daylight saving changes. So
> something else to watch for over the next few weeks.
> At this stage, I have only spent time running the problem down - I
> haven't had time to think about a fix.
> Cheers,
> Larry
>

Thanks Larry. That's great info. After reading your email I did two tests
today (same gnc-fq-dump alphavantage NAB.AX command):

  * Run at 8.00am 19 Feb Perth time (7.00pm 18 Feb New York). ASX open.
Returns $29.36 with a date of 18 Feb. This price is actually spot on -
assuming a 20min delay on quotes, which most free services quoting the ASX
have. But of course the date is wrong.

  * Run at 6.30pm 19 Feb Perth time (5.30am 19 Feb New York). ASX closed.
Returns $29.46 with a date of 18 Feb. This is the correct closing
price. But wrong date as expected.

It suggests that simply adding one to the date would fix the issue. But
you're right that we need to test the daylight saving changes. And no doubt
there will different dates in NY and Sydney...

Cheers,
Justin.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: Online quotes fetching latest stock price but incorrect date; currency exchange rate also not working

2018-02-18 Thread Justin Smith
>
> And by ?operating system?s time zone is correct? he means ?in Australia?
> (or Asia somewhere), because if you?re in America then the closing price
> really is from the 15th.
> Regards,
> John Ralls
> > On Feb 17, 2018, at 7:32 PM, Ronal B Morse  wrote:
> >
> > I guess the first step is to verify that the system time and date is
> correct and the operating system's time zone setting is correct.
> >
> > RBM


Hi John, Ronal,

The PC clock, date, and timezone are set correctly (Western Australia:
+8:00). I haven't changed them since I set up the PC years ago.

But John's comment about "if you're in America" might be the reason... (but
the other way around). Yes I live in Australia but if "gnc-fq-dump
alphavantage" returns Friday's closing price (Sydney-time) with a date
based on the local time of the alphavantage server (e.g. San Francisco),
then it would return Thurs (Feb 15).

But if so, something has changed, because when I fetched the quotes last
Thurs, Feb 15, it worked fine.

I'll test again tomorrow (Mon).


Cheers,
Justin.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Online quotes fetching latest stock price but incorrect date; currency exchange rate also not working

2018-02-17 Thread Justin Smith
Hi,

Gnucash is not updating stock quotes correctly for me. The stock price is
correct but an incorrect date is used.

This is confirmed when testing using gnc-fq-dump. E.g.

ALPHAVANTAGE_API_KEY= gnc-fq-dump alphavantage NAB.AX
Finance::Quote fields Gnucash uses:
symbol: NAB.AX   <=== required
  date: 02/15/2018   <=== recommended
  currency: AUD  <=== required
  last: 29.2200  <=\
   nav:  <=== one of these
 price:  <=/
  timezone:  <=== optional

Today's date is Feb 18. The price is actually the closing price for last
Fri 16 Feb.

Gnucash then overwrites the historical price for Feb 15, with the price for
Feb 16.

This happens for all my ASX stocks.

At the same time, Gnucash is also consistently returning the error "Unable
to retrieve quotes for these items: CURRENCY:USD". This sounds unrelated if
it wasn't for the fact that it started happening at the same time as the
above date issue...

I am running GnuCash 2.6.17 on Ubuntu 17.04 Zesty (PPA). And Finance::Quote
1.48 (installed from git).

Any ideas?


Thanks,
Justin.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: Online quotes fetching the wrong price

2018-02-08 Thread Justin Smith
Responding to my own email...

Adding ".AX" to each security "Symbol/abbreviation" for ASX stocks fixed my
issue.

Yahoo didn't need this suffix, but alphavantage does.

Now all good!

Cheers,
Justin.


On 8 February 2018 at 22:10, Justin Smith <jus...@smithpolglase.com> wrote:

> Thanks - that works for me too...
>
> So how do configure gnucash to use NAB.AX instead of NAB?
>
> I would have thought that setting the security type to "ASX" would have
> done that...
>
> Cheers,
> Justin.
>
>
> On 8 February 2018 at 21:20, Anthony Hepple <anth...@dhdevelopment.co.uk>
> wrote:
>
>> The ticker NAB.AX seems to work for me:
>>
>> ALPHAVANTAGE_API_KEY= gnc-fq-dump alphavantage NAB.AX
>> Finance::Quote fields Gnucash uses:
>> symbol: NAB.AX   <=== required
>>   date: 02/07/2018   <=== required
>>   currency: AUD  <=== required
>>   last: 28.9000  <=\
>>nav:      <=== one of these
>>  price:  <=/
>>   timezone:  <=== optional
>>
>> On 8 February 2018 at 13:09, Justin Smith <jus...@smithpolglase.com>
>> wrote:
>> > Hi David,
>> >
>> > Thanks for your email - it's interesting that it's not just me. I was
>> > hoping the issue was my configuration...
>> >
>> > You ask about NAB and Mar 13 but I have this same problem ("random" USD
>> > quotes) with *all* my ASX stocks (20+).
>> >
>> > Cheers,
>> > Justin.
>> >
>> >
>> > On 8 February 2018 at 21:01, David T. <sunfis...@yahoo.com> wrote:
>> >
>> >> Justin,
>> >>
>> >> I see the same command line result. I will note that the date listed
>> there
>> >> is for 2017 (mine is the same), which suggests something is out of
>> whack.
>> >> Looking online, I see that NAB was at 33.14 on 03/13/2017, so that
>> doesn’t
>> >> work. I’ve tried various versions of the exchange (ASX, ASE, AX, all of
>> >> which appear out on the web) and the symbol (both the ticker, and the
>> ISIN, AU00NAB4)
>> >> without success.
>> >>
>> >> Usually, when I see an old date, it means that the symbol ceased
>> trading
>> >> for one reason or another (e.g., a merger or a company purchase), which
>> >> leaves the ticker “stuck” on the last day of existence. That isn’t the
>> case
>> >> here; was there anything funny that happened last March 13 for NAB?
>> >>
>> >> Sorry I can’t be of help. Maybe someone else has better chops.
>> >>
>> >> David
>> >>
>> >> On Feb 7, 2018, at 7:50 PM, Justin Smith <jus...@smithpolglase.com>
>> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I use gnc to track my stock portfolio of mostly Australian ASX stocks.
>> >> After yahoo closed their quoting service I set up alphavantage as per
>> the
>> >> instructions in the gnc FAQ (with key etc).
>> >>
>> >> I've just noticed that the online quotes for *all* my ASX stocks are
>> now in
>> >> USD, and that they are meaningless values too (i.e. not the ASX stock
>> in
>> >> USD).
>> >>
>> >> This is confirmed when testing using gnc-fq-dump. E.g.
>> >>
>> >> ALPHAVANTAGE_API_KEY= gnc-fq-dump alphavantage NAB
>> >> Finance::Quote fields Gnucash uses:
>> >>symbol: NAB  <=== required
>> >>  date: 03/13/2017   <=== recommended
>> >>  currency: USD  <=== required
>> >>  last: 1.0800   <=\
>> >>   nav:  <=== one of these
>> >> price:  <=/
>> >>  timezone:  <=== optional
>> >>
>> >> The price of $1.08 USD is what gnc fetches today.
>> >>
>> >> The correct quote for ASX.NAB is around $28.24 AUD (or around $22.18
>> USD).
>> >>
>> >> A quick search didn't even find a NYSE or NASDAQ NAB so I have no idea
>> >> where F::Q is getting this quote from.
>> >>
>> >> Also I don't know why the date returned by gnc-fq-dump is 3/13/2017.
>> Very
>> >> odd.
>> >>
>> >> How does gnc-fq-dump determine the stock type? (e.g. ASX or NYSE)
>> >

Re: Online quotes fetching the wrong price

2018-02-08 Thread Justin Smith
Hi David,

Thanks for your email - it's interesting that it's not just me. I was
hoping the issue was my configuration...

You ask about NAB and Mar 13 but I have this same problem ("random" USD
quotes) with *all* my ASX stocks (20+).

Cheers,
Justin.


On 8 February 2018 at 21:01, David T. <sunfis...@yahoo.com> wrote:

> Justin,
>
> I see the same command line result. I will note that the date listed there
> is for 2017 (mine is the same), which suggests something is out of whack.
> Looking online, I see that NAB was at 33.14 on 03/13/2017, so that doesn’t
> work. I’ve tried various versions of the exchange (ASX, ASE, AX, all of
> which appear out on the web) and the symbol (both the ticker, and the ISIN, 
> AU00NAB4)
> without success.
>
> Usually, when I see an old date, it means that the symbol ceased trading
> for one reason or another (e.g., a merger or a company purchase), which
> leaves the ticker “stuck” on the last day of existence. That isn’t the case
> here; was there anything funny that happened last March 13 for NAB?
>
> Sorry I can’t be of help. Maybe someone else has better chops.
>
> David
>
> On Feb 7, 2018, at 7:50 PM, Justin Smith <jus...@smithpolglase.com> wrote:
>
> Hi,
>
> I use gnc to track my stock portfolio of mostly Australian ASX stocks.
> After yahoo closed their quoting service I set up alphavantage as per the
> instructions in the gnc FAQ (with key etc).
>
> I've just noticed that the online quotes for *all* my ASX stocks are now in
> USD, and that they are meaningless values too (i.e. not the ASX stock in
> USD).
>
> This is confirmed when testing using gnc-fq-dump. E.g.
>
> ALPHAVANTAGE_API_KEY= gnc-fq-dump alphavantage NAB
> Finance::Quote fields Gnucash uses:
>symbol: NAB  <=== required
>  date: 03/13/2017   <=== recommended
>  currency: USD  <=== required
>  last: 1.0800   <=\
>   nav:  <=== one of these
> price:  <=/
>  timezone:  <=== optional
>
> The price of $1.08 USD is what gnc fetches today.
>
> The correct quote for ASX.NAB is around $28.24 AUD (or around $22.18 USD).
>
> A quick search didn't even find a NYSE or NASDAQ NAB so I have no idea
> where F::Q is getting this quote from.
>
> Also I don't know why the date returned by gnc-fq-dump is 3/13/2017. Very
> odd.
>
> How does gnc-fq-dump determine the stock type? (e.g. ASX or NYSE)
>
> For all my ASX stocks, in the Security Editor, I have the following
> settings:
> * Type = ASX
> * ISIN/CUSIP =  (is that a problem?)
> * Get Online Quotes is ticked
> * Type of Quote = Unknown/alphavantage
>
> I am running GnuCash 2.6.17 on Ubuntu 17.04 Zesty (yes, end of life).
> And Finance::Quote 1.48 (installed from git).
>
> Any clues?
>
>
> Cheers,
> Justin.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
>
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Online quotes fetching the wrong price

2018-02-07 Thread Justin Smith
Hi,

I use gnc to track my stock portfolio of mostly Australian ASX stocks.
After yahoo closed their quoting service I set up alphavantage as per the
instructions in the gnc FAQ (with key etc).

I've just noticed that the online quotes for *all* my ASX stocks are now in
USD, and that they are meaningless values too (i.e. not the ASX stock in
USD).

This is confirmed when testing using gnc-fq-dump. E.g.

ALPHAVANTAGE_API_KEY= gnc-fq-dump alphavantage NAB
Finance::Quote fields Gnucash uses:
symbol: NAB  <=== required
  date: 03/13/2017   <=== recommended
  currency: USD  <=== required
  last: 1.0800   <=\
   nav:  <=== one of these
 price:  <=/
  timezone:  <=== optional

The price of $1.08 USD is what gnc fetches today.

The correct quote for ASX.NAB is around $28.24 AUD (or around $22.18 USD).

A quick search didn't even find a NYSE or NASDAQ NAB so I have no idea
where F::Q is getting this quote from.

Also I don't know why the date returned by gnc-fq-dump is 3/13/2017. Very
odd.

How does gnc-fq-dump determine the stock type? (e.g. ASX or NYSE)

For all my ASX stocks, in the Security Editor, I have the following
settings:
* Type = ASX
* ISIN/CUSIP =  (is that a problem?)
* Get Online Quotes is ticked
* Type of Quote = Unknown/alphavantage

I am running GnuCash 2.6.17 on Ubuntu 17.04 Zesty (yes, end of life).
And Finance::Quote 1.48 (installed from git).

Any clues?


Cheers,
Justin.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Configuring GnuCash to fetch stock prices from ASX

2017-11-10 Thread Justin Smith
Hi All,

I had configured GnuCash to fetch stock prices with a single quote source
set to "Yahoo Australia". Like many others on this list, this stopped
working recently when Yahoo discontinued their service.

After trying a few things, I noticed that the following works:


$ gnc-fq-dump asx bhp
Finance::Quote fields Gnucash uses:
symbol: bhp  <=== required
  date: ** missing **<=== recommended
  currency: AUD  <=== required
  last: 28.070   <=\
   * correct price *
   nav:  <=== one of these
 price: 28.070   <=/
  timezone:  <=== optional

** This quote will have today's date, which might be incorrect.
   GnuCash will use it, but you might prefer that it doesn't.


But, when I set the single quote source for this stock to "Australian Stock
Exchange, AU", GnuCash returns an error "Unable to retrieve quotes for
these items..."

Does anyone know why gnc-fq-dump works but GnuCash doesn't?

BTW I updated F::Q to version 1.45.


Cheers,
Justin.
___
gnucash-user mailing list
gnucash-user@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Updated Finance-Quote to 1.44; GnuCash still not retrieving quotes

2017-11-09 Thread Justin Smith
Hi,

After experiencing the same Yahoo-related issues retrieving stock quotes
has many others in this group, I upgraded Finance-Quote to version 1.44.

So this, on it's own, didn't fix the issue, but I'm confused about how
GnuCash uses Finance-Quote.

In GnuCash you need to select the quote source. After upgrading F::Q,
setting the GnuCase quotge source to either of "Australian Stock Exchange,
AU", or "alphavantage" or anything else does not work.

However, if I run F::Q using a simple perl script (below), it works fine...

#!/usr/bin/perl
use Finance::Quote;
my $q = Finance::Quote->new();
my %data = $q->fetch('ASX', 'NAB');
print "NAB price is " . $data{'NAB', 'price'} . "\n";

So what source is F::Q using by default and how can I set this in GnuCash?

I'm running GnuCash 2.6.17 on Ubuntu 17.04, installed using the getdeb
repository.

I'm mostly interested in stocks on the ASX.


Cheers,
Justin.
___
gnucash-user mailing list
gnucash-user@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.