madsailor / smf-extension Goto Github PK
View Code? Open in Web Editor NEWLibreOffice extension for retrieving stock market data
License: GNU Lesser General Public License v3.0
LibreOffice extension for retrieving stock market data
License: GNU Lesser General Public License v3.0
I have a stock screener that uses the beta field. Can that be added to the list of datacodes?
(First, I love this extension after just installing it an hour ago. GETYAHOO is the best. You are the reason I switched to Libre Office!)
I was trying out your sample .ODS files. The GETMORNINGFIN functions works well for code 1 (TTM), but codes 2 - 6 (and 8 - 12, etc.) are pulling quarterly numbers instead of annual numbers. So, I am getting the same results with code 2 with function GETMORNINGFIN as I get with GETMORNINGQFIN. However, GETMORNINGKEY appears to still be returning annual numbers.
(I apologize to everyone if anything about this is poorly/improperly phrased or used. I made this account just to post this comment, but I don't really understand GitHub.)
First thanks for the working extension
some people ask here how to get xetra numbers which is quite easy e.g. =GETYAHOO("gfj.de";21) -> .de does the trick
the extension has the bug that the locale setting is somewhat hardcoded like 15.50 which does not work for a german setting/calc I saw some weird VALUE SUBST function to fix that but my way looks more elegant e.g. =GETYAHOO("gfj.de";21)*1000/1000 which seems to fix that extension bug
Not so much an issue, more a suggestion. You might want to promote the fact that the GetYahoo function can also be used to get currency exchange rates as it is, without change.
Just change ticker to something like "GBPUSD=X" or "AUDJPY=X" with Datacode of something like 5.
e.g. GETYAHOO(A1,Datacode) where A1 = "USDEUR=X"
Dividend Yield 1 N/A
Dividend per Share 2 N/A
Dividend Pay Date 3 N/A
Ex-Dividend Date 4 N/A
Previous Close 5 0.9069
Open 6 0.9069
Change 7 -0.0083
Last Trade Date 8 8/19/2015
Change & Percent Change 9 -0.0083 - -0.9166%
Last Trade Time 10 8:27pm
etc.
Incidentally - thanks for SMF. I've just recently abandoned Windows & started using Ubuntu.
Had my first foray into python by adding GetYahooHistorical to your extension. It works, though being my first probably a bit ropey.
this ISIN symbol returns NA: LU0383783841
I suppose it has to do with the fact that it is listed on a European exchange. If so, are there any plans to support those? Thanks
Hi Madsailor,
I'm using your SMF extension to pull stock quotes into my Libreoffice spreadsheet.
I'm using Libreoffice 4.4.3.2 and I the formula I'm using is
=VALUE(GETYAHOO(B4,21))
B4 contains the ticker symbol for the stock, in this case SWKS.
The formula gets the right value once, but if I load the spreadsheet next day and try to update the values, hoping to see the new closing prices, nothing happens. I tried updating links with Edit -> Links... (Update Links), but the formula above doesn't seem to be considered a link and doesn't show up in the list.
Any idea how I can get the cells with this formula to update and fetch the new value?
Thanks!
Robert
Hi just letting you know about the above.
Also dates imported from yahoo cannot be changed from mmddyyyy.
Hi guys,
I've followed this thread here https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=74768 however villeroys formula doesnt solve the issue: =VALUE(SUBSTITUTE(GETYAHOO(A1;B1);".";MID(PI();2;1)).
Using 4.4.3.2 LO.
As above.
get a file location error when I try to load the extention
What are the chances of someone integrating IEX.
apparently its free and has loads of info.
My biggest problem is getting dividend info. The current integrated providers only offer yield, or in the case on intrinio a daily limit i frequently exceed.
Your extension works great for Yahoo, Morningstar Key Ratios, and Financial Income Statement. Thank you!
I need to access the Morningstar Cash Flow & Balance Sheet reports in the Financial section, so I would like to request additional functions to access these two reports.
Thanks,
Rickey
Freezes LibreOffice Calc 100% of the time. Uninstalling!
Can the Exchange be made an optional argument? Ie. So if it is not provided, you can still run the user friendly exchange lookup function but if it is provided you can skip this step.
This will open up support for exchanges such as the London Stock Exchange where we can easily find the morning star exchange name online and add it to our spreadsheets.
Up to today, the Yahoo formula give back a "Request denied" message as cell value/result.
Since Yahoo as granting "realtime" data (delay is 20mins), Yahoo financial data are much more useful than Morningstar ones (updated until the closing of the day before)
Any suggestions?
Thanks
J
Hi Madsailor, I just downloaded and installed SMF. I initially had an error in the extension manager but a google search brought the libreoffice-pyuno package to my attention. After installing it the install appears to have worked.
I next opened the yahooexamples.ods. It shows #VALUE! for every formula. Same for both Morningstar sample spreadsheets.
I've tried the extension on LibreOffice 4.1.6.2 on Fedora 19 and on OpenOffice 4.1.0 on Red Hat 6.5. Same results on both.
Any help troubleshooting would be appreciated.
First of all you did a great job with smf but is it possible to add XETRA to Morningstar?
cheers
I have Windows 7 64 bit + LibreOffice 4.4.1 and LibreOffice 4.3.6 installed. I tried both v6.4 and v6.3 of the sfm extension with both the Libreoffice version. In none of the case I was able to make the example Morningstar files. Yahoo works for all versions and I am able to update the data but all I see is NMS or NYQ in the data column
Using the GETYAHOO function, I get N/A when I enter a Canadian stock, such as GETYAHOO("MG.TO",7). I tried using an underscore, still does not work.
Is this a bug or a future feature?
Works well for US stocks though..
Regards
Your SMF extension works great for Yahoo, Morningstar Key Ratios, and Financial Income Statement. Thank your for creating this extension!
I have a need to access the data in the Morningstar Balance Sheet and Cash Flow sections of the Financial section, so I would like to request 2 additional functions within your extension to access this information. I believe these reports are available by using the "bs" and "cf" report codes similar to the "is" code for the Income Statement.
Thanks for this great extension!
Rickey
Hey everyone,
Just 2 days ago, SMF started returning the following error in the =GETYAHOO(A4,9) framework : unknown url type: https
Did yahoo change their data structure?
How can we get this working again?
Thanks.
DM
WEB datasource URL has changed.
Was url = 'http://finance.yahoo.com/d/quotes.csv?s=%s&f=%s' % (ticker, stat)
Now url = 'http://download.finance.yahoo.com/d/quotes.csv?s=%s&f=%s' % (ticker, stat)
Noticed extension stopped working today, locally made the change above to the source and compiled. Appears to be working again. I'd submit changes but I barely figured out how to get it working.
Please verify, I might be in error, yet it's currently working.
Thank-you for writing the extension.
Did make attempt to update code, did a fork, again have no idea if that is correct procedure or not.
When I try to install it under Ubuntu 12.04 64 bit and
LibreOffice Version: 5.0.5.2
Build ID: 1:5.0.5rc2-0ubuntu1precise1
Locale: en-US (en_US.UTF-8)
I get:
(com.sun.star.uno.RuntimeException) { { Message = "<type 'exceptions.ImportError'>: No module named request (or 'urllib.request.Request' is unknown), traceback follows\X000a /usr/lib/python2.7/dist-packages/uno.py:338 in function uno_import() [raise uno_import_exc]\X000a /home/userid/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu20365me16r1.tmp/SMF.oxt/yahoo.py:17 in function () [from urllib.request import Request, urlopen]\X000a /usr/lib/python2.7/dist-packages/uno.py:268 in function _uno_import() [return _g_delegatee( name, _optargs, *kwargs )]\X000a /home/userid/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu20365me16r1.tmp/SMF.oxt/smf.py:23 in function () [import yahoo]\X000a /usr/lib/libreoffice/program/pythonloader.py:103 in function getModuleFromUrl() [exec(codeobject, mod.dict)]\X000a /usr/lib/libreoffice/program/pythonloader.py:149 in function writeRegistryInfo() [mod = self.getModuleFromUrl( locationUrl )]\X000a\X000a", Context = (com.sun.star.uno.XInterface) @0 } }
If I try to "Enable" it, I get:
<type 'exceptions.ImportError'>: No module named request (or 'urllib.request.Request' is unknown), traceback follows
/usr/lib/python2.7/dist-packages/uno.py:338 in function uno_import() [raise uno_import_exc]
/home/userid/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu20365me16r1.tmp/SMF.oxt/yahoo.py:17 in function () [from urllib.request import Request, urlopen]
/usr/lib/python2.7/dist-packages/uno.py:268 in function _uno_import() [return _g_delegatee( name, _optargs, *kwargs )]
/home/userid/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu20365me16r1.tmp/SMF.oxt/smf.py:23 in function () [import yahoo]
/usr/lib/libreoffice/program/pythonloader.py:103 in function getModuleFromUrl() [exec(codeobject, mod.dict)]
/usr/lib/libreoffice/program/pythonloader.py:149 in function writeRegistryInfo() [mod = self.getModuleFromUrl( locationUrl )]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.