Viewing a single comment thread. View all comments

dearnot t1_it6iueu wrote

Question: Consider a stock that values: 10,00 USD in 2010, 75,00 USD in 2015, 150,00 USD in 2020 and it continues to grow by this day.

Given that decision tree based algorithms like xgboost are generating the tree (splitting the values) based on the ranges, I don’t understand how the tree built on the past data (e.g. years 2000 - 2015) could be in any form applicable for the future price predictions (e.g. years 2015 - 2080).

Could somebody confirm that that feature normalization is truly not required for data that grows beyond the original(/fit/train) range with time?

Do I need to run the raw stock price through some log or sigmoid function before training or is xgboost actually smart enough to deal with this kind of data automatically?

​

edit: to clarify. I have read it everywhere, including the official forums - that feature normalization is not required when training the decision trees model. In my case I am using the xgboost library that uses the gradient boosting decision tree algorithm to train the model but I think that this question is applicable to any other tool that uses the DT based algo.

2

DeepNonseNse t1_it6yta0 wrote

>to clarify. I have read it everywhere, including the official forums - that feature normalization is not required when training the decision trees model

All the XGBoost decision tree splits are in form of: [feature] >= [treshold], thus any order preserving normalization/transformation (log, sigmoid, z-scoring, min-max etc) won't have any impact on the results. But if the order is not preserved, creating new transformed features can be beneficial.

Without doing any transformations or changes to the modelling procedure, and training data containing years 2000-2014 and test 2015-2080, the predictions would be something similar to those values in 2014 as you originally suspected. There isn't any hidden built-in magic to do anything about data shift.

One common way to tackle this type of time series problems is to switch to autoregressive (type of) modelling. So, instead of just using raw stock prices directly, use yearly change percentages.

1