+ Reply to Thread
Results 1 to 6 of 6

Convert Time Series OHLC Data Frequency

  1. #1
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Convert Time Series OHLC Data Frequency

    Hi, can someone please help me convert daily Open, High, Low, Close (OHLC) data to weekly and monthly.

    https://drive.google.com/open?id=1PD...N7V2ZTtb029t0N

    Open = Open value on the 1st day of the 5 day range
    High = Max High value for the 5 day range
    Low = Min Low value for the 5 day range
    Close = Close value on the 5th day of the 5 day range
    Volume = Sum of volume added each day for the 5 day range.

    The weekly data table can go to the right of the existing daily data table.

    Thank you.
    Last edited by prudential; 03-20-2018 at 08:07 PM.

  2. #2
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Convert Time Series OHLC Data Frequency

    I have create two helper columns. (Week & Month) in sheet1
    Refer sheet week & month.
    Using simple sumif formula you can do.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  3. #3
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Re: Convert Time Series OHLC Data Frequency

    Quote Originally Posted by avk View Post
    I have create two helper columns. (Week & Month) in sheet1
    Refer sheet week & month.
    Using simple sumif formula you can do.
    Hi avk,

    Thanks and looks good but the only column that is the sum is the volume column, the others are FIRST, MAX, MIN AND LAST values for the 5-day weekly range.

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

    Re: Convert Time Series OHLC Data Frequency

    Try the following formulas for the columns on the weekly sheet.
    For Opening: =INDEX(Sheet1!B$2:B$17,MATCH(AGGREGATE(15,6,(Sheet1!A$2:A$17)/(Sheet1!J$2:J$17=A2),1),Sheet1!A$2:A$17,0))
    For High: =AGGREGATE(14,6,(Sheet1!C$2:C$17)/(Sheet1!J$2:J$17=A2),1)
    For Low: =AGGREGATE(15,6,(Sheet1!D$2:D$17)/(Sheet1!J$2:J$17=A2),1)
    For Last: =INDEX(Sheet1!E$2:E$17,MATCH(AGGREGATE(14,6,(Sheet1!A$2:A$17)/(Sheet1!J$2:J$17=A2),1),Sheet1!A$2:A$17,0))
    The formulas for those columns on the monthly sheet is similar, only changing the reference to Sheet1!J$2:J$17=A2 so that it reads Sheet1!K$2:K$17=A2
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    02-25-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2013
    Posts
    3

    Re: Convert Time Series OHLC Data Frequency

    Hi there, I also followed the solution above for aggregating daily OHLC data into weekly which works great for data that is only within the same year. However, I'd like to aggregate daily data from the same week of the same year from data which contains multiple years.

    Any ideas?

    Thanks in advance!
    Last edited by krazi; 11-19-2020 at 11:31 PM.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Convert Time Series OHLC Data Frequency

    It is a 2-year thread from other OP. You can open a new thread with your own question (with a link to this thread, if needed)
    Quang PT

+ 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. Compile data by date/time and frequency
    By mr ray in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-07-2016, 07:13 AM
  2. [SOLVED] Weekly summary from daily OHLC data
    By macaonghus in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-08-2015, 03:59 PM
  3. Hi, I have hourly time series data and i need to convert it to 15 min time slots
    By neerajsharma887 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2014, 01:08 PM
  4. Replies: 4
    Last Post: 04-16-2014, 03:12 AM
  5. Synchronizing data series with different frequency
    By ref in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2012, 12:31 PM
  6. Replies: 0
    Last Post: 04-23-2012, 10:06 AM
  7. Putting data series on same time frequency
    By MLC in forum Excel General
    Replies: 2
    Last Post: 10-02-2008, 09:54 PM

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