Any idea or available example of curve-fitting (similar to trend-lines in an excel charts)?
It can be done using Python function: scipy.optimize.curve_fit(f, xdata, ydata)
I have ydata (i.e. apple stock price) but how to get xdata as the dates/time and give it curve_fit function?
Any help is really appreciated.
Thank you