Hi all,
I've tried to do it myself using examples on the internet and watching videos, but my brains are a bit fried. I currently have the closing prices of 285 companies between 2004 and 2022. The dataset is generated by Datastream in a Wide/Long format? Currently my dataset is as follows
I want the dataset to become long that the 18 years are repeated, the ID of the company and it's closing prices. So I want 3 columns, 1st date, 2nd CompanyId and 3rd matching closing prices.
I've tried it myself but keep getting different errors.
Kind regards,
Stijn van den Berg
I've tried to do it myself using examples on the internet and watching videos, but my brains are a bit fried. I currently have the closing prices of 285 companies between 2004 and 2022. The dataset is generated by Datastream in a Wide/Long format? Currently my dataset is as follows
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str10 date str5 com_haab str6(com_habn com_hbowe) str7 com_hbesi "1-1-2004" "18,55" "NA" "9,39" "3,1301" "2-1-2004" "18,88" "NA" "9,4" "3,1161" "5-1-2004" "18,83" "NA" "9,5" "3,0835" "6-1-2004" "18,84" "NA" "9,51" "3,0509" "7-1-2004" "18,61" "NA" "9,54" "3,0369" "8-1-2004" "18,71" "NA" "9,58" "3,1906" "9-1-2004" "18,57" "NA" "9,71" "3,1534" "12-1-2004" "18,55" "NA" "9,6" "3,1673" "13-1-2004" "18,52" "NA" "9,49" "3,2279" "14-1-2004" "18,65" "NA" "9,49" "3,2372" "15-1-2004" "19,24" "NA" "9,48" "3,2139" "16-1-2004" "19,35" "NA" "9,51" "3,2419" "19-1-2004" "19,48" "NA" "9,42" "3,349" "20-1-2004" "19,45" "NA" "9,4" "3,3164" "21-1-2004" "19,63" "NA" "9,24" "3,2605" "22-1-2004" "19,79" "NA" "9,34" "3,1813" "23-1-2004" "19,58" "NA" "9,43" "3,2372" "26-1-2004" "19,39" "NA" "9,4" "3,2605" "27-1-2004" "19,6" "NA" "9,5" "3,2651" "28-1-2004" "19,7" "NA" "9,5" "3,2139" end
I've tried it myself but keep getting different errors.
Kind regards,
Stijn van den Berg

Comment