BookmarkSubscribeRSS Feed
MR_Xishuai
Calcite | Level 5

Hi all,

I want to get the stock information for my sample in order to calculate abnormal cumulative return(CAR). However, there are some companies having more than one permnos at the time of my event. I am very confused how to deal with this kind of situation? Is there any reasonable way that I could delete all the duplicates? Cheers.

1 REPLY 1
Reeza
Super User

You have to make some business decisions before making programming decisions?

I'm going to use ID instead of Permno to avoid autocorrect in the rest of my answer.

Why are there duplicate ID's?

Is there a duplicate record in terms of time or just name?

Are the company with the same name actually the same business entity?

If you want to delete a record and they're not identical other than ID's how do you decide which record(s) to delete?

For removing duplicates look into PROC SORT.

If you need help with the programming please post sample data with expected output.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 802 views
  • 0 likes
  • 2 in conversation