cmallwitz / Financials-Extension

Extension for LibreOffice Calc to access stock market data
Other
152 stars 21 forks source link

Number of shares #15

Closed casper43 closed 1 year ago

casper43 commented 3 years ago

Do you see a way to add number of outstanding shares?

dio-source commented 3 years ago

Are you asking for how many total shares a company has available?

casper43 commented 3 years ago

Yes. Basically what =GoogleFinance(Ticker, "shares") does in Googlespreadsheets.

dio-source commented 3 years ago

=IF("AAPL:NSQ"=0,"",GETREALTIME("AAPL:NSQ",27,"FT"))

casper43 commented 3 years ago

That would get the total market capitalisation (Number of shares x LAST_PRICE) I Could calculate them. But sometimes there are numbers missing.

dio-source commented 3 years ago

Share price x outstanding shares = market cap so... Market cap / share price = outstanding shates.

=IF("AAPL:NSQ"=0,"",GETREALTIME("AAPL:NSQ",27,"FT")) divided by share price

casper43 commented 3 years ago

Yes, I just did that. Thanks. There are some PE_RATIOS missing, for instance: =GETREALTIME("SIKA:SWX";"PE_RATIO";"FT"). Is there a workaround? I couldn't find EBIT-data.

cmallwitz commented 3 years ago

Excellent - new issue and I don't have to work the answer out - Thanks !:-)

Re: missing PE ration

Checking [https://markets.ft.com/data/equities/tearsheet/summary?s=SIKA:SWX], it seems it is missing on website too so unfortunately I can't do anything about it.

casper43 commented 3 years ago

@cmallwitz: Can you make a unique ticker symbol instead of your solution in the example (which demands an extra sheet)? I currently use the FT ticker which is a cell in my calc-sheet, but there are some PE Ratios missing with FT (as seen). And it would be great to have fall back on Yahoo or Google if that's the case.

cmallwitz commented 3 years ago

That is difficult: it would need some sort mapping/database between RIC / ticker / SEDOL / ISIN . This would have to be maintained somehow as it could be changing due to corporate actions like mergers, company renaming themselves etc.

I have got the same issue and do a vlookup in a separate sheet depending on source (yahoo/google/ft) using data I put together for the assets I use.

dio-source commented 3 years ago

@cmallwitz I just want to say thank you very much for this extension so i dont have to use google crap. Do you accept donations? I only have a few dollars but the least i can do is buy you a coffee.

cmallwitz commented 3 years ago

no donations required :-)

I needed something like it and because nothing else would quite work, I built it myself. As long as the extension is useful (and mostly works) for other people, I'm fine too.

dio-source commented 3 years ago

@cmallwitz Let me at least buy you a coffee. It's a really nice piece of software and helps me out a lot. I will also look into libreoffice extension programming to see if I can contribute.

casper43 commented 3 years ago

Since this morning I receive following error by accessing the FT codes: <Datacode.TIMESTAMP: 999> in Libre. What could it be?

I add on to these. It's great stuff you are putting together. Coldn't wrap my head around vlookup though.

cmallwitz commented 3 years ago

Re: "Datacode.TIMESTAMP: 999" - could be problem with the data on page - can you give us complete formula incl. symbol?

casper43 commented 3 years ago

=GETREALTIME("DHR:NYQ";"LAST_PRICE";Source) I think, because all figures are affected.

cmallwitz commented 3 years ago

seem to work for me - have you tried re-calculating CTRL-SHIFT-F9 ? if that doesn't fix it I would need to see the DHR files from the .financials-extension directory under your home directory.

casper43 commented 3 years ago

Refreshing didn't work out. ft-DHR:NYSE.zip

casper43 commented 3 years ago

Surprisingly closing the file and reopening it from nautilus helped.

casper43 commented 3 years ago

Hi, can you provide the number of outstanding shares with Financial Times trackers? I currently calculate this as seen above, but unfortunately that's a problem if you need these in formulas (circularity). And market cap is off, we need to calculate it on the fly instead of daily.

casper43 commented 3 years ago

Also: I get a faulty result with BRBY:LSE (FT) by dividing market_cap through last_price, it states 4 million shares then, but they have actually 404.84 Mio. :-)

cmallwitz commented 3 years ago

That last issues here looks like a problem with price quoted in GB pence and market cap in GB pounds.

casper43 commented 3 years ago

Any news on getting the current number of outstanding shares from somewhere? In order to calculate the real market cap on the fly.

cmallwitz commented 1 year ago

Closing this for now