{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Trading Strategies - Real Data\n", "\n", "Now we run our trading strategies on real data. We use the 20 periods of real data time series of stock data, each with 100 observations, as we tested in the other notebook." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from MathFinanceWorkshop import MFW_Simulation\n", "import numpy as np\n", "Model = MFW_Simulation()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First lets see how our simple strategy, where\n", "$$\n", "T(S,W,B,\\Delta) = 1\n", "$$\n", "performs. Run the cells below to see the strategy plotted out and the statistics of how it performed. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Model.plotRealData()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Model.statsRealData()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Tasks\n", "\n", "1. Create some new cells and copy paste your new strategy from the other notebooks into this notebook. Can you test your strategies on the real data?" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.11.7" } }, "nbformat": 4, "nbformat_minor": 2 }