Summary
In this chapter, we investigated how to use R to build an investment strategy on fundamental bases. After building and loading our database to R, we first checked whether some of our variables show a strong connection with TRS. Then, we checked whether some linear combinations of them would perform well and controlled them.
As neither method led to an acceptable result, we turned the logic upside down. We created clusters of firms based on TRS performance; then, we checked what is typical for overperformers. We also used decision trees to look for the best way to separate the firms with the highest TRS. Then, based on the results, we described stock-selection rules and performed backtesting.
Our example showed that even if individual explanatory variables show no strong linear connection to performance, it is possible to build an effective fundamental stock-selection strategy. When applying these techniques, recall the limitations: too much flexibility may hurt. A model with a nearly...