If you create a Machine Learning model to predict the price of a stock:
How can you evaluate its performance if you apply it to your investment strategy?
Data
We start with the stock data of NVIDIA
with its ticker NVDA
.
Check out this tutorial to learn how to preprocess the daily return of a stock.
import pandas as pd
df = pd.read_csv('data.csv', index_col='Date', parse_dates=True)
Questions
- How is a Machine Learning model implemented to predict the change in closing price?
- What is the role of the
min_samples_leaf
parameter in theDecisionTreeRegressor
algorithm? - How do we measure the model’s error and what does it tell us about its performance?
- How do we introduce a Machine Learning model into an investment strategy?
- How do we evaluate the performance of the Machine Learning investment strategy?