This formula can be used to filter stocks into a buy and do not buy list:
V = E A R N I N G S × ( 8.5 + 2 g )
V = Value.
Earnings = Trailing Twelve Months Earnings
8.5 = P/E base for a no-growth company
g = reasonably expected 7 to 10 year growth rate
Now we have the basis for mathematical modeling. We can improve on this formula by adding more factors to it, such as for interest rates, or public sentiment. Simply create a score which quantifies the public sentiment or brand loyalty behind a company. For instance Apple would score very high.
Conclusion
When I invest for the long term I do not just fitler by V (value). I also filter by dividend growth potential which uses an entirely different set of values. Apple using the formula above is a good example of a company which by the math has value. We can then determine whether the price it is going for in USD matches with the value of the stock as quantified by the formula to determine if it is over or under priced. If we look at the potential for dividends we can just see by cash flow and dividend growth potential that Apple can raise dividends for years and years (low dividend payout ratio and low P/E ratio)
This is not investment advice. I am not going to tell anyone to go out and buy Apple or any particular stock. In fact, if someone is young or old has a lot to do with their investment strategy and I cannot know whether the reader is looking for income generation or long term growth. Apple does not pay a high dividend so for the retired person this is not a good stock to hold. For the person who is under 25 this is in my opinion a great stock to hold because the dividends will have plenty of room to grow and the price of the stock also has plenty of room to grow. The main things Apple has going in it's favor is brand loyalty and massive mountain of cash to spare. Both of these combined make for favorable growth in dividend payments and stock price.