Загрузка страницы

Stock Market Predictions with Markov Chains and Python

Let’s create a multi-feature binary classification model. This is based on Pranab Gosh excellent post titled 'Customer Conversion Prediction with Markov Chain’ and we'll implement it based on his pseudo code in Python.

MORE:
Blog or code: http://www.viralml.com/video-content.html?fm=yt&v=sdp49vTanSk

Signup for my newsletter and more: http://www.viralml.com
Connect on Twitter: https://twitter.com/amunategui
Check out my book on Amazon "The Little Book of Fundamental Market Indicators"
https://amzn.to/2DERG3d

Pranab's post:
https://pkghosh.wordpress.com/2015/07/06/customer-conversion-prediction-with-markov-chain-classifier/

Stock data:
https://finance.yahoo.com/quote/%5EGSPC?p=^GSPC
Transcript
Let's run some Stock Market predictions with Markov Chains and Python

I am basing this video from a great post by Pranab Gosh titled 'Customer Conversion Prediction with Markov Chain Classifier'

He lays out his approach using easy to understand pseudo-code so I recommend reading to understand the theory of the approach

He is applying it obviously to customer conversion data but that data isn't as easy to get a stock market data. Also, this is just my interpretation of his pseudo code as there are many ways of slicing and dicing this. But what I like about his approach is that his clever way of doing binary classification with by creating two transition matrices - a positive one and a negative one. Let's dig in.

Markov Chains
A Markov Chain offers a probabilistic way of predicting the likelihood of an event based on prior behavior or prior events. If you look at the drawing of Andrey Markov my son did, we surrounded him with dollar chains, each dollar is an event, and

Welcome to ViralML, my name is Manuel Amuantegui and am the author of Monetizing ML and other books that you can find on Amazon.
First-Order Transition Matrix

A transition matrix is the probability matrix from the Markov Chain. In its simplest form, you read it by choosing the current event on the y-axis and look for the probability of the next event off the x-axis. In the below image from Wikipedia, you see that the highest probability for the next note after A is C#.

In our case, we will analyze each event pair in a sequence and catalog the market behavior. We then tally all the matching moves and create two data sets for volume action, one for up moves and another for down moves. New stock market events are then broken down into sequential pairs and tallied for both positive and negative outcomes - biggest moves win (there is a little more to this in the code, but that’s it in a nutshell).

CATEGORY:DataScience

HASCODE:Predict-Stock-Market-With-Markov-Chains-and-Python.html
SPECIALFRAME:True

Видео Stock Market Predictions with Markov Chains and Python канала Manuel Amunategui
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
27 марта 2019 г. 4:00:04
00:19:48
Яндекс.Метрика