Page 1 of 1

How to get stock basic informaton (e.g. total shares issued, total shares outstanding) to calculate turn over ratio?

Posted: Sun Sep 13, 2020 4:53 pm
by wrsmallcap
I want to develop a script to plot the stock turn over ratio, which is basically a calculation of volume / outstanding float. The problem is how to get the stock information of total number of shares outstanding in float?
In addition, are there built-in functions to get company basic information, e.g. total revenue, enterprise value, EPS?
Thanks in advance for help.

Re: How to get stock basic informaton (e.g. total shares issued, total shares outstanding) to calculate turn over ratio?

Posted: Thu Sep 17, 2020 5:40 am
by Matthew
Hi wrsmallcap!

I believe what you're trying to do is possible. You can get the financial info of a stock using the inbuilt Financial Function and passing it the relevant data IDs.

As for total shares issued vs outstanding, in the link above there is more info regarding how to do that but this snippet of code will get the data you want:

Code: Select all

TSO = financial(syminfo.tickerid, "TOTAL_SHARES_OUTSTANDING", "FQ")

Unfortunately I don't have time to help any further than that but there are some lessons in the Pine Script Mastery Course covering stock financials and the QUANDL function which you might find helpful if you can't work it out on your own.

Good luck with your project my friend :cool: let us know how you go!