I've been mainly playing with the linear regression algorithm in python, but I don't really understand the purpose of it. I get backtesting. You have a trading strategy with entries and exits, and you see how many times it wins and loses and how much profit you get from it, and so on. But I can't figure out how to apply linear regression to that. Anytime I put something together it looks really profitable, but I know that the rules I used don't work in real life. On top of that, attempting to ascertain the profitability of the rules, doesn't really seem to work in the way backtesting does. Some video made it seem like it's supposed to predict the next/future value of the set, given the parameters. In which case I'm just going about it the wrong way. I've read a few books, and watched youtube videos, but maybe I'm just too retarded to figure it out.
Not sure why your thread title mentions 'machine learning' while your post talk about linear regression algo. They are 2 different things, unless I misunderstood what you met.
%% 1] EASY to bark bark up the wrong tree\ i was surprised the % i did on single stocks, JAN+ FEB. Most any human can learn better than a machine, but certain limited exceptions apply. 2]]Some asked Dave Ramsey why do REITS do so poorly long term\ when real estate tends to do so well?/ The high fees of Wall Street\ Dave replied. BUT i did have a thought, good thing i limited single stocks to 10% AUM; no matter what kind of indicators we win with .LR tells you almost nothing about 200or 500 single stocks. Rachel Ramsey Cruz noted stock market trajectory for 50 year is up; but since SPY is below 200day moving average, some get that hint . SH is above 200dma, but not much MORE than any indicator, dma,video on any indicator LOL; be a 50 year millionaire on SPY or good funds which sometimes beat SPY. barchart.com has a 8% buy on SH. but better than any LR or machine learning= thats a 92% sell on SH. 7.77]50or 49 years of main street work+ 7 years Wall Street work may help
Sometimes you have to go deep to understand and instrument. I'd stop using multiple instruments and just concentrate on one. Preferably an instrument your research has already ascertained works well with linear regression. Keep Forward testing a large sample in simulation mode until you KNOW. If you quit, then you really didn't want an answer. If you refuse to quit, you'll come to understand about that instrument what those books don't see. To your trading success.
The basic use case of machine learning is classification - identifying sets of existing observations which are in some way related, and telling you which of those sets (if any) new observations belong to. (Good on you for realizing that, once you strip away the hype and gobbledegook, "AI" as it exists today amounts to finding the best-fit line for a set of points) For trading, one could (for example) identify the set of "times where I want to have exposure", run an algo to try and pick out salient features of those times, then check whether "right now" falls into the set. This kind of thing is playing right on the home court of quant funds who can hire huge teams of math PhDs and far more data than you could ever obtain, let alone process - so I'd spend some time thinking about where you as retail might have a structural edge.
Well, most every 'machine learning' book or video I watch starts off with linear regression as the easiest example of it.
Linear regression can be used with machine learning. https://machinelearningmastery.com/linear-regression-for-machine-learning/