Python Forum
Hurst Exponent in Rolling Basis
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hurst Exponent in Rolling Basis
#2
I've tried using the function like this:

df.apply(lambda row: custom_hurst(df), axis=1)
Output:
1983-03-30 0.682463 1983-03-31 0.682463 1983-04-04 0.682463 1983-04-05 0.682463 1983-04-06 0.682463 2020-12-29 0.682463 2020-12-30 0.682463 2020-12-31 0.682463 2021-01-04 0.682463 2021-01-05 0.682463
but as you see, the function is inputting the same 365 rows of the df. How would I adjust the code so that it rolls with the dates instead of being static?
Reply


Messages In This Thread
Hurst Exponent in Rolling Basis - by illmattic - Jan-05-2021, 05:20 PM
RE: Hurst Exponent in Rolling Basis - by illmattic - Jan-06-2021, 09:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Rolling window and apply code JunkBoy 6 1,904 Jul-23-2022, 07:00 PM
Last Post: JunkBoy
  Calculating Beta over Rolling Periods illmattic 2 5,437 Sep-27-2020, 11:27 PM
Last Post: Larz60+
  Apply rolling window function over time dimension of 3D data Staph 0 2,205 Jan-01-2020, 08:31 AM
Last Post: Staph
  Grouping data based on rolling conditions kapilan15 0 1,973 Jun-05-2019, 01:07 PM
Last Post: kapilan15
  Pandas .rolling() with some calculations inside irmscher 5 6,245 Apr-04-2019, 11:55 AM
Last Post: scidam
  How to use pandas.rolling mean for 3D input array? Prv_Yadv 1 3,875 Mar-26-2019, 11:49 AM
Last Post: scidam
  Numpy Rolling mean window Thunberd 1 4,839 Jun-14-2018, 01:37 AM
Last Post: Larz60+
  Creating a matrix of rolling variances vvvcvvcv 1 2,780 May-26-2018, 12:51 PM
Last Post: killerrex
  Rolling sum for a window of 2 days (Pandas) klllmmm 1 10,353 Feb-02-2018, 03:24 PM
Last Post: klllmmm

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020