how to calculate stock price mathematically