+ Reply to Thread
Results 1 to 8 of 8

Turning Point for Data Series

  1. #1
    Registered User
    Join Date
    11-18-2019
    Location
    Cambridge, MN
    MS-Off Ver
    Office 365
    Posts
    4

    Turning Point for Data Series

    I am looking at identifing short-term and long-term turning points for a data series. For example, in the attached file, I would like to identify day 27 as a short-term low and a short-term high at day 34. Also, I would like to identify a long-term high at day 107 and a long-term low at day 150.

    I am looking for a formula I can put in column C that will identify these turning points.
    Attached Files Attached Files
    Last edited by turbo1618; 11-18-2019 at 05:11 PM. Reason: Additional information

  2. #2
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Bistrita, Romania
    MS-Off Ver
    2019; 365
    Posts
    231

    Re: Turning Point for Data Series

    I think this should be in the Excel Charting & Pivots sub-forum.

    Check the attached file for a possible solution.
    Attached Files Attached Files
    To show your appreciation
    Click ★ Add reputation!

  3. #3
    Registered User
    Join Date
    11-18-2019
    Location
    Cambridge, MN
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Turning Point for Data Series

    Hello Mrrr,

    Thank you for taking a look. I am looking for a math formula I can put into column C. I do know how to chart the information.

  4. #4
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Bistrita, Romania
    MS-Off Ver
    2019; 365
    Posts
    231

    Re: Turning Point for Data Series

    Well then please tell me where is the line between short and long term? At which day?

  5. #5
    Registered User
    Join Date
    11-18-2019
    Location
    Cambridge, MN
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Turning Point for Data Series

    I am trying to figure the best way to proceed mathematically. Visually, I see a long-term high on day 107 and long-term low on day 150.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Turning Point for Data Series

    So, the problem feels more like a signal processing problem then, and it might be beyond Excel in that it feels more like a generic "what kind of algorithm does anyone use in any programming language to detect peaks and troughs". Unfortunately, I don't know if we have any experts in signal processing here that can generate a robust algorithm on demand. I doubt that it will reduce to a single formula, as these kinds of algorithms can get fairly complicated.

    I am not an expert in signal processing, but I find that many signal processing problems -- especially peak/trough detection algorithms -- will start with some kind of "instantaneous rate of change" calculation. Peaks/Troughs are often detected in part by when the slope of the signal changes sign. Excel has a built in SLOPE() function (https://support.office.com/en-us/art...a-61d7e01276b9 ) that can be used for this purpose. A simple (probably too simple) algorithm for peak/trough detection might be to have a "moving" SLOPE() function (you would need to decide how wide the moving window should be) in column C, then analyze column C to look for changes in sign. You would then try different size windows on different signal data until you were confident that you had a good window size to correctly detect most of your real peaks and troughs.

    We are usually pretty good at Excel programming questions. If you will help us understand the algorithm you want to use, we can usually help you program that algorithm into the spreadsheet. However, we are often less able to develop an algorithm from scratch (in part because we cannot know everything you know about the goals, specifications, and requirements of the project.) If we are at the very beginning of the algorithm development process, I might suggest that you start with a basic slope and detect when the slope changes sign algorithm and see how that informs the next stages of development.

    Either that or I might begin searching for 3rd party preprogrammed signal processing apps and see if someone has already got a signal processing algorithm. Even if it costs a few dollars for a license, a preprogrammed solution that will work out of the box might be preferable to writing your own signal processing algorithm.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    11-18-2019
    Location
    Cambridge, MN
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Turning Point for Data Series

    Thank you, this is pointing me in the right direction. In column C I have a slope formula. In column D I have a high point formula and in column E I have a low point formula.

    =SLOPE(B2:B3,A2:A3)
    =IF(AND(C3>0,C4<0),B3,"")
    =IF(AND(C3<0,C4>0),B3,"")

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Turning Point for Data Series

    Do you feel like that combination is enough to catch the points you want to catch? It appears to me that it catches the 8 points you have highlighted in yellow (maybe a little earlier or later than the yellow cell), but it also catches a lot of other highs and lows. I tried a 5 point window (=SLOPE(B2:B6, A2:A6)) and it caught fewer spurious peaks/troughs, but still caught the 8 highlighted. When I tried a 9 window slope (=SLOPE(B2:B10,A2:A10)) It still caught a lot of spurious points, but failed to catch a couple of the yellow points.

    Anyway, if the 2 point window you tried is adequate, then good. You might try other windows and see if you like them any better. As I noted, there may also be other things that need to be looked at to get an algorithm that will catch fewer spurious points while still catching the points you want.

+ 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. series data point not matching up with gridline on axis
    By ldurham in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 09-06-2013, 06:16 AM
  2. [SOLVED] The number of a data point in a series
    By dindea in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 10-23-2012, 10:07 AM
  3. Error Bars by Data Point instead of Series
    By riwiseuse in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 12-06-2010, 05:40 PM
  4. Display the last point's data label in series with VBA
    By cesna123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2010, 11:13 AM
  5. Return series point data value
    By mchristisen in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-30-2009, 08:24 AM
  6. Finding a break even point in a series of data...
    By brazilnut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-01-2008, 09:55 PM
  7. Single Data Point on a new Series
    By bocjoel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-15-2005, 12:35 PM
  8. How do I set different error bars per data point in a series
    By Trebor1 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-03-2005, 09:05 AM

Tags for this Thread

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