"TensorFlow™ is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them." - TensorFlow Website

One of my favorite things about QuantConnect is the access to some very powerful Python modules not seen before in other quant platforms. One example is TensorFlow. Although usually associated with Deep Learning, TensorFlow can be used generally for numerical computation and comes with some great tools.

Today, my goal is to share the first TensorFlow tutorial, based on the MNIST For ML Beginners which offers a great and basic walkthrough for people new to Machine Learning and or TensorFlow.

The change in price, over N steps, is used as input features to determine the change in price from step N to step N+1. Using Opening Price, the goal is to forecast the change from one market open to the next to allow for a daily rebalance to the target class(Cash or Long) for a single asset.

Please note, the attached backtest is more academic in that a softmax regression model is trained and then used to predict probabilities per class(Cash or Long positions). Little is done to attempt to achieve success or manage the training in an intelligent way to ensure a quality results or best practices in Machine Learning; making this a good starting point to explore and learn such things(learning rates, dropout, regularization, mini batch inputs, test train splits, cross validation, log loss vs accuracy, feature scaling, non overlapping features, etc). The "positive" result, I'm guessing, has more to do with the model favoring the long class for an appreciating assets vs any deep(darn a pun, we were so close to the end) insight.