Skip to content
All library documents

Aligning Regression Tree Return Forecasts with Their Target Dates

Article Quant Q&A · Author: aju_k

Summary

The document addresses how to interpret weekly and monthly stock return predictions from regression trees. The training targets are recorded on Fridays: weekly returns for each Friday and monthly returns on the last Friday of each month. The question is whether a prediction made from Wednesday data refers to a return ending on the upcoming Friday, a later Wednesday, month-end, or a rolling period from the forecast date.

The answer emphasizes that forecast timing depends on how predictors and targets are aligned in the model. Without lagging predictors, a model may associate inputs at time t with returns at time t, rather than a future return. To forecast ahead, the training setup should pair appropriately lagged predictors with the intended future return target. The excerpt supplies this conceptual guidance but does not specify the original tree's feature timing, return calculation convention, or a complete implementation, so those details must be checked in the dataset construction.

Key ideas

  • Return forecasts inherit their time horizon from how predictors and targets are aligned during training.
  • Friday-labelled weekly and monthly targets do not by themselves establish the forecast end date.
  • Predictors may need to be lagged so information available at the forecast date maps to a future return.
  • Inspect the dataset construction to determine whether a prediction refers to a current or forward period.

Tags

Full text
# Interpret predictions weekly and monthly stock price returns


# Interpret predictions weekly and monthly stock price returns












I have built a model in R that predicts weekly and monthly returns of stock prices using regression trees, roughly based on https://www.r-bloggers.com/using-cart-for-stock-market-forecasting/. In my training and test sets weekly and monthly return rates (the target variables) are calculated for Fridays as follows:





Weekly returns are available for each Friday of the week and monthly returns are available for each last Friday of the month.

Using the predictive model, I can then predict weekly and monthly returns using the data available today. E.g. if today's data is xyz then the model predicts a weekly return of 0.1 and a monthly return of -0.02.

```
df_test$pred_weekly_return <- predict(tree_weekly,df_test)
df_test$pred_monthly_return <- predict(tree_monthly,df_test)
```

I am struggling with how to interpret these predicted weekly and monthly returns. If I use today's Wednesday 14 December data, is the predicted weekly return then for next week Wednesday 21 December or for this week Friday 16 December? And is the predicted monthly return then for the end of this month 31 December or, say, 31 days from now 13 January?

Any advice would be greatly appreciated.

## Answer by zglin (score 1)

https://quant.stackexchange.com/a/31493

It depends on the structure of your model. Unless the variables of your regression tree are lagged, you are going to be predicting the the weekly returns/monthly returns at time t.

Try an equation of the form (this would mean lagging all of your variables by 1 time period and training on the returns that way).

$y_t$= $B_{0_t}$ + $B_{1_{t-1}}$ $x_{1_{t-1}}$+ .... $B_{n_{t-1}}$ $x_{n_{t-1}}$

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.