I am trying to create a new string variable of stock ticker that I can then use as a macro in my STATA analysis. Examples can be seen below.
The assumption should be that the information I want is before the ":" but after the final space " ". The exchange comes after the ":" and the stock can be and combination of 3 or 4 letters or numbers. I've tried to give a broad range of examples as follows: -
The assumption should be that the information I want is before the ":" but after the final space " ". The exchange comes after the ":" and the stock can be and combination of 3 or 4 letters or numbers. I've tried to give a broad range of examples as follows: -
Aaron's Inc AAN:NYQ ------> AAN | |
|
|
Ab Dynamics PLC ABDP:LSE ------> ABDP |
Adtec Plasma Technology Co Ltd 6668:TYO ------> 6668
|
Comment