Stock market data

Hi everyone,

I would like to know if there is a way to import stock market data into a LibreOffice Calc sheet.
I would like the spreadsheet in question to look something like this (for starters):

  • Ticker
  • Company name
  • Country
  • Sector
  • Minimum value reached from 2000-01-01 to date
  • Maximum value reached from2000-01-01 to date
  • Maximum loss from 2000-01-01 to date

Is there an easy way to do this?
I have installed SMF Extension, but I seem to have realized that it does not go back in time (correct me if I’m wrong).
Thank you in advance!

See also: Stock market data (View topic) • Apache OpenOffice Community Forum (crossposting)

(Spoken aside)
There were people who told me stock market business or so-called trading wasn’t just a kind of gambling, but a serious way to earn money. If so, why should it be easy? Why should others do the needed research and adaption of found tools?
Nobody does my daughter’s labour just to make her life easier.

Regarding SMF Extension: Please read the answer to question https://ask.libreoffice.org/t/getyahoo-function-returns-forbidden/28816:

In short: Yahoo disabled the functionality due to violation of their terms & conditions.

@Lupp
Forgive me, but your answer is meaningless.
First point, I’m looking for a simple extension that helps me not to have to write thousands of data by hand on a spreadsheet, not an automated trading bot (and even if that were the case I don’t see what the problem would be).
Second, information technology has been helping any job in the world for decades; following your reasoning, nobody should use technology anymore, you shouldn’t use LibreOffice anymore, you shouldn’t use your PC anymore and you shouldn’t even use a calculator anymore.
Third point, I thought they were two different forums…

@anon73440385
Thank you so much for your answer! I had read about this problem: is there no other way? Without Yahoo I mean…

Look into JStock, It exports stock info and .csv or excel files. Just a word of caution. It is a lil flaky in how it runs. Will eats up cpu and memory on some systems. Mostly due to java it is written in.

http://jstock.org

@UfficioLibero: My comment wasn’t intended to be read as an answer. It was explicitly “spoken aside”. In addition not a word of my comment should be interpreted as a general dismissal of “information technology”. To the contrary I’m much interested in IT since I was 13 (63 years ago). I even didn’t mention my doubts concerning some specific developments I judge to be mistakes. The comment was about “stock market” and “traders”. You will, of course, know better what you actually do, and in what way it’s justified or probably even useful. I didn’t intend to comment on you, personally. It was the “flavor” of the question which poked me.
Sorry if you feel hurt.

@AdmFubar Thank you for your suggestion!
I took a look at JStock, but if I don’t get it wrong, it “just” comes up to 10 years ago of data. I misunderstood?

@Lupp Then I wish I could answer to your spoken aside like this: I don’t know if you’ve ever had to deal with large amounts of data to be entered by hand somewhere (a spreadsheet, in this case), but if so you will know very well how frustrating and unfair this process can be. My question was precisely what was the best way to avoid this in LibreOffice, since with other software this possibility exists, but they require programming skills that I don’t currently have (but I’m going to fix that too).

…if you’ve ever had to deal with large amounts of data to be entered by hand somewhere (a spreadsheet, in this case), but if so you will know very well how frustrating and unfair this process can be.

Yes. In my case it was (for a few years) mainly databases (3 different brands) designed by others, but mandatorily to be used by myself (and many others) without rights to add customized export and import tools (protection).
To interchange data between three of the bases I tinkered spreadsheets, and also wrote code in a general purpose language. It was very annoying.
But: You didn’t ask for this generally, but for stock market data without giving information about the source. From parts of the extended question I got the notice you wanted to find the data “in the web”.
Any provider of such data will need to do a lot to collect and to shape them. Without actually knowing, I would assume, you wouldn’t get good reliable data for free. Tell me if I’m wrong.

@Lupp You are not wrong. But let me explain: I didn’t mention the source simply because I don’t know how many and which sources interface with / support LibreOffice. Regarding the free usability of the data, I do not fully agree. Assuming that I have never said I want them for free (on the contrary…) I am convinced that there are sources that are widely provided that are accessible for free (Google Finance, Yahoo Finance, etc.). Sure, they won’t provide the highly professional tools that other paid businesses dedicated to professional investors provide, but I am not a professional investor.

@UfficioLibero

It may default to 10 years of data. You can adjust how far back you want to get data. This will pull information from the actual stock markets directly. you can get data from any market in the world. Not sure how far back you need to go, but you may have historical data in your own files to compensate.

Perhaps a local university can help out on data, there might be a library of data for you to use from them. Would be worth looking into.

@AdmFubar Thanks for your valuable advice, I’ll give JStock another chance then!!

Try the SMF fork if that still works. See its GoogleHistoricalQuoteExample.ods for usage.

Hi erAck,

Thank you for your answer!
Are you sure that the extension in question supports the features (specific data) I need?
Also, opening the example file, I see this: I don’t think it works for me, yet I seem to have installed that extension correctly…

No I’m not sure, that’s why I said try. Last time I used the extension was two years ago.

All those gratis public API offers are subject to change and if a consuming implementation isn’t maintained it tends to get outdated sooner or later.

I still won’t tell anything specific about “stock market data”.

If you actually want to go into the details, you may find a source of raw data, connect to that source, and do everything by your own means in your sheets.
You find a raw example in the attachment.

You may also study the spreadsheet functions WEBSERICE() and FILTERXML() and what you need to know about XPATH if you want to use FILTERXML.
Based on experiences from a case when I tried to help a Scottish user with it, I would dissuade from.

What erAck told isn’t onnly relevant for Extensions, but also for providers of raw data. Stability, long-term avaiability, sufficient maintenance and reliabilty … Not granted!

Time used to develop your own front-end: Expected to be wasted more or less.

My suggestion: Let it be. In specific stock market affairs I would expect to be extremely boring anyway.

ask286202dataFromTheWeb_1.ods

This was exactly what I meant by “there is a way”. Thanks a lot!! It is a bit complex, but I will dedicate myself to understanding how to take advantage of functions similar to the example you linked to me.