Neither is it entirely non-efficient nor non-rational.
Obviously, the stock market isn't about the actual future -- nobody knows that.
It's about the expected future, calculated in a pure informational way.
The price = the market's overall evaluation of all currently available information. Obviously it's not perfect, but the point is that if you know better, then you ought to be in investing, not programming, because you'll make a lot more money.
If your life savings is invested in one undervalued company then sure, that's pretty risky. If you happen to have a portfolio spread amongst many undervalued companies, then I'd love to be in your shoes no matter what people quote at me.
If the stock market is about the future, then how do you interpret Goldman Sachs' share price of $235 in November 2007?
1 year later it fell to $53.
A company's share price will tell you nothing about the actual financial stability or future of the company.