Announcement

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

  • Regressing into future periods

    Is there a way to regress my dependent variable up to 5 periods in the future? I am regressing FTSE 100 on my x variable, and I want to see how this relationship changes when I am accounting for returns on day t+1, t+2 up tp t+5, keeping my x variable the same.

  • #2
    I am not sure what you are asking for - but does https://www.stata.com/manuals/rpredict.pdf help at all?

    Comment


    • #3
      Thanks, Daniel, but I can't seem to find what I am looking for in that manual. I essentially want to regress y on x, then y(t+1) on x, y(t+2) on x and so on up to y(t+5), if that makes sense?

      Comment


      • #4
        A single observation does not make for a regression. Do you mean to rerun the regression with one more observation, then two more, etc? Maybe you are looking for https://www.stata.com/manuals/tsrolling.pdf (check out the recursive option) but I wonder why you don't start with just an -if- clause on the -reg- command for each additional regression. Maybe I still don't understand the question.

        Code:
        reg y x if t<100
        reg y x if t<101
        reg y x if t<102
        ...

        Comment


        • #5
          Click image for larger version

Name:	Screenshot 2023-01-05 at 15.25.00.png
Views:	1
Size:	508.6 KB
ID:	1696047

          This is from a paper in which they do what I am attempting to replicate. Hopefully, this helps so if it were a regression it would be y(t)= x +u(t), y(t+1) = x + u(t+1) etc

          Comment


          • #6
            See the lead (F.x) and lag (L.x) operators in Stata.

            Comment


            • #7
              If I want to have 5 forward lead variables for my dependent variable in my regression, does the code look something like this?
              Code:
              . regress FTSE100 F.FTSE100#1-F.FTSE100#5 UKIS

              Comment


              • #8
                For info on the F.x and L.x operators mentioned in #6:

                Code:
                help tsvarlist

                --
                Bruce Weaver
                Email: [email protected]
                Version: Stata/MP 18.5 (Windows)

                Comment

                Working...
                X