A union of curiosity and data science

Knowledgebase and brain dump of a database engineer


Predict stock prices with SQL Server Analysis Services Mining Models

Predictive analytics and supervised machine learning with SSAS and C#.

 

In this demo I use MS Time Series Mining structure to predict stock prices using the Auto Regressive Integrated Moving Average (ARIMA) method. 

  1. Data Mining and Machine Learning have been available in SQL Server since 2000.
  2. You don't need Cubes to use the mining structures.
  3. Accessing the models with C# and SSMS is easy

It's a basic mining structure example to demonstrate what SQL Server has been capable of. Please leave a comment if it helped or if you have any suggestions. 

The walk through consist of:

Creating a model:

Querying a model:

Querying a prediction from the model with a C# application:

 

References and Resources:

Chris Price from Pragmatic Works gives a great 1 hour demo of something very similar here:
https://pragmaticworks.com/Training/Details/Webinar-646

MS References are organized terribly but I was able to find great info on queries and models here:
https://msdn.microsoft.com/en-us/library/ms175595.aspx

https://msdn.microsoft.com/en-us/library/hh213169.aspx