How to Perform Rolling Regression in R

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • In this video we discuss how to estimate beta using rolling regression I..e to perform rolling regression in R. We have used two packages i.e. the broom package and the slider package. The broom package have a function called rollapply and the slider package have different functions but the one we used is slider_period.
    Download do and exercise file:
    payhip.com/b/x...
    Website: thedatahall.com
    As an Amazon Associate, I earn from qualifying purchases.

Комментарии • 5

  • @frankmeier7595
    @frankmeier7595 3 месяца назад +1

    can you share the complete code?

    • @thedatahall
      @thedatahall  3 месяца назад

      Thanks for identifying. I have added it in the description.

  • @stephenhilton2255
    @stephenhilton2255 3 месяца назад

    If you group_by the stock, would that prevent you from needing to run it in a loop? Or would these not recognize the grouping?

    • @frankmeier7595
      @frankmeier7595 2 месяца назад

      I am new in working with R, so you might correct me but I was not able to get it working by grouping for stocks. Maybe @The Data Hall can demonstrate how to use rolling regression on more then 1 company with multiple Facots like HML, SMB and Mkt-Rf on a month base.

    • @thedatahall
      @thedatahall  2 месяца назад

      @frankmeier7595 you can email me your data and code i will look into it