In a capitalist society, the subject of economy is each individuals, since each person has their own responsibilities regarding their finances. Therefore, people tend to seek accumulation of their own possessions. In this sense, people say investment is better than saving. But this is true only under the one condition. It is that investment should be made in the right thing.
Today's passage is not about finance, yet reminds us the words of Jesus in Matthew 6:19-20. Jesus told to lay up treasures in heaven, not on earth. This means invest your possessions in heaven. Likewise, James is warning the riches who stacked up their possessions on this earth. The reason is that they are temporary. They will be rotten and corroded, which means they become useless on the last day. Also, James warns the riches because they exploited their employees. That is against God.
Therefore, we should invest what we have in things eternal, that is much better than saving a lot on this earth. How to do it? The answer is in Matthew 25:40. 'Truly, I say to you, as you did it to one of the least of these my brothers, you did it to me.'
By looking after the needy around us with what we have given from God is the best investment.