How to calculate the trendline for stock price
问题 I am trying to calculate and draw the trendlines for stock prices. I did some searches and thought for a whole day, there is no a really good idea on how to do. I have daily price history and want to find the cross point between trendline and price line. Could you provide some ideas or guidances? Thank you so much!!! 回答1: import pandas as pd import quandl as qdl from scipy.stats import linregress # get AAPL 10 years data data = qdl.get("WIKI/AAPL", start_date="2007-01-01", end_date="2017-05