Hi, everyone. I have more than 1,000 stock with 5 years price data. A very simple example as shown below. Basically, the date is the time line. The name of the 3 other variables represents the name of the stock.

I would like to reshape the data as time series format as shown below. Could anyone please help me out? Thank you very much in advance.

I would like to reshape the data as time series format as shown below. Could anyone please help me out? Thank you very much in advance.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str10 date str7 DS2653 str6 DX1122 str5 SD3435 "01.01.2014" "5" "1" "1" "02.01.2014" "6" "2" "2" "03.01.2014" "7" "4" "2" "06.01.2014" "4" "5" "3" "07.01.2014" "6" "4" "5" "08.01.2014" "3" "3" "3" "09.01.2014" "22" "2" "1" "10.01.2014" "2" "2" "3" "13.01.2014" "2" "4" "2" "14.01.2014" "22" "3" "3" "15.01.2014" "2" "4" "7" "16.01.2014" "3" "3" "5" "17.01.2014" "2" "2" "6" "20.01.2014" "1" "3" "10" end

Comment