Out-of-Sample R-Squared
Finds: whether a forecasting model beats a simple benchmark on unseen data.
When to use it: Use it to judge whether a model really forecasts, as opposed to fitting history. It compares the model to a simple benchmark on data the model never saw. Positive means the model beats the benchmark. Return forecasts usually score a tiny positive number or a negative one, and even 0.5% a month can be economically useful, so judge it against the benchmark and costs, not against 100%.
The formula
In words: Out-of-sample R-squared = 1 − (sum of squared errors of the model forecasts) / (sum of squared errors of a benchmark forecast, usually the historical average)
What each symbol means
| r_t | Realized return | percent |
| r-hat_t | Model forecast made before the return was known | percent |
| r-bar_t | Benchmark forecast, such as the average of past returns | percent |
Worked example
Eight realized monthly returns, the model's forecasts made before each month, and a benchmark forecast of 0.5% a month are in the calculator.
| Model squared errors | 0.000249 | |
| Benchmark squared errors | 0.001128 | |
| R-squared out of sample | 1 − 0.000249 ÷ 0.001128 | 77.93% |
| Beats the benchmark? (1 | 1 if 0.779255>0 else 0 | 1 |
The model's squared errors sum to 0.000249 against 0.001128 for the benchmark, so the out-of-sample R-squared is 77.93%. The model 1.