Machine Learning in Juypter Notebooks

:Links to Juypter notebooks with Python code written by Richard Barrett.

Python code often lives in Jupyter notebooks. These notebooks are written as exercises, with questions and opportunities for the reader to modify the code to produce specific results. Knowledge of Python, Pandas, and NumPy is helpful.

XOM Option Trader

These notebooks demonstrate how a collection of machine learning algorithms (“learners”) performed using a feature set designed around trading stock options, specifically XOM options. The option tested was the sale of covered calls. These notebooks do not show how the option trades were generated, only selection and evaluation of the profitability of the option set as presented.

Jupyter Notebooks

The binary image for these Jupyter notebooks is large, so be patient as the notebook creates the environment.

BuildFeatures – This notebook demonstrates how to build a feature set for trading options on XOM. It uses column operations on Python data frames to generate specific features from stock prices.

SelectFeatures – The SKLearn library offers a wealth of functions to evaluate and rank features. This notebook demonstrates several of those functions.

TrainLearners – The SKLearn library contains many learning algorithms. This notebook shows how to construct a function that allows the user to select among learning algorithms. The function also collects and presents performance metrics for each learning algorithm selected.

%d bloggers like this: