OPEN-SOURCE SCRIPT
Updated Spitznagel ROIC

This is a rough version of the Return on Invested Capital metric that Mark Spitznagel presents in The Dao of Capital. The purpose is to calculate the return on real invested capital, conservatively calculated. Over a medium term horizon, the theory is that companies which have a high ROIC (presented here as a decimal value where 0.5 = 50%, 1 = 100%, etc., and color coded as a general guide) combined with a low Faustmann Ratio (see my other script) should generally outperform. Please don't take this short summary as an excuse to not read the full book. It's well worth your time. (I am not affiliated with the author in any way.)
Release Notes
Bug fixes:* Numeric display of the ROIC number is now always displayed to 2 decimal places. The graph was always correct, but previously TradingView would occasionally display only a whole number.
* The EBIT calculation has been improved to synthesize data over the past four quarters. A bug in PineScript requires manually calculating this. Previous versions of this study computed this using in imprecise heuristic that has been replaced with a proper computation so the EBIT half of the ratio is now actually correct rather that approximately correct.
Enhancements:
* The study now works for corporations that report annually. PineScript has no feature to get the most recent balance sheet value, so I hacked this up for all values as many companies outside the US report only annually.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.