New answers tagged moving-average
def bbands(price, length=30, numsd=2): """ returns average, upper band, and lower band""" ave = pd.stats.moments.rolling_mean(price,length) sd = pd.stats.moments.rolling_std(price,length) upband = ave + (sd*numsd) dnband = ave - (sd*numsd) return np.round(ave,3), np.round(upband,3), np.round(dnband,3) sp['ave'], sp['upper'], ...
The Technical Analysis of Financial markets is considered as a milestone of the matter. I suggest to read that before starting to test your strategy. It explains well the use of each indicator, providing the economic reason behind that and when it is useful to use that; moreover, the book deals the stock market with mainly, as you need for. In my humble ...
A very reference can be found here: http://www.asiapacfinance.com/trading-strategies/technicalindicators
The TA_lib Technical Analysis library here has open source code for numerous indicators.
First of all, I do not believe the "optimal smoothing" of an estimator (like the mean or the variance) and the "regression case" are the same. The smoothing of an existing estimator (like mean or variance in the blog post), is an univariate problem, where the regression is a multivariate one. In the regression case, you should be able to change the ...
Top 50 recent answers are included