+ "files": [{'name': 'main.py', 'content': '# region imports\nfrom AlgorithmImports import *\n# endregion\n\nclass PythonProject(QCAlgorithm):\n\n def initialize(self):\n # Locally Lean installs free sample data, to download more data please visit https://www.quantconnect.com/docs/v2/lean-cli/datasets/downloading-data\n self.set_start_date(2013, 10, 7) # Set Start Date\n self.set_end_date(2013, 10, 11) # Set End Date\n self.set_cash(100000) # Set Strategy Cash\n self.add_equity("SPY", Resolution.MINUTE)\n\n def on_data(self, data: Slice):\n """on_data event is the primary entry point for your algorithm. Each new data point will be pumped in here.\n Arguments:\n data: Slice object keyed by symbol containing the stock data\n """\n if not self.portfolio.invested:\n self.set_holdings("SPY", 1)\n self.debug("Purchased Stock")\n'}, {'name': 'research.ipynb', 'content': '{\n "cells": [\n {\n "cell_type": "markdown",\n "metadata": {},\n "source": [\n "\\n",\n "<hr>"\n ]\n },\n {\n "cell_type": "code",\n "execution_count": null,\n "metadata": {},\n "outputs": [],\n "source": [\n "# QuantBook Analysis Tool \\n",\n "# For more information see [https://www.quantconnect.com/docs/v2/our-platform/research/getting-started]\\n",\n "qb = QuantBook()\\n",\n "spy = qb.add_equity(\\"SPY\\")\\n",\n "# Locally Lean installs free sample data, to download more data please visit https://www.quantconnect.com/docs/v2/lean-cli/datasets/downloading-data \\n",\n "qb.set_start_date(2013, 10, 11)\\n",\n "history = qb.history(qb.securities.keys(), 360, Resolution.DAILY)\\n",\n "\\n",\n "# Indicator Analysis\\n",\n "bbdf = qb.indicator(BollingerBands(30, 2), spy.symbol, 360, Resolution.DAILY)\\n",\n "bbdf.drop(\'standarddeviation\', axis=1).plot()"\n ]\n }\n ],\n "metadata": {\n "kernelspec": {\n "display_name": "Python 3",\n "language": "python",\n "name": "python3"\n }\n },\n "nbformat": 4,\n "nbformat_minor": 2\n}\n'}],
0 commit comments