dotnet / machinelearning-samples

Samples for ML.NET, an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
4.49k stars 2.69k forks source link

Using the Predictive Regression model for other datasets #426

Closed ProfessorX0227 closed 5 years ago

ProfessorX0227 commented 5 years ago

This is more of a question than an issue. I was curious if this regression model in ml.net is capable of predicting stock closing price if I gave the model features such as Date, Open, High, Close, Volume, etc to train the model with? I have a working solution, but its not generating anywhere close to a good prediction. I was curious if it is the data I am collecting and if I am training my model correctly?

danucalovj commented 5 years ago

Definitely out of scope as an issue on Github, I'd recommend Stack Overflow and exploring datasets and experiments on Kaggle, here's a good starter:

https://towardsdatascience.com/simple-stock-price-prediction-with-ml-in-python-learners-guide-to-ml-76896910e2ba

A few things to consider:

You won't accomplish a fraction of this in ML.Net, the depth and breadth of hyperparameter tuning alone is immense for anything that would resemble real life stock trading scenarios.

The features you'll gather from any stock data, i.e. open, close, high, low, and indicators like RSI, MACD , etc. only account for a portion of stock movements, not for other economic and human factors that are intrinsic in the market.

If anyone could really develop a way to predict the stock market movement, and be able to apply it in real life with enough accuracy to turn a dime, well, that would be something pretty big.

If you just want to learn the basics, I'd definitely recommend reading that article and starting from there.

CESARDELATORRE commented 5 years ago

@danucalovj - 100% agree. Stock price is a very complex problem for a simple regression model. If it could be predicted that way, we’ll.. many things would change.. ;) The huge number of external factors, news, etc. impacting the stock make it a very hard problem for a single ML model.

ProfessorX0227 commented 5 years ago

Thank you for your feedback. I totally understand, I wouldn't expected such a program to be 100% accurate or even 80% accurate, because I know there are many variables that go into predicting such outcomes. Just the fact that it would be able to predict something would have been a win in itself. Would this be the same case for the Sales Forecasting ml.net regression model? Based off the documentation this seems like it could be in its realm of possibilities since it takes previous data and formulates a forecast based off said data. @danucalovj

danucalovj commented 5 years ago

Sure thing. Very similar to sales forecasting, yes. @ProfessorX0227 if possible, for the sake of the folks triaging issues for this project, feel free to open a thread on Stack Overflow, or something similar, to discuss. That way the triage team doesn't have this as an open issue. Would be happy to discuss and help provide code examples in SO.

ProfessorX0227 commented 5 years ago

Yes, thank you. Sorry for the inconvenience!