A private equity fund makes investments in companies.
I want to know which of these companies have had an acquisition, and in this way gauge the performance of a private equity fund. (the idea being that the private equity fund invests in a company and sells the company in an acquisition somewhere later in time for more money). As some investments can fail, not all companies invested have an acquisition.
The investments are in one file, the acquisitions in another. The problem however, is that companies can be acquired multiple times over their lifetime. In case of multiple acquisitions, the correct acquisition is the one after the investment date and closest in time to that investment date (“idate”). For example if the private equity fund invest in a company in 2000 and this company has acquisition dates (“edate”) of 1998, 2004 and 2005, the correct edate is 2004. If there are no edates after the idate (see example 2 and 3) I want to have the reverse, namely the closest edate in the past.
Other examples:
Example 1: the fund makes an investment in company in 2000, this company has one acquisition in 2001. The exit date is 2001
Example 2: the fund makes an investment in company in 2000, this company has an acquisition in 1999. Even though negative, I still want to report it in my output. The exit date is 1999.
Example 3: the fund makes an investment in company in 2000, the company has exit dates of 1976 and 1988. Even though negative, I still want to report it in my output. The exit date is 1988.
Example 4: the fund makes an investment in company in 2000, the company has exit dates of 1976, 1999 and 2010. I prefer any positive exit date to any negative exit date, so the exit date is 2010.
I thus have three files (see below):
1) Investment data inputs
2) Acquisition data inputs
3) My desired output from merging 1) with the closest future or past acquisition date in 2)
How would I go about this? Thank you in advance!
1) Investment INPUT
2) Acquisition INPUT
3) Desired OUTPUT
I want to know which of these companies have had an acquisition, and in this way gauge the performance of a private equity fund. (the idea being that the private equity fund invests in a company and sells the company in an acquisition somewhere later in time for more money). As some investments can fail, not all companies invested have an acquisition.
The investments are in one file, the acquisitions in another. The problem however, is that companies can be acquired multiple times over their lifetime. In case of multiple acquisitions, the correct acquisition is the one after the investment date and closest in time to that investment date (“idate”). For example if the private equity fund invest in a company in 2000 and this company has acquisition dates (“edate”) of 1998, 2004 and 2005, the correct edate is 2004. If there are no edates after the idate (see example 2 and 3) I want to have the reverse, namely the closest edate in the past.
Other examples:
Example 1: the fund makes an investment in company in 2000, this company has one acquisition in 2001. The exit date is 2001
Example 2: the fund makes an investment in company in 2000, this company has an acquisition in 1999. Even though negative, I still want to report it in my output. The exit date is 1999.
Example 3: the fund makes an investment in company in 2000, the company has exit dates of 1976 and 1988. Even though negative, I still want to report it in my output. The exit date is 1988.
Example 4: the fund makes an investment in company in 2000, the company has exit dates of 1976, 1999 and 2010. I prefer any positive exit date to any negative exit date, so the exit date is 2010.
I thus have three files (see below):
1) Investment data inputs
2) Acquisition data inputs
3) My desired output from merging 1) with the closest future or past acquisition date in 2)
How would I go about this? Thank you in advance!
1) Investment INPUT
Code:
clear* input str3(fund company) idate f1 c1 1999 f1 c2 2011 f1 c3 2011 f1 c4 2003 f2 c1 2011 f2 c2 2003 f2 c2 2006 end
2) Acquisition INPUT
Code:
clear* input str3(company) edate str3(extrainfo) c1 2000 101 c2 2005 102 c3 2010 103 c1 2001 104 c1 2002 105 c2 2006 106 c4 2006 107 end
3) Desired OUTPUT
Code:
clear* input str3(fund company) idate edate str3(extrainfo) f1 c1 1999 2000 101 f1 c2 2011 2006 106 f1 c3 2011 2010 103 f1 c4 2003 2006 107 f2 c1 2011 2002 105 f2 c2 2003 2005 102 f2 c2 2006 2006 106 f2 c9 2000 . . end
Comment