Value investing is at its core the marriage of a contrarian streak and a calculator.