I have the past 19 days of stock price stored in the pd.dataframe and I am trying to find out the price P that is smaller than (mean – 2.5*standard deviation), where mean and standard deviation are calculated based on P and the past 19 days prices. The inequality will be something like below:
P < mean – 2.5*standard deviation
I am assuming using solve in SciPy, but I got the error ‘loop of ufunc does not support argument 0 of type Add which has no callable sqrt method’ when calling np.std().
Or maybe are there any other better methods?
Roy Chang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1