Hi,
I'm working with bonds of many companies between 2010 and 2020 quarterly. Every bond is unique, and has an own ID named new ID. But every company has another ID, named ID. I want to create a panel data with just one observation or bond for every company that can complete the full period of 10 years For that, i have a variable named residual term (plazo residual in spanish). For example, in the first quarter on 2010, Q12020, a bond with a residual term of 10 or more is perfect and i want to keep it, but not all companies has that, so i have to complete them with bonds with less than 10 years, and when they finish, complete it with another. I don't have any clue how to do any of this on Stata, it will be very helpful for me any kind of help.