{
  "nbformat": 4,
  "nbformat_minor": 5,
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "pygments_lexer": "ipython3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# 05 EIA report day\n",
        "\n",
        "Is the absolute RWTC move larger on Wednesdays than on other published days, in both windows?\n",
        "\n",
        "Holdout starts 2020-01-01. Verdict: held.\n",
        "\n",
        "This study reads stored series. It does not add a derived column."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {},
      "source": [
        "import json\n",
        "from pathlib import Path\n",
        "studies = json.loads(Path('data/studies.json').read_text())\n",
        "study = next(item for item in studies['studies'] if item['slug'] == 'report-day')\n",
        "print(study['verdict'])\n",
        "print(study['verdict_line'])\n",
        "print(study['table']['caption'])\n",
        "for row in study['table']['rows']:\n",
        "    print(' | '.join(row))\n"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "held\n",
            "Train ratio of mean absolute Wednesday log return to other days is 1.059. Holdout ratio is 1.043. Both windows clear 1, which was the bar. The margin is small.\n",
            "Mean absolute adjacent RWTC log return\n",
            "Train | Wednesday | 1584 | 1.852%\n",
            "Train | Other published days | 6183 | 1.750%\n",
            "Holdout | Wednesday | 348 | 2.209%\n",
            "Holdout | Other published days | 1336 | 2.118%\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Method\n",
        "\n",
        "Compare the mean absolute log return on those Wednesdays with the mean absolute log return on every other published day.\n",
        "\n",
        "## Result\n",
        "\n",
        "Train ratio of mean absolute Wednesday log return to other days is 1.059. Holdout ratio is 1.043. Both windows clear 1, which was the bar. The margin is small."
      ]
    }
  ]
}
