ML4T Software Installation
Contents
Overview
Use the following instructions to set up a development environment on your local machine. It should include:
- The proper version of Python (namely 2.7)
- Installation of necessary libraries (e.g. NumPy, Pandas, etc.)
- Installation of historical stock data.
Important note: We use a specific, static dataset for this course, which we will provide. If you download your own data from Yahoo (or elsewhere), you will get wrong answers on assignments.
Required software
Install Python 2.7 (NOT Python 3) and the necessary libraries as instructed below for your favorite platform.
Linux
- Install Python 2.7 [link]
- Install pip (in case your Python doesn't come with it) [link]
- Install virtualenv, virtualenvwrapper (highly recommended) [link]
- Create a virtual environment to use for this course:
$ mkvirtualenv ml4t $ workon ml4t
- And then pip install the following within it.
- NumPy 1.9+, SciPy 0.14+, Pandas 0.16+ [link]
Mac OS X
- Install Python 2.7 via Homebrew
- If you don't have it already, first get Homebrew
- Then: brew install python
- Install virtualenv, virtualenvwrapper (highly recommended) [link]
- Create a virtual environment to use for this course:
$ mkvirtualenv ml4t $ workon ml4t
- And then pip install the following within it.
- NumPy 1.9+, SciPy 0.14+, Pandas 0.16+ [link]
Windows
- Install Python 2.7 [link]
- Install pip (in case your Python doesn't come with it) [link]
- Install virtualenv, virtualenvwrapper (highly recommended) [link]
- Create a virtual environment to use for this course:
C:\Users\Monty> mkvirtualenv ml4t C:\Users\Monty> workon ml4t
- And then pip install the following within it.
- NumPy 1.9+, SciPy 0.14+, Pandas 0.16+ [link]
Optional software
Data
- Download: ml4t.zip
Note: If you downloaded this prior to Aug 21, 2015, please download again. Some missing files have been included and minor issues fixed. - Unzip it. That should create a ml4t/ directory with the following contents:
ml4t ├── data │ ├── $DJI.csv │ ├── $SPX.csv │ ├── $VIX.csv │ ├── A.csv │ ├── AA.csv │ ├── AAPL.csv │ ├── ... │ ├── YHOO.csv │ ├── YUM.csv │ ├── ZION.csv │ └── ZMH.csv └── validate_env.py
Whenever you need to work on assignments for this class, run your program from within ml4t/ so that you can access data/*.csv using a relative path.
Test installation
Test your environment by running the script validate_env.py from the ml4t/ directory:
python validate_env.py
If it complains, or if any of the installed library versions are older than the desired versions, fix the problems, and then repeat.
A clean output from validate_env.py is required for MC1-Homework-2.