How to Buy sell stock as per Volatility calculation