Re: [GNC] Stock quotes for BT.A

2020-06-06 Thread Ruaraidh Sackville Hamilton
  Perfect! Many thanks Maf. and Frank, that worked :-)

On Sat, 6 Jun 2020 at 14:44, Frank H. Ellenberger <
frank.h.ellenber...@gmail.com> wrote:

>
>
> Am 06.06.20 um 13:46 schrieb Ruaraidh Sackville Hamilton:
> > Does anyone know how to get price quotes for LSE:BT.A from Alphavantage?
> Or
> > from any other source?
>
> No, but google ;-)
> try https://www.google.com/search?q=LSE+BT.A
>
> > Following other advice on this forum, I've successfully retrieved price
> > quotes from Alphavantage for other LSE stocks by concatenating the LSE
> > ticker code with ".L" and setting that as the value of Symbol in the
> > Security Editor. For example, setting Symbol = "BP.L" successfully
> > retrieves the price quote for BP.
> >
> > The ticker code for BT Group is BT.A, so I tried "BT.A.L", but that
> failed.
> >
> > I guess that breaks their syntax rules, so, guessing wildly, I've also
> > tried "BT_A.L" and "BTA.L" and "BT.L", but all of these fail too.
>
> yes, 2 dots in one symbol confuse yahoo. On above page you see, they
> replace the first by dash.
>
> > Any other suggestions would be welcome!
>
> So I was able to get results with
> gnc-fq-dump -v yahoo_json BT-A.L
> and
> gnc-fq-dump -v alphavantage BT-A.L
> but failed with fool, but their website gave me also no quote.
>
> HTH
> Frank
>
___
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: [GNC] Stock quotes for BT.A

2020-06-06 Thread Frank H. Ellenberger



Am 06.06.20 um 13:46 schrieb Ruaraidh Sackville Hamilton:
> Does anyone know how to get price quotes for LSE:BT.A from Alphavantage? Or
> from any other source?

No, but google ;-)
try https://www.google.com/search?q=LSE+BT.A

> Following other advice on this forum, I've successfully retrieved price
> quotes from Alphavantage for other LSE stocks by concatenating the LSE
> ticker code with ".L" and setting that as the value of Symbol in the
> Security Editor. For example, setting Symbol = "BP.L" successfully
> retrieves the price quote for BP.
> 
> The ticker code for BT Group is BT.A, so I tried "BT.A.L", but that failed.
> 
> I guess that breaks their syntax rules, so, guessing wildly, I've also
> tried "BT_A.L" and "BTA.L" and "BT.L", but all of these fail too.

yes, 2 dots in one symbol confuse yahoo. On above page you see, they
replace the first by dash.

> Any other suggestions would be welcome!

So I was able to get results with
gnc-fq-dump -v yahoo_json BT-A.L
and
gnc-fq-dump -v alphavantage BT-A.L
but failed with fool, but their website gave me also no quote.

HTH
Frank
___
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: [GNC] Stock quotes for BT.A

2020-06-06 Thread Maf. King
Try BT-A.L  (a minus sign).  it used to work in the old days via yahoo, I no 
longer hold that stock so don't have it in the Alphavantage checks.

HTH,
Maf.


On Saturday, 6 June 2020 12:46:46 BST Ruaraidh Sackville Hamilton wrote:
> Does anyone know how to get price quotes for LSE:BT.A from Alphavantage? Or
> from any other source?
> 
> Following other advice on this forum, I've successfully retrieved price
> quotes from Alphavantage for other LSE stocks by concatenating the LSE
> ticker code with ".L" and setting that as the value of Symbol in the
> Security Editor. For example, setting Symbol = "BP.L" successfully
> retrieves the price quote for BP.
> 
> The ticker code for BT Group is BT.A, so I tried "BT.A.L", but that failed.
> 
> I guess that breaks their syntax rules, so, guessing wildly, I've also
> tried "BT_A.L" and "BTA.L" and "BT.L", but all of these fail too.
> 
> Any other suggestions would be welcome!
> ___
> 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.


-- 
Maf. King
PGP Key fingerprint = 8D68 A91F 733B 2C1F 43B7  2B7C E591 E8E1 0DE7 C542





___
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.


[GNC] Stock quotes for BT.A

