Closed mk0417 closed 1 year ago
https://github.com/stefan-jansen/machine-learning-for-trading/blob/main/11_decision_trees_random_forests/00_data_prep.ipynb
Why minus market premium when estimating market beta? factor_data['return_1m'] -= factor_data['Mkt-RF']
factor_data['return_1m'] -= factor_data['Mkt-RF']
The dependent variable should be the difference between stock return and risk-free rate factor_data['return_1m'] -= factor_data['RF']
factor_data['return_1m'] -= factor_data['RF']
That's correct, will update in the next edition.
https://github.com/stefan-jansen/machine-learning-for-trading/blob/main/11_decision_trees_random_forests/00_data_prep.ipynb
Why minus market premium when estimating market beta?
factor_data['return_1m'] -= factor_data['Mkt-RF']
The dependent variable should be the difference between stock return and risk-free rate
factor_data['return_1m'] -= factor_data['RF']