Saturday, January 2, 2021

how to generate a new variable to describe "symbol"

Hi,

I have panel data (symbols, daily returns) with 97 symbols to describe ETFs, and all of them have no relation.

I want to use loop for the next step, but have no idea how to generate a new variable (e.g., "id"=1,2,3...) to replace symbols.

I am very grateful for your help!

all the best,

yanyu

No comments:

Post a Comment