Announcement

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

  • Regressing in different time periods

    For my dissertation, I am using words and their respective data I have pulled from Google trends to see which have the most significant effect on market returns, so I am using Fama French data to explore this.

    I have a set of words I want to regress on 'rmf', and then use this regression to spot the t-statistic and then average my observations on each day for each words, essentially putting their data together to form a single index. I have data from 2004-2022 and want to regress this every sixth months and gain my average observations for each day within the 6 months. I am using 6-month rolling regressions because different words will be searched more/less in different years.

    For the words I want to average, I want to use those that have a negative t-statistic in the time period, then use only these words to collate an average of their respective observations on that day.

    Is there a shortcut that will allow me to regress in different time periods, then put all this together so I have one variable, rather than 36 different variables for each 6 months in the period?

  • #2
    I did not quite understand what you want to do, but maybe -rolling- can be useful here.

    Comment


    • #3
      I want to regress my words on 'rmf' but do different regression for different time periods. E.g. regress varlist rmf in the period Jan 2004- Jun 2004, then the same for Jul 2004-Dec2004 and so on until 2022. Then for each word I want to use the egen function to average their observations across dates. This will give me many different variables, but then I want to merge these variables together, so it forms one which will be my index.

      Comment

      Working...
      X