I am new to R and data analysis in general and need some help with machine learning.
I created a plot and some linear models of the closing prices of two stocks. These prices are the monthly prices for a range of years. I am seeing if the price of stock A predicts stock B. I want to input random closing data from the weekly prices to test the models.
Given that the weekly data has the predictor price A and the resultant price B, how would I see if my model is accurate for this randomized weekly data/ that it is accurate to the real world?