# AI News, Machine Learning for Intraday Stock Price Prediction 1: Linear Models

- On Sunday, June 3, 2018
- By Read More

## Machine Learning for Intraday Stock Price Prediction 1: Linear Models

This is the first of a series of posts on the task of applying machine learning for intraday stock price/return prediction.

Let’s look at the individual points in the above graph - there are more than 200,000 datapoints there, but we will just look at the first few to understand what it is that we want to predict.

Please note that it’s typically better to predict returns rather than price difference because models/techniques designed to predict returns can scale across various securities relatively better.

$0.13 price difference for a $154 stock is not much compared to $0.13 price difference for a $20 stock - $0.13 has a different meaning for a $20 stock.

In this post though, we will only use the features derived from the market data to predict the next 1 min price change.

(We will explore news/text data effects in a separate post in future.) The feature set can be broadly classified into two categories: Features describing current market snapshot and Features describing recent history

However, please note that these features try to capture the current market conditions as well as the recent past.

While the price of AAPL could range from 153 to 155 in a day, the volume over last 5 min could range from 100 to 1000000.

However, the model outputing 0 is of absolutely no value - we want opinionated models that can be useful for trading or execution.

Therefore, comparing the standard deviation of the predicted value h(x) with the standard deviation of y is necessary.

Adding a weight penalty to the error term is a simple way to regularize the model - this helps stabilize the training and the model is often better at generalization.

The following results were obtained using a 2-layer feed forward neural network with hidden_size1=100 and hidden_size2=50.

- On Tuesday, January 22, 2019

**Regression forecasting and predicting - Practical Machine Learning Tutorial with Python p.5**

In this video, make sure you define the X's like so. I flipped the last two lines by mistake: X = np.array(df.drop(['label'],1)) X = preprocessing.scale(X) X_lately ...

**How to Make a Prediction - Intro to Deep Learning #1**

Welcome to Intro to Deep Learning! This course is for anyone who wants to become a deep learning engineer. I'll take you from the very basics of deep learning ...

**Regression Training and Testing - Practical Machine Learning Tutorial with Python p.4**

Welcome to part four of the Machine Learning with Python tutorial series. In the previous tutorials, we got our initial data, we transformed and manipulated it a bit ...

**Predicting the Winning Team with Machine Learning**

Can we predict the outcome of a football game given a dataset of past games? That's the question that we'll answer in this episode by using the scikit-learn ...

**Regression Features and Labels - Practical Machine Learning Tutorial with Python p.3**

We'll be using the numpy module to convert data to numpy arrays, which is what Scikit-learn wants. We will talk more on preprocessing and cross_validation ...

**Training a machine learning model with scikit-learn**

Now that we're familiar with the famous iris dataset, let's actually use a classification model in scikit-learn to predict the species of an iris! We'll learn how the ...

**Support Vector Machine (SVM) with R - Classification and Prediction Example**

Includes an example with, - brief definition of what is svm? - svm classification model - svm classification plot - interpretation - tuning or hyperparameter ...

**Autoencoders - Ep. 10 (Deep Learning SIMPLIFIED)**

Autoencoders are a family of neural nets that are well suited for unsupervised learning, a method for detecting inherent patterns in a data set. These nets can ...

**Decision Tree Tutorial in 7 minutes with Decision Tree Analysis & Decision Tree Example (Basic)**

Clicked here and OMG wow! I'm SHOCKED how easy.. No wonder others goin crazy sharing this??? Share it with your other friends ..

**LSTM input output shape , Ways to improve accuracy of predictions in Keras**

In this tutorial we look at how we decide the input shape and output shape for an LSTM. We also tweak various parameters like Normalization, Activation and the ...