{
  "id": 285474,
  "title": "Calculation rolling average over time part...",
  "url": "/competitions/g-research-crypto-forecasting/discussion/285474",
  "author_name": "",
  "post_date": "2021-11-04T21:30:37.345495400Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Please explain in mode details how the rolling average over time is calculated. Unfortunately I have forgot math specification. My guess is the following:</p>\n<p>s = 0<br>\nM2 = 0<br>\nfor i = 0 to i &lt; 3750:<br>\n    s += M(i)*Ra(i)</p>\n<pre><code>M2 += M(i)*M(i)\n</code></pre>\n<p>BETAa = s/M2</p>\n<p>where i is timestamp index</p>\n<p>Is it correct? But than it can be simplified to :<br>\nBETAa = 0<br>\nfor i = 0 to i &lt; 3750:<br>\n    s += Ra(i)/M(i)</p>",
  "messages": [
    {
      "id": "1571421",
      "postDate": "11/04/2021 21:30:37",
      "content": "<p>Please explain in mode details how the rolling average over time is calculated. Unfortunately I have forgot math specification. My guess is the following:</p>\n<p>s = 0<br>\nM2 = 0<br>\nfor i = 0 to i &lt; 3750:<br>\n    s += M(i)*Ra(i)</p>\n<pre><code>M2 += M(i)*M(i)\n</code></pre>\n<p>BETAa = s/M2</p>\n<p>where i is timestamp index</p>\n<p>Is it correct? But than it can be simplified to :<br>\nBETAa = 0<br>\nfor i = 0 to i &lt; 3750:<br>\n    s += Ra(i)/M(i)</p>",
      "rawMarkdown": "Please explain in mode details how the rolling average over time is calculated. Unfortunately I have forgot math specification. My guess is the following:\n\ns = 0\nM2 = 0\nfor i = 0 to i < 3750:\n    s += M(i)*Ra(i)\n\n    M2 += M(i)*M(i)\n\nBETAa = s/M2\n\nwhere i is timestamp index\n\nIs it correct? But than it can be simplified to :\nBETAa = 0\nfor i = 0 to i < 3750:\n    s += Ra(i)/M(i)",
      "votes": null
    },
    {
      "id": "1571782",
      "postDate": "11/05/2021 06:47:02",
      "content": "<p>Rolling average is dependent on the amount of time gap provided. For example, with a data ranging from 0 to 100 seconds with a time gap of 5 seconds, you will get the average of all data that is included in that 5 seconds window. In short, you will get 20 rolling averages with a 5 seconds gap.</p>\n<p>In code, for example:</p>\n<p>data = [1, 2, 3… 100]<br>\nmov_avg = []<br>\ngap = 5<br>\nfor i in range(0, 100, gap):<br>\n    mov_avg.append( sum(data[i:i+gap]) /gap)</p>",
      "rawMarkdown": "Rolling average is dependent on the amount of time gap provided. For example, with a data ranging from 0 to 100 seconds with a time gap of 5 seconds, you will get the average of all data that is included in that 5 seconds window. In short, you will get 20 rolling averages with a 5 seconds gap.\n\nIn code, for example:\n\ndata = [1, 2, 3... 100]\nmov_avg = []\ngap = 5\nfor i in range(0, 100, gap):\n    mov_avg.append( sum(data[i:i+gap]) /gap)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1571782,
      "author_name": "seraphwedd18",
      "author_url": "",
      "post_date": "11/05/2021 06:47:02",
      "content": "<p>Rolling average is dependent on the amount of time gap provided. For example, with a data ranging from 0 to 100 seconds with a time gap of 5 seconds, you will get the average of all data that is included in that 5 seconds window. In short, you will get 20 rolling averages with a 5 seconds gap.</p>\n<p>In code, for example:</p>\n<p>data = [1, 2, 3… 100]<br>\nmov_avg = []<br>\ngap = 5<br>\nfor i in range(0, 100, gap):<br>\n    mov_avg.append( sum(data[i:i+gap]) /gap)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1571421": "Please explain in mode details how the rolling average over time is calculated. Unfortunately I have forgot math specification. My guess is the following:\n\ns = 0\nM2 = 0\nfor i = 0 to i < 3750:\n    s += M(i)*Ra(i)\n\n    M2 += M(i)*M(i)\n\nBETAa = s/M2\n\nwhere i is timestamp index\n\nIs it correct? But than it can be simplified to :\nBETAa = 0\nfor i = 0 to i < 3750:\n    s += Ra(i)/M(i)",
    "1571782": "Rolling average is dependent on the amount of time gap provided. For example, with a data ranging from 0 to 100 seconds with a time gap of 5 seconds, you will get the average of all data that is included in that 5 seconds window. In short, you will get 20 rolling averages with a 5 seconds gap.\n\nIn code, for example:\n\ndata = [1, 2, 3... 100]\nmov_avg = []\ngap = 5\nfor i in range(0, 100, gap):\n    mov_avg.append( sum(data[i:i+gap]) /gap)"
  },
  "source": "meta"
}