{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "another-behalf", "metadata": {}, "outputs": [], "source": [ "# Import most generic modules\n", "import importlib\n", "import pathlib\n", "import os\n", "import sys\n", "from datetime import datetime\n", "from IPython.display import display, Markdown\n", "import warnings\n", "warnings.filterwarnings('ignore')\n", "module_path = os.path.abspath(os.path.join('../..'))\n", "\n", "if module_path not in sys.path:\n", " sys.path.append(module_path)" ] }, { "cell_type": "code", "execution_count": null, "id": "racial-graduation", "metadata": { "tags": [ "parameters" ] }, "outputs": [], "source": [ "report_name=f\"{datetime.now().strftime('%Y%m%d_%H%M%S')}_econ_data\"" ] }, { "cell_type": "code", "execution_count": null, "id": "commercial-cargo", "metadata": {}, "outputs": [], "source": [ "display(Markdown(f\"# Economy Data - {datetime.now().strftime('%Y/%m/%d %H:%M:%S')}\"))" ] }, { "cell_type": "markdown", "id": "informative-behavior", "metadata": {}, "source": [ "## Dow Jones - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "stylish-elite", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^DJI\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "fifty-happiness", "metadata": {}, "source": [ "## Dow Jones - 1 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "identical-classification", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^DJI\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=360, low_trend=True)" ] }, { "cell_type": "markdown", "id": "boxed-turning", "metadata": {}, "source": [ "## S&P 500 - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "threaded-language", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^GSPC\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "fleet-transparency", "metadata": {}, "source": [ "## Market Volatility (VIX) - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "disturbed-workstation", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^VIX\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=False, time_delta=720, high_trend=False, low_trend=False)" ] }, { "cell_type": "markdown", "id": "civilian-november", "metadata": {}, "source": [ "## Market Volatility (VIX) - 1 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "several-inventory", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^VIX\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=False, time_delta=360, high_trend=False, low_trend=False)" ] }, { "cell_type": "markdown", "id": "bizarre-record", "metadata": {}, "source": [ "## Yield on 5-Year US Treasury Notes - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "military-temperature", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^FVX\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=False, time_delta=720, low_trend=False, high_trend=False)" ] }, { "cell_type": "markdown", "id": "greater-party", "metadata": {}, "source": [ "## Yield on 10-Year US Treasury Notes - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "aboriginal-violin", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^TNX\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=False, time_delta=720, low_trend=False, high_trend=False)" ] }, { "cell_type": "markdown", "id": "continent-sally", "metadata": {}, "source": [ "## Yield on 30-Year US Treasury Notes - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "formed-heating", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"^TYX\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=False, time_delta=720, low_trend=False, high_trend=False)" ] }, { "cell_type": "markdown", "id": "handled-insurance", "metadata": {}, "source": [ "## Gold - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "advisory-johnston", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"GLD\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720)" ] }, { "cell_type": "markdown", "id": "played-writer", "metadata": {}, "source": [ "## Silver - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "light-harvest", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"SLV\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "floral-giant", "metadata": {}, "source": [ "## Euro vs US Dollar - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "corrected-estimate", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"FXE\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=True)" ] }, { "cell_type": "markdown", "id": "neither-montana", "metadata": {}, "source": [ "## Yen vs US Dollar - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "middle-geneva", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"FXY\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=True)" ] }, { "cell_type": "markdown", "id": "theoretical-grammar", "metadata": {}, "source": [ "## Energy - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "swedish-thickness", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"XLE\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720)" ] }, { "cell_type": "markdown", "id": "gentle-humor", "metadata": {}, "source": [ "## Crude Oil - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "instructional-serve", "metadata": { "scrolled": false }, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"CL=F\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "classical-listening", "metadata": {}, "source": [ "## Real Estate - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "enclosed-administration", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"XLRE\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "turned-percentage", "metadata": {}, "source": [ "## Real Estate - 1 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "sharing-removal", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"VNQ\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=360, low_trend=True)" ] }, { "cell_type": "markdown", "id": "swedish-happiness", "metadata": {}, "source": [ "## Financials - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "beginning-aspect", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"XLF\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "restricted-glucose", "metadata": {}, "source": [ "## Financials - 1 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "personal-whole", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"XLF\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=360, low_trend=True)" ] }, { "cell_type": "markdown", "id": "detailed-strike", "metadata": {}, "source": [ "## Materials - 2 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "negative-mitchell", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"XLB\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=720, low_trend=False)" ] }, { "cell_type": "markdown", "id": "boolean-rotation", "metadata": {}, "source": [ "## Materials - 1 year trend with 20, 50 and 200 day SMA" ] }, { "cell_type": "code", "execution_count": null, "id": "settled-orange", "metadata": {}, "outputs": [], "source": [ "from gamestonk_terminal.economy import econ_data_helper\n", "\n", "econ_data_helper.draw_graph(\"XLB\", \"\", line_type=\"line\", draw_mas=(20,50,200), draw_volume=True, time_delta=360, low_trend=True)" ] }, { "cell_type": "code", "execution_count": null, "id": "premium-transportation", "metadata": {}, "outputs": [], "source": [ "!jupyter nbconvert {report_name + \".ipynb\"} --to html --no-input" ] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.6" } }, "nbformat": 4, "nbformat_minor": 5 }