Machine Learning: Algorithmic Trading and Autonomous Vehicles
Machine Learning with equity data for Stock Trading is now able to generate Alpha. Same Machine Learning concept can help to predict steering angle of vehicle, traffic sign,vehicle and lane line detection using vision, car’s speed, acceleration, steering angle, GPS coordinates, gyroscope angles.
Pipeline of Stock Trading:
Data Acquisition →Preprocessing →ML, backtest →Building strategies → Simulation with streaming data → Trading
Pipeline of Autonomous Vehicles:
Data acquisition is costlier and limited so far for autonomous vehicles . Few concepts like computer vision, sensor fusion , localization, path planing, control are typical and use machine learning concepts.
Machine Learning for Stock Trading: Trading systems are now able to quickly analyze news feeds from different sources like Bloomberg, Reuters and tweets, process earnings and expectations,ratings, scrape websites, and build sentiments on these instantaneously. This systems ( many cloud systems) can tag data generated by individuals, business processes or sensors. Individual level data generated by social media posts, product reviews, search trends, etc., where as business processes level by company exhaust data, commercial transaction, credit card data, etc. and sensor data by satellite image data, foot and car traffic, ship locations, etc. Pipeline of Stock Trading can make trading strategy and generate alpha.
Challenges:
Machine can not perform well during the state change of market or regime change or market turning point. This turning may result in jump up or down. Jump can be due to oil inventory data, job data, data from central bankers and politicians. Machine Learning models like Markov, PID etc. have good accuracy but VaR is too high for these models.
Important concepts:
row: observation (measurement, data point…)
columns: Features.
feature selection: Deep Learning Based (unsupervised) vs. supervised feature extraction/selection ( feature learning or representation learning). Few techniques PCA, SVD and Linear Discriminant Analysis LDA.
subsets: training,test and validation dataset created from main dataset
target output/response
Optimization: loss, or cost function like gradient descent, SGD, RMSE
ML leverages different algorithms to automatically model and find patterns in data by supervised, unsupervised, and semi-supervised learning.
Labeled data: supervised learning of historic data to get model
Unlabeled data: unsupervised learning of historic data to find unknown patterns.
Clustering (Unsupervised) for discovering the composition and structure of a given set of data or to see the emerge of different groups. Each cluster is characterized by a contained set of data points, and a cluster centroid.
Two or Multi-class classification (Supervised) is to estimate the probabilities that an observation belongs to each of the given classes.
Regression(Supervised) to predict exact value from continuous series/time series (OLS, logistic regression, ARIMA, GARCH etc.)
Anomaly detection (Unsupervised and Supervised) from erroneous data points (defects)
Ensemble methods is to combine different models (random forests)
parametric/non parametric
Overfitting ( model does not generalize well). Regularization (L2 and L1), Max norm constraints and Dropout etc. to avoid this.
Activation Function: to add non-linearity into the output. ( sigmoid, tanh, ReLU)
Bias: weights in NN
Nodes: Input, hidden and output
Multi Layer Perceptron: Input +1 or more hidden layer+output
Back propagation: Training of NN from mistakes under supervision.
Machine Learning algorithms: Machine learning may be supervised learning, unsupervised learning and deep and reinforcement learning. Supervised for labeled data, unsupervised for implicit relationships in unlabeled data and reinforcement learning
Supervised
Regression: OLS, ARIMA, GARCH, Lasso, Ridge, k-Nearest Neighbors(k-NN), Spline, XGBoost
Classification: SVM, Logistic, Random Forest, Hidden Markov, Naïve Bayes
Decision Trees
Perceptron and Ensemble Methods
Unsupervised
Clustering: K-means, Birch, Ward special cluster, Hierarchical clustering
Factor Analysis: PCA, ICA, NPF
Singular Value Decomposition (SVD)
Independent Component Analysis (ICA)
Anomaly Detection
Support vector machine (one class SVM)
PCA (Principle component analysis)
Deep Learning:Time Series and Unstructured
MLP, CNN, LSTM, RBM, ANN, RNN
Others
Reinforcement Learning,Deep-Q, Semi Supervised, Active Learning
ML Steps
Data Selection and Preprocessing → Data Splitting : 80% training and 20% testing →Feature Selection and Feature Engineering → Parametric Models: coefficients of the terms are called the parameters (slope,intercept coefficient,error term…) → Model Selection → Model → Performance/Accuracy → Model Trade offs
Reference
https://github.com/oxford-cs-deepnlp-2017/lectures
https://ml.berkeley.edu/blog/tutorials/
http://cs.stanford.edu/people/karpathy/convnetjs/docs.html
http://deeplearning.net/tutorial/lstm.html#lstm
https://www.youtube.com/playlist?list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6
https://deeplearning4j.org/lstm.html
https://www.youtube.com/watch?v=cKxRvEZd3Mw
https://developer.nvidia.com/deep-learning-getting-started#choosegpu
http://course.fast.ai/
http://www.nvidia.com/object/machine-learning.html
http://www.deeplearningbook.org/
http://www.mlyearning.org/
http://mmds.org/
http://cs231n.github.io/
http://deeplearning.net/deep-learning-research-groups-and-labs/
http://colony.cs.toronto.edu:40292/courses
http://www.cs.toronto.edu/~hinton/