{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# Capstone Projects and Student Portfolio\n",
        "\n**Opening question:** How can a student transform code fragments into a defensible, reproducible analytical product for the Ceteris LAB website or a professional portfolio?\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "import pandas as pd\n",
        "\n",
        "results = pd.DataFrame({\n",
        "    \"model\": [\"naive\", \"ARIMA\", \"random_forest\"],\n",
        "    \"MAE\": [0.0124, 0.0118, 0.0121],\n",
        "    \"RMSE\": [0.0168, 0.0160, 0.0164],\n",
        "})\n",
        "results[\"MAE_rank\"] = results[\"MAE\"].rank(method=\"min\").astype(int)\n",
        "print(results.sort_values(\"MAE\"))\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "**Interpretation check:** Interpretation. The advanced model improves only modestly over the naive benchmark, so uncertainty and practical relevance should accompany the ranking.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "from pathlib import Path\n",
        "\n",
        "required = [\"README.md\", \"requirements.txt\", \"data\", \"notebooks\", \"scripts\", \"figures\"]\n",
        "root = Path.cwd()\n",
        "manifest = {item: (root/item).exists() for item in required}\n",
        "print(manifest)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "**Interpretation check:** Interpretation. A manifest is not proof of quality, but it catches missing package components before publication.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Verified source output\n",
        "\n",
        "```text\nmodel MAE RMSE MAE_rank 1 ARIMA 0.0118 0.0160 1 2 random_forest 0.0121 0.0164 2 0 naive 0.0124 0.0168 3\n```\n\n```text\n{'README.md': True, 'requirements.txt': True, 'data': True, 'notebooks': True, 'scripts': True, 'figures': True}\n```\n\n```text\nmodel     MAE    RMSE  MAE_rank\n1          ARIMA  0.0118  0.0160         1\n2  random_forest  0.0121  0.0164         2\n0          naive  0.0124  0.0168         3\n```\n\n```text\nimport pandas as pd\nresults = pd.DataFrame({\nresults[\"MAE_rank\"] = results[\"MAE\"].rank(method=\"min\").astype(int)\nprint(results.sort_values(\"MAE\"))\nfrom pathlib import Path\nroot = Path.cwd()\n```\n"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3"
    },
    "ceteris_lab": {
      "course_slug": "fundamentals-python-econometrics",
      "source_derived": true,
      "course_title": "Fundamentals of Python for Financial Econometrics",
      "chapter": 53,
      "source_origin": "source-derived"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}
