Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. need to convert daily data into weekly/monthly

need to convert daily data into weekly/monthly

Scheduled Pinned Locked Moved The Lounge
csharppythonjsonquestion
12 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Southmountain

    I played around some famous Web API to download stock data in O/H/L/C/V format. but the data is only daily and I need to convert daily data into weekly data. I searched on Internet and find something only in Python or R. there is no C# approach available and I try to post my question here.

    diligent hands rule....

    N Offline
    N Offline
    NeverJustHere
    wrote on last edited by
    #2

    Well, you've posted in the wrong place and you will not receive an answer here. Try Q&A

    1 Reply Last reply
    0
    • S Southmountain

      I played around some famous Web API to download stock data in O/H/L/C/V format. but the data is only daily and I need to convert daily data into weekly data. I searched on Internet and find something only in Python or R. there is no C# approach available and I try to post my question here.

      diligent hands rule....

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #3

      :cough: database :cough:

      1 Reply Last reply
      0
      • S Southmountain

        I played around some famous Web API to download stock data in O/H/L/C/V format. but the data is only daily and I need to convert daily data into weekly data. I searched on Internet and find something only in Python or R. there is no C# approach available and I try to post my question here.

        diligent hands rule....

        S Offline
        S Offline
        Super Lloyd
        wrote on last edited by
        #4

        I fail to understand the problem. just sum the value, no?

        A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

        S 1 Reply Last reply
        0
        • S Southmountain

          I played around some famous Web API to download stock data in O/H/L/C/V format. but the data is only daily and I need to convert daily data into weekly data. I searched on Internet and find something only in Python or R. there is no C# approach available and I try to post my question here.

          diligent hands rule....

          S Offline
          S Offline
          Slacker007
          wrote on last edited by
          #5

          a quick internet search, just now, produced many solutions, mostly on Stack Overflow. Why ask here, and in this forum? 1. you need to group daily data into weekly data, picking a date that starts the week. 2. you need to store this data into a database so that you achieve historical data, thus your API call should only grab new data, not old, aiding in performance. All of this can be achieved with database of choice and C#, unless you want to use something else.

          1 Reply Last reply
          0
          • S Super Lloyd

            I fail to understand the problem. just sum the value, no?

            A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

            S Offline
            S Offline
            Southmountain
            wrote on last edited by
            #6

            no. it is a little complicated than that...

            diligent hands rule....

            1 Reply Last reply
            0
            • S Southmountain

              I played around some famous Web API to download stock data in O/H/L/C/V format. but the data is only daily and I need to convert daily data into weekly data. I searched on Internet and find something only in Python or R. there is no C# approach available and I try to post my question here.

              diligent hands rule....

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #7

              Fortunately python is a readable language so unless what you're finding is a 1 liner that looks something like this:

              weeklydata = convertFromDailyToWeekly(dailyData)
              

              you should be able to port it to C# without too much trouble.:cool:

              Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

              S 1 Reply Last reply
              0
              • S Southmountain

                I played around some famous Web API to download stock data in O/H/L/C/V format. but the data is only daily and I need to convert daily data into weekly data. I searched on Internet and find something only in Python or R. there is no C# approach available and I try to post my question here.

                diligent hands rule....

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                Hard to convert to weekly / monthly when you have only one day's worth.

                "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                S 1 Reply Last reply
                0
                • D Dan Neely

                  Fortunately python is a readable language so unless what you're finding is a 1 liner that looks something like this:

                  weeklydata = convertFromDailyToWeekly(dailyData)
                  

                  you should be able to port it to C# without too much trouble.:cool:

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

                  S Offline
                  S Offline
                  Southmountain
                  wrote on last edited by
                  #9

                  thanks! this is why I try to post here to get something exciting.:rose:

                  diligent hands rule....

                  1 Reply Last reply
                  0
                  • L Lost User

                    Hard to convert to weekly / monthly when you have only one day's worth.

                    "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                    S Offline
                    S Offline
                    Southmountain
                    wrote on last edited by
                    #10

                    it is a time series and you download more than 5 year history of one symbol....

                    diligent hands rule....

                    D 1 Reply Last reply
                    0
                    • S Southmountain

                      it is a time series and you download more than 5 year history of one symbol....

                      diligent hands rule....

                      D Offline
                      D Offline
                      DRHuff
                      wrote on last edited by
                      #11

                      If only there were some simple way to iterate over a data series…

                      If you can't laugh at yourself - ask me and I will do it for you.

                      S 1 Reply Last reply
                      0
                      • D DRHuff

                        If only there were some simple way to iterate over a data series…

                        If you can't laugh at yourself - ask me and I will do it for you.

                        S Offline
                        S Offline
                        Southmountain
                        wrote on last edited by
                        #12

                        it is the case. I try to find it on the Internet before I roll over my sleeves...

                        diligent hands rule....

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups