+ Reply to Thread
Results 1 to 8 of 8

Calculation of frequency of price change

  1. #1
    Registered User
    Join Date
    02-19-2021
    Location
    Bergen, Norway
    MS-Off Ver
    Microsoft 365
    Posts
    16

    Calculation of frequency of price change

    Hi,

    I've got a dataset with information of prices with corresponding date and time (down to seconds) for each observation.
    I would like to be able to calculate the frequency of price changes, more specifically, how often a price changes from
    the previous price within a day, within a specific "interval". I'm not sure how to do this in the most efficient manner,
    which would be ideal given the size of the dataset.
    An example of wanted outcome is provided. The Interval in the sample is for each hour.
    Any help would highly appreciated

    Best regards,
    Excelnick96
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Calculation of frequency of price change

    Split the time into 2 columns and then use the formula:

    =MAX(0,COUNTIFS($B$2:$B$16,E2,$C$2:$C$16,">="&F2,$C$2:$C$16,"<="&G2)-1)
    Attached Files Attached Files

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Calculation of frequency of price change

    Please try

    =LET(a,$A$2:$C$20,c,INDEX(a,,3),d,E2,t,F2,f,FILTER(INDEX(a,,1),(INDEX(a,,2)=d)*(c>=--LEFT(t,5))*(c<=--RIGHT(t,5))),COUNT(1/MMULT(INDEX(f,SEQUENCE(ROWS(f)-1)+{0,1}),{1;-1})))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-19-2021
    Location
    Bergen, Norway
    MS-Off Ver
    Microsoft 365
    Posts
    16

    Re: Calculation of frequency of price change

    thanks for the help! Unfortunately, the formula didn't count for changes the exact way i wanted..
    but anyways, thank you!

  5. #5
    Registered User
    Join Date
    02-19-2021
    Location
    Bergen, Norway
    MS-Off Ver
    Microsoft 365
    Posts
    16

    Re: Calculation of frequency of price change

    Thank you very much, that works well!

  6. #6
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Calculation of frequency of price change

    Good day, is there any option of this formula for Excel 2013/2016 as well?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Calculation of frequency of price change

    Administrative Note:

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

    If you feel that this thread has significance to then post a link to it in your new thread.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Calculation of frequency of price change

    Good day, I already have the formula that is suitable for earlier versions.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. DURATION, YIELD, PRICE for monthly frequency (12)
    By jcc3508 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-19-2021, 04:30 PM
  2. Average sales before price change & after price change
    By michts in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2021, 10:32 AM
  3. Replies: 3
    Last Post: 10-10-2020, 01:14 AM
  4. Replies: 2
    Last Post: 06-15-2015, 01:48 AM
  5. [SOLVED] Excel 2013 wants to calculate Sales Price , If cost price exits and wants change SP
    By Bitto in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2015, 12:49 PM
  6. [SOLVED] Compare 1 price against multiple prices and change the price according to a formula
    By CharlieAziz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-16-2012, 11:05 AM
  7. Price Function and Frequency
    By forda in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-12-2008, 11:54 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