09-27-2017 01:18 AM
I have daily stock price data for 1000 firms. I need to form portfolios of firms that are connected to each other. For instance in my sample data attached, firm with Permno number 10001 is connected to firms with permno number 1002, 1009,10012,10019. I want to form a portfolio consisting of these four firms (1002, 1009,10012,10019) that are connected to firm 10001. How do i resolve this problem. Thanks in advance for the assitance. rgds ejaa.
09-27-2017 01:58 AM
How do you know the connection, do you have them in another file?
Otherwise you could create a group data set which contains group and firms and then join that data set with your details.
After that it is easy to summarize or whatever you want
length group firm $32;
input group firm;
create jointV as
select * from groups as a
left join details as b
on a.firm = b.permno
09-27-2017 04:13 AM
09-27-2017 10:13 PM
I have the connections among firms established using a set of rules hence me been able to indicate that firm 10001 in the attached sample is connected to four firms in the data. So for each firm, I have on all other firms connected to it and want to create a portfolio for the connected firms using daily prices which is proving difficult. Thanks.
10-16-2017 07:10 PM
I have the connections stored in another file. I want to read from the two data sets to create the groups/connected firms. any directions for me. thanks in advance.rgds