LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2020, 09:28 PM   #1
taymururus
LQ Newbie
 
Registered: Jun 2020
Posts: 4

Rep: Reputation: Disabled
how to extract data from finance.yahoo.co to LibreOffice


I'm trying to find a way to duplicate the 80's dow jones "spreadsheet link" for Libre Office. Can this be done with open source means?

Last edited by taymururus; 06-11-2020 at 09:29 PM. Reason: bad English
 
Old 06-11-2020, 11:01 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Your request is a bit mysterious. Which link do you mean (why don't you just copy it here?), and what do you mean by "duplicate"? LibreOffice is able to open spreadsheet in many formats; what is the format of the Yahoo spreadsheet?
 
Old 06-12-2020, 10:44 AM   #3
taymururus
LQ Newbie
 
Registered: Jun 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
downloading stock prices - Dow Jones Spreadsheet link (Lotus 123)

Back in the 80's I used to run Dow Jones Spreadsheet Link to automatically download stock prices to my Lotus spreadsheets. Since windows and Excel Dow Jones dropped support for Spreadsheet Link. I simply want to know if there means by which my spreadsheet data can be auto updated as the list is quite extensive.
 
Old 06-12-2020, 12:40 PM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
What format is the stock prices that you want to download? Is it html, xml, pdf, text, doc,? Can those be converted to a .doc, xls, odt, pdf? Yes.

Need a lot more info.
 
Old 06-12-2020, 03:49 PM   #5
taymururus
LQ Newbie
 
Registered: Jun 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
import stock prices to LibreOffice Calc

Thank you for you interest in this question. Formerly the info was put out by Yahoo as CSV and Lotus 123 or afterwards Excel would parse into their respective native formats. There is conflicting info. Some say it cannot be done since Verizon bought Yahoo. Others say yes you can but there is no specimen to use as a building block or Excel equivalent formula operators in Calc. Bit confusing. If it could be done in Lotus in 1984 and Excel as recently as 2018, what are the key formula phrases in Calc?

Is there a deficiency in Calc or is it simply a block imposed by Verizon?. There is an Ozzie site that says they can make it still work. There are blogs that say you can't. And a shortage of formula vocabulary in calc to mimic Excel formulas.
 
Old 06-13-2020, 09:52 AM   #6
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 20.3
Posts: 521

Rep: Reputation: 98
With KMyMoney you can download stock prices. This also points to the possible existence of a Linux package (independent of KMyMoney but incorporated into KMyMoney) for downloading stock prices. Below is a screenshot, that may be of use to you as a starting point. I would expect that a great deal of experimentation may still be necessary to get it to work with Calc. Good Luck.
-----------------------------------------------------------------------------
PS: Since posting, I saw that in Calc, under "sheet", there is an option "Link to External Data". That may offers some opportunities.

Look to this article for some guidance: Use Yahoo! Finance To Pull Stock Information Into Excel. This article notes that: "As of Q3 2017, the Yahoo! Finance capabilities in Excel have been disabled (by Yahoo!, aka Verizon).". The author offers a VBA Macro alternative as a means of downloading stock prices.

I don't know if this is getting too far removed from you question since Calc is not involved: A comprehensive guide to downloading stock prices in Python.
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	108
Size:	92.6 KB
ID:	33387  

Last edited by Steve R.; 06-13-2020 at 12:12 PM.
 
Old 06-13-2020, 12:30 PM   #7
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Rep: Reputation: Disabled
Quote:
Originally Posted by Steve R. View Post
The author offers a VBA Macro alternative as a means of downloading stock prices.
Interesting. I wonder if it is up to date and still works despite all the changes that Yahoo keeps making.

What language should it be re-written in to run under Linux please?

I would like to bulk-downloaded historical stock price data, especially those based in the UK. Although the last time I investigated there were one or two programs/scripts that could do this in Windows, it would be too fiendishly difficult and practically impossible for me to write something similar under Linux.

Sidenote - there is or was a website based in eastern europe that had available for downloading a very large zip file that was a big collection of historic stock price data. Unfortunately by the time I found out about it they had stopped making it available. Although that webpage was archived by archive dot org, only a small part of that file would download, broken. If anyone knows where this big file is currently available, it would be like finding the Holy Grail.

Thanks.
 
Old 06-13-2020, 01:34 PM   #8
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 20.3
Posts: 521

Rep: Reputation: 98
Quote:
Originally Posted by grumpyskeptic View Post
What language should it be re-written in to run under Linux please?
I hadn't thought about the VBA to Linux conversion implication. After a quick search, I found: XOJO The Modern Alternative to Visual Basic. I have no idea if it is "good" or "bad". Claims to be Linux compatible. Could be other similar packages too.

I also happened to have stumbled across a Python approach, which can be run under Linux. A comprehensive guide to downloading stock prices in Python. I have not yet taken the opportunity to see if the advice works.

Since attempting to use Python did not work-out, I took a look at using bash. There does appear to be a script available. Bash script for Yahoo Finance historical data. Works with new cookie-based authentication At this time it is not know if the script will work or not.

Since Python has not initially worked out. Taking a look at a Bash script for downloading stock data. Found one here: Bash script for Yahoo Finance historical data. Works with new cookie-based authentication . Again, it is not known, at this time, concerning whether the script works or not.

I started to experiment with the Python guidance from Eryk Lewinson. It did not go well. Evidently, the module pandas, on my computer, is only available for Python IDLE version 2.7. The other two modules failed to load using: pip install

Last edited by Steve R.; 06-13-2020 at 06:02 PM.
 
Old 06-13-2020, 06:08 PM   #9
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 20.3
Posts: 521

Rep: Reputation: 98
For some reason, could not edit my prior post to add the possibility of using bash to get stock price downloads since my attempt with Python seems to have failed. Here is a random bash script that may work-out. Bash script for Yahoo Finance historical data. Works with new cookie-based authentication. I retrospect, I've been working on developing my bash skills so this would be a good project.
------------------------------------------------------------------------
Update: 6/15/2020 - The bash script works, but I have not been able to decipher how it works or to modify it. Two minor points. You need to verify, before executing the program, that the stock market was open on that day. The date format is: 2020-06-10 (YYYY-MM-DD). Other date formats may also work, but I just used this one approach. (There are a lot of unnecessary spaces that that need to be deleted. They do show-up in Bluefish.)

Search for "CrumbStore" in various forms, did generate hits; but it appears from the responses of many that how the data is scraped from Yahoo finance has changed periodically. One sample post: Cannot scrape crumb from yahoo finance

Last edited by Steve R.; 06-15-2020 at 10:11 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract data from a file using bash then use part of that data to rename the input fi mfarch99 Linux - Newbie 11 09-05-2014 10:51 AM
UK Finance Directory,Online Finance Directory,UK Finance,Finance Directory in UK seekuk General 1 12-30-2005 04:04 AM
personal finance package dukeinlondon Linux - Software 1 01-06-2004 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration