A theory of financial analysis