Skip to content

mathieugouin/tradesim

Repository files navigation

Trading Simulator

Python Build codecov CodeFactor Security Rating Code Smells Last Commit License: GPL v3

Overview

My ramblings on various stock analysis and data mining.

Prerequisites

Quick Start

  • If required, edit the stock list files in stock_db/*.txt.
  • Run (and possibly edit) download_historical_data.sh to download the historical stock data locally from the stock list files.
  • Run and play with tradesim.py

IPython / Notebook

Setup

  • python3 -m pip install --upgrade pip
  • python3 -m pip install ipython
  • python3 -m pip install jupyter
  • python3 -m pip install jupyterlab
  • Make sure ~/.local/bin/ is in the path

IPython Run

  • cd to the current dir where to start
  • ipython

Classic Jupyter Notebook Run

  • cd to the current dir where to start
  • jupyter notebook
  • Or to directly open a notebook: jupyter notebook tradesim_notebook.ipynb

Jupyter Lab Notebook Run

Jupyter lab has a nicer interface.

  • cd to the current dir where to start
  • jupyter lab

Magic command

Ref: https://ipython.readthedocs.io/en/stable/interactive/magics.html

  • %whos: Print all interactive variables

Shortcuts

  • dd: delete cell
  • a: insert cell above
  • b: insert cell below
  • m: convert cell to markdown (for documentation)
  • y: convert cell to code (python)
  • Ctrl+Enter: run current cell
  • Shift+Enter: run & select cell below
  • Alt+Enter: run cell & insert below

Notes

About

Trading simulator for backtesting of strategy

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published