2020-06-06 Thread Ruaraidh Sackville Hamilton
Does anyone know how to get price quotes for LSE:BT.A from Alphavantage? Or
from any other source?

Following other advice on this forum, I've successfully retrieved price
quotes from Alphavantage for other LSE stocks by concatenating the LSE
ticker code with ".L" and setting that as the value of Symbol in the
Security Editor. For example, setting Symbol = "BP.L" successfully
retrieves the price quote for BP.

The ticker code for BT Group is BT.A, so I tried "BT.A.L", but that failed.

I guess that breaks their syntax rules, so, guessing wildly, I've also
tried "BT_A.L" and "BTA.L" and "BT.L", but all of these fail too.

Any other suggestions would be welcome!
___
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: [GNC] importing multiple CSVs to Gnucash

2020-06-06 Thread Geert Janssens
Op vrijdag 5 juni 2020 12:57:44 CEST schreef Gio Bacareza:
> Thank you Adrien, David and @flywire for your very helpful responses.
> 
> I actually created a script that would transform different file formats and
> data structures and through a machine learning classifier autopopulate the
> "Transfer Account '' depending on the description.
> 
> My script would scour through the different formats since banks generally
> are not standardized and transform these different files into a standard
> simple CSV with DATE, DESCRIPTION, ACCOUNT, DEPOSIT, WITHDRAWAL.
> 
> After transformation, I run it through my classifier and that will add the
> TRANSFER ACCOUNT field and autopopulate with the predicted transfer account
> that is an exact string match, eg if transfer account is "XXXYYYZZZ" in the
> csv, there is such an account in GNUCASH that the exact string equivalent
> "XXXYYYZZZ". I figured that if I explicitly include the specific Transfer
> Account per line in the csv, it should help GNUCASH match.
> 
> This could save me a lot of time since I don't have to transform each bank
> account statement or logs individually. I have lots of accounts. I can
> imagine I'm not alone in this case.
> 
> I understand from your comments that GNUCASH follows a Naive-bayes
> algorithm to predict the TRANSFER ACCOUNT given the description and you
> have to feed it transactions little by litle for it to learn. But as I have
> said, I have already pre-processed that data so GNUCASH does not have to do
> that. I explicitly feed it with the exact transfer account.
> 

Not necessarily. The process is slightly more complicated.

In the absence of transfer account data, gnucash can only fall back to a 
bayesian matching 
algorithm based on the other data available (description, date, amounts,...)

However if there is transfer account data in the csv, gnucash will use it and 
generate 
transactions based on it. It will still use bayesian matching to check if a 
similar transaction (to 
the exact transfer account) already exists or not, but that would be much more 
accurate if a 
transfer account is known.

The caveat is that initially gnucash won't know how to map transfer account 
data to actual 
accounts in gnucash. This is also something you have to train gnucash with. 
However this is not 
done via a bayesian based training. Instead it's a direct mapping between a 
string in your csv 
data and and account in gnucash. This process currently has to happen manually 
and is a step 
in the csv importer you have to go through. This unfortunately makes initial 
imports 
cumbersome, as in those you have to do a lot of this mapping. As over time the 
mapped data 
gets bigger it will happen much less often to have to add a manual account map, 
speeding up 
imports the more you do them.
Contrary to the bayesian training (where small batches of training material are 
better) the 
import file size doesn't matter at all for this account map creation. It's more 
important your 
preprocessing script is very consistent in its generation of transfer account 
names because then 
each transfer account has to be taught only once ever. Be it on a first huge 
import or on any 
future import that uses this account for the first time.

I will add I believe there is room for improvement here. It would certainly 
help if gnucash could 
be made smarter at recognizing exact matches between transfer account names or 
codes in the 
csv data and actual gnucash accounts. While gnucash can never assume 
automatically that 
constitutes a proper match it could suggest it as an account match and leave it 
to the user to 
confirm. That could save a lot of clicks. But someone would have to implement 
this.

Regards,

Geert
___
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: [GNC] --add-price-quotes prints nothing and always fails with no info

2020-06-06 Thread Chris Good
-Original Message-
From: Chris Good  
Sent: Saturday, 6 June 2020 5:16 PM
To: gnucash-user@gnucash.org
Cc: h...@topbug.net
Subject: RE: [GNC] --add-price-quotes prints nothing and always fails with
no info

Message: 4
Date: Fri, 5 Jun 2020 08:44:43 -0700
From: John Ralls 
To: Hong Xu 
Cc: gnucash-user@gnucash.org
Subject: Re: [GNC] --add-price-quotes prints nothing and always fails
with no info
Message-ID: 
Content-Type: text/plain;   charset=us-ascii



> On Jun 4, 2020, at 2:06 PM, Hong Xu  wrote:
> 
> Hi!
> 
> I tried to play with automatic stock price retrieval, but it always 
> failed
(although gnc-fq-dump works well).
> 
> When I run "gnucash --debug --add-price-quotes 
> /path/to/my/gnucash/file",
I got the following output:
> 
> Found Finance::Quote version 1.49.
> 
> Then "echo $?" prints "1".
> 
> gnc-fq-dump works well:
> 
> $ gnc-fq-dump yahoo_json AMZN
> Finance::Quote fields Gnucash uses:
> symbol: AMZN <=== required
>   date: 06/04/2020   <=== recommended
>   currency: USD  <=== required
>   last: 2460.6   <=\  
>nav:  <=== one of these
>  price:  <=/   
>   timezone:  <=== optional
> 
> Is there any way to get more debug information? My system is Debian 
> 10,
and "gnucash -v" outputs:

By default GnuCash logs to a file: https://wiki.gnucash.org/wiki/Tracefile.

If you want the output to go to the terminal add `--logto=stderr` to the
command line.

Regards,
John Ralls

Hi Hong,

(apologies if this is not the correct way to address you)

If it works in gnc-fq-dump, but not from Get Quotes button, maybe there is a
problem with how the stock is set up in the Security Editor.
Please attach (do not paste into message) a screen dump showing the setup in
the security editor.
Note that (I think) in old versions of GnuCash, a problem with 1 stock could
cause them all to fail, so it is worthwhile unticking 'Get Quotes' on all
the securities and keep importing and ticking 'Get Quotes' on additional
securities to find the problem ones.

Regards, Chris Good

This of course is assuming they don't already all work from the 'Get Quotes'
button...

Regards, Chris Good

___
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: [GNC] --add-price-quotes prints nothing and always fails with no info

2020-06-06 Thread Chris Good
Message: 4
Date: Fri, 5 Jun 2020 08:44:43 -0700
From: John Ralls 
To: Hong Xu 
Cc: gnucash-user@gnucash.org
Subject: Re: [GNC] --add-price-quotes prints nothing and always fails
with no info
Message-ID: 
Content-Type: text/plain;   charset=us-ascii



> On Jun 4, 2020, at 2:06 PM, Hong Xu  wrote:
> 
> Hi!
> 
> I tried to play with automatic stock price retrieval, but it always failed
(although gnc-fq-dump works well).
> 
> When I run "gnucash --debug --add-price-quotes /path/to/my/gnucash/file",
I got the following output:
> 
> Found Finance::Quote version 1.49.
> 
> Then "echo $?" prints "1".
> 
> gnc-fq-dump works well:
> 
> $ gnc-fq-dump yahoo_json AMZN
> Finance::Quote fields Gnucash uses:
> symbol: AMZN <=== required
>   date: 06/04/2020   <=== recommended
>   currency: USD  <=== required
>   last: 2460.6   <=\  
>nav:  <=== one of these
>  price:  <=/   
>   timezone:  <=== optional
> 
> Is there any way to get more debug information? My system is Debian 10,
and "gnucash -v" outputs:

By default GnuCash logs to a file: https://wiki.gnucash.org/wiki/Tracefile.

If you want the output to go to the terminal add `--logto=stderr` to the
command line.

Regards,
John Ralls

Hi Hong,

(apologies if this is not the correct way to address you)

If it works in gnc-fq-dump, but not from Get Quotes button, maybe there is a
problem with how the stock is set up in the Security Editor.
Please attach (do not paste into message) a screen dump showing the setup in
the security editor.
Note that (I think) in old versions of GnuCash, a problem with 1 stock could
cause them all to fail, so it is worthwhile unticking 'Get Quotes' on all
the securities and keep importing and ticking 'Get Quotes' on additional
securities to find the problem ones.

Regards, Chris Good


___
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.