Hi Everyone, I have following dataset: ISIN tar_event hcp event_month FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0.01924 -2 FI0009000012 11/09/1995 0.04888 -2 FI0009000012 11/09/1995 -0.00481 -2 FI0009000012 11/09/1995 0.11815 -2 FI0009000012 11/09/1995 0.00192 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 -0.0077 -2 FI0009000012 11/09/1995 -0.00202 -2 FI0009000012 11/09/1995 0.00231 -2 FI0009000012 11/09/1995 0.00385 -2 FI0009000012 11/09/1995 0.01462 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 0 -2 FI0009000012 11/09/1995 -0.00077 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 -0.01924 -1 FI0009000012 11/09/1995 -0.01943 -1 FI0009000012 11/09/1995 -0.00096 -1 FI0009000012 11/09/1995 -0.01732 -1 FI0009000012 11/09/1995 -0.02165 -1 FI0009000012 11/09/1995 -0.03646 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0.00135 -1 FI0009000012 11/09/1995 0.00173 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 -0.00192 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0 -1 FI0009000012 11/09/1995 0 -1 I would like to do the following: ISIN tar_event -1 -2 FI0009000012 11/09/1995 -0.00077 0 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 -0.01924 0 FI0009000012 11/09/1995 -0.01943 0.0192 FI0009000012 11/09/1995 -0.00096 0.0489 FI0009000012 11/09/1995 -0.01732 -0.005 FI0009000012 11/09/1995 -0.02165 0.1182 FI0009000012 11/09/1995 -0.03646 0.0019 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 0 -0.008 FI0009000012 11/09/1995 0.00135 -0.002 FI0009000012 11/09/1995 0.00173 0.0023 FI0009000012 11/09/1995 0 0.0039 FI0009000012 11/09/1995 0 0.0146 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 -0.00192 0 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 0 0 FI0009000012 11/09/1995 0 0 In my actual dataset I have many ISINs and 12 months data. Here, I have shown one ISIN and two months data only. -1, -2, .....-12 indicates lag month 1 to lag month 12. I have attached a sample dataset for your convenience. Thanks in advance for your help!
... View more