How to code a simple machine learning model?

3 views (last 30 days)
Hello everyone, machine learning is completely new to me and I was wondering if anyone could help me.
If you consider the following graph, we have the market risk premium in blue, and the stock market index in green. Risk premium is generally used to forecast future stock performance.
My idea was, if it is feasible, to use a machine learning tools that will extract all the explanatory information of the risk premium and use it to make the best forecast for the next 3 months (either positive or negative).
Once I know how to do the core code I will be able to play around a bit.
Can anyone describe me how he would handle this problem?
Many thanks in advance,

Accepted Answer

Bernhard Suhm
Bernhard Suhm on 25 Mar 2018
This is a regression problem. You could build a simple regression model using your risk premium as predictor, or better that risk premium from a couple points in the past (the last few days / weeks etc). Once you have built a table with those predictors and the stock index as response, you can use the Regression Learner app to build the actual model without coding. To get a good model, you'll probably want to use predictors aside from your risk premium, but I'm not experienced in financial modeling, so I'll leave it here - though there's a lot of additional advice how to build a stock market prediction model out there, good luck!

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by