Reputation: 15
excuse me, I am new to using linear regression. I want to ask how to overcome the problem I faced, I tried to predict the stock price using the closing price with time/date. but I have an error that the value at Y (stock price) cannot be processed with the value of X (date). Are there any suggestions for solving my problem?
and this is my regression linear
Thank You.
Upvotes: 1
Views: 436
Reputation: 402
Linear regression can work only with numbers, so I would suggest you to construct new input features based on original datetime. E.g: - Number of month - Day of month - Year - Hour of day
If you wish, you can also construct more advanced features. For example if you feel like stock price can depend on weekend, you can engeneer features like: - Is weekend (1 if true / 0 if false) - Is holiday (1 if true / 0 if false) Etc.
Upvotes: 1