Home > Back-end >  ML.NET C# predicting stock price using historical prices
ML.NET C# predicting stock price using historical prices

Time:01-13

I am using C# and trying to figure out if I can create a way of returning a list of predicted future stock prices/movement by feeding in json data containing date, open, close, high, low, volume, adjusted close etc. (doesn't have to be too accurate for experimenting with code) using Microsoft's ML.NET.

Does anybody know how I could achieve this or have any useful links? I have been banging my head for a while trying to figure this out. Thank you!

I am expecting a returned list of future dates and correlated predicted prices or perhaps a high, average and low stock target. I am not fussy, I am mainly trying to figure out how to work ML.NET for price prediction without using a csv.

CodePudding user response:

ML.NET has forecasting and regression algorithms which might be appropriate for this scenario. Here is a sample using the ForecastBySSA algorithm.

Note that forecasting algorithms are univariate which means you can only use one column as a feature. Using regression algorithms means you'll have to perform some more feature engineering but you could use more features. Not the same problem you're trying to solve but here's a forecasting sample using regression algorithms.

  • Related