Comment 5 for bug 1040191

Revision history for this message
Manfred Hampl (m-hampl) wrote :

In response to this Bug report and a question https://answers.launchpad.net/ubuntu/+question/207932 I have played around with protoborsa (12.07.17ubuntu1) and found out the following:

1. Ticker symbols can be added manually with limited effort:
You need the sqlite3 user interface installed (apt-get install sqlite3)
open a terminal and issue the command
sqlite3 ~/.protoborsa/stocksymbols.db
inside sqlite3 at the 'sqlite>' prompt enter this SQL command:
insert into "Symbols" values ('BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.');
close sqlite3 with the command
.exit
(The three Fields in the list are the ticker symbol, the company name, and the company name in lower case letters)
I have no clue how to receive a complete list of ticker symbols for the companies where finance.yahooo.com provides data. Such list could easily be uploaded into the stocksymbold.db database - either by creating SQL commands, or with a mass upload function of the sqlite3 program.

2. The currency displayed in protoborsa always is US Dollars ($), even if the data from Yahoo are in a different currency.
According to http://code.google.com/p/yahoo-finance-managed/wiki/enumQuoteProperty you can request the currency by the symbol c4. It should no be too complicated to request the currency symbol from yahoo and use that instead of the strings '$' resp. 'Dollars'

1. Yahoo finance does not have complete historical data for all companies they deliver quotes. I found a case where the data for the past month are missing.
http://ichart.finance.yahoo.com/table.csv?s=TKA.VI&a=09&b=21&c=2012&d=10&e=22&f=2012&g=d&ignore=.csv
In that case the download does not produce data, but a plain html page. Protoborsa in turn does not produce any error message, but just leaves the previous graphic displayed.
I guess some of the programs (maybe ystockquote.py) have to be extended to make provisions for such cases. (I am not experienced in python programming, so I do not know if it would be easy e.g. just to clear the stock graphics area whenever another ticker symbol is selected to make sure that no old data stay on screen.)

4. You can search only for company names, but not for ticker symbols.
Maybe a small change in personaldata.py - getAllStockSymbolsPattern(pattern) would solve that:
extend
 return selectAndFetchQuery("select Symbol, Naming from symbols where lnaming like '"+pattern+"%';" );
to
 return selectAndFetchQuery("select Symbol, Naming from symbols where (lnaming like '"+pattern+"%' or Symbol like '"+pattern.upper()+"%' );" );

5. When I click on About, and the close the About dialog, the whole program is closed.