Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Merging time series dataset with a static dataset

    I need to merge my timeseries dataset with data (six variables: Ask price, Bid price, Volume traded, Number of shares outstanding) on all companies in the S&P500 index and my static database containing data on the industry type of each company in the S&P500. The ISIN of each company is linked with the Industry types and the Datastream codes that specify the variable of a company (e.g. ask price (PA) of Apple (@AAPL = @AAPL(PA)).
    My timeseries dataset is set-up as follows: on the top row, you see the variable names: 'Date' and the company & variable codes for each company+variable e.g. @AAPL(PA).
    My static dataset is set-up as follows: on the top row, you see the variable names: Code, ISIN and Industry.
    I want to link the Code of the static dataset with the codes of the timeseries dataset, but as the codes in the timeseries dataset are the variable names, I'm not sure how merge these datasets as Stata wants to match two variables both named Code.
    Does anyone know how to solve this?

    Click image for larger version

Name:	TS SS.png
Views:	1
Size:	490.7 KB
ID:	1664095
    Click image for larger version

Name:	Static SS.png
Views:	1
Size:	766.7 KB
ID:	1664096
    Last edited by Fred Sev; 11 May 2022, 08:06.
Working...
X