I would like to analyze a large group of stocks. I want to know the end dates and the start dates for every company, then I can calculate the percent change of every company, and analyze them. When a company is first has data to the last day the stock has data. How do I go about doing this?
Like for example if Lehman brother's IPO was in 2002, and the delist date was sometime in 2008. What was the difference in price from where they started and where they ended? I will not have data for every IPO since it might have been actively trading before the start date.
This is how I got some weird number for days since IPO. I tried to adjust to seconds but it did not give the right number.
inputs = [morningstar.share_class_reference.ipo_date]
window_length = 1
def compute(self, today, assets, out, ipo_date): delta = ipo_date out[:] = delta