{
  "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": [
        "# 06 Cushing\n",
        "\n",
        "Does a CUSHING build versus its own prior 52 weeks show up as a lower RWTC print on the nominal EIA Wednesday?\n",
        "\n",
        "Holdout starts 2020-01-01. Verdict: failed.\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'] == 'cushing')\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": [
            "failed\n",
            "Train correlation of surprise with the release-day RWTC log return is -0.064. Holdout correlation is 0.151. The holdout correlation is not negative. The bar was missed.\n",
            "CUSHING surprise versus RWTC release-day log return\n",
            "Train, release before 2020-01-01 | 630 | -0.064\n",
            "Holdout, release on or after 2020-01-01 | 348 | 0.151\n",
            "Skipped, no Wednesday RWTC print | 22 | \n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Method\n",
        "\n",
        "The EIA week ends Friday. The nominal release is the Wednesday five days later. The price is the log change from the last RWTC print before that Wednesday to the print on that Wednesday. If Wednesday has no print, the week is skipped. Thursday holiday releases are not moved.\n",
        "\n",
        "## Result\n",
        "\n",
        "Train correlation of surprise with the release-day RWTC log return is -0.064. Holdout correlation is 0.151. The holdout correlation is not negative. The bar was missed."
      ]
    }
  ]
}
