+ Reply to Thread
Results 1 to 7 of 7

Calculate Recovery Time

  1. #1
    Registered User
    Join Date
    05-18-2021
    Location
    Switzerland
    MS-Off Ver
    365
    Posts
    8

    Calculate Recovery Time

    Hi everyone

    I want to calculate the Revovery Time after a Maximum Drawdown of an asset.
    I managed to calculate the Maximum Drawdown, however I do not know how to get the Recovery Time.
    Recovery Time = Date when Price >= Peak before Max. Drawdown.

    Attached you can find my Excel-File.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Calculate Recovery Time

    I am not sure what you want can you explain in words how you reach this result.

    Are you finding the time it takes the value to above the maximum attained before the low?
    so the maximum is
    =MAXIFS(B2:B28,A2:A28,"<"&G2) if this in in F5

    then as an array
    =MIN(IF((A2:A28>G2)*(B2:B28>F5)*(A2:A28),A2:A28,""))

    or combined
    =MIN(IF((A2:A28>G2)*(B2:B28>MAXIFS(B2:B28,A2:A28,"<"&G2))*(A2:A28),A2:A28,""))

  3. #3
    Registered User
    Join Date
    05-18-2021
    Location
    Switzerland
    MS-Off Ver
    365
    Posts
    8

    Re: Calculate Recovery Time

    I calculated the maximum Drawdown, which is the difference between the highest and the lowest price value in a period. This is the value is G1.
    The highest price value is the peak of 8906.90268, which can be calculated with this formula you gave me:
    =MAXIFS(B2:B28,A2:A28,"<"&G2)
    The lowest price value after this peak is in B26 on the 25.01.2020 (G2) which results in my calculated Max. Drawdown (max loss) in G1.

    Now in G3 I want to calculate on which date the price has for the first time after the loss (after B26) again reached a higher value than the peak (B19) before. In my example this would give me an output of 27.01.2020 because there the price is for the first time higher than 8906.90268 (peak). What I want is the formula to calcualte this in G3.

  4. #4
    Registered User
    Join Date
    05-18-2021
    Location
    Switzerland
    MS-Off Ver
    365
    Posts
    8

    Re: Calculate Recovery Time

    Quote Originally Posted by davsth View Post
    or combined
    =MIN(IF((A2:A28>G2)*(B2:B28>MAXIFS(B2:B28,A2:A28,"<"&G2))*(A2:A28),A2:A28,""))
    This seems to work I guess, but could you explain in words what the red parts do? I do not quite understand the synthax.

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Calculate Recovery Time

    Simple bit first the & just joins the bits together (concatenate)

    If you put John in a1 and Smith in a2 =a1&" "&a2 would give John Smith

    here to make the maxifs work you are say <g2, we are wanting to find the maximum value prior to the minimum that you have calculated, so it is the maximum value before the date of the minimum

    If you put a logic expresssion in excel it evalutes as true or false

    so dates greater than minimum produces a list of true and falses, as does values greater than the previous maximum, if you multiply them together and multiply them by the dates, this gives you a list of all the dates since the minimum where the value was above the previous maximum. You want the first time this happens which is the smallest date so a minimum

    it could be simplified to
    =MIN(IF((A2:A28>G2)*(B2:B28>MAXIFS(B2:B28,A2:A28,"<"&G2)),A2:A28,""))

  6. #6
    Registered User
    Join Date
    05-18-2021
    Location
    Switzerland
    MS-Off Ver
    365
    Posts
    8

    Re: Calculate Recovery Time

    Okay perfect thank you!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,558

    Re: Calculate Recovery Time

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula Underwater /Time to recovery Excel
    By MasDimash in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-09-2021, 01:54 AM
  2. Searching thresholds and recovery time
    By montecristo1989 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2017, 08:18 AM
  3. Max drawdown and recovery time - New Thread
    By anujamarathe in forum Excel General
    Replies: 3
    Last Post: 11-27-2012, 03:47 AM
  4. Replies: 1
    Last Post: 07-06-2012, 02:04 AM
  5. [SOLVED] Excel 2007 : Counting the recovery time of multiple drawdowns
    By spiros63 in forum Excel General
    Replies: 6
    Last Post: 07-04-2012, 09:21 AM
  6. [SOLVED] HELP: Max drawdown and recovery time
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 03-26-2012, 04:21 PM
  7. Replies: 3
    Last Post: 09-14-2005, 09:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1