Hot answers tagged


Note: Assuming you're a bit of a beginner trying to learn the ropes of how this whole process works at a high level, I can definitely make a couple recommendations (if I'm interpreting that wrong then I apologize if the explanation below isn't what you're after). If you're trying to learn some basic backtesting fundamentals, while QuantStart is an amazing ...


My understanding, in that context, is that signal indicates that you want to hold a share (signal is 1) or hold no shares (signal is zero). Therefore taking the diff will tell you if you want to buy (signal zero to 1, diff is 1), sell (signal 1 to zero, diff is -1) or do nothing (signal stays at zero or stays at 1, diff is zero).


It is unlikely that you could beat the market in the long-term with such a simple strategy. But, since you ask about optimization (not real trading), all you have to do to is run the optimization tests over and over again with different parameters until you find the exact moving average combinations that would predict the past perfectly. The only problem is ...


Under weak-form efficient markets neither situation is more profitable to buy in. Contrarily, under technical analysis, the answer depends on whether you adhere to a mean-reverting or a momentum theory of the market. Under the former, your supposition is correct. Under the latter, certain shorter-term MAs crossing certain longer-term MAs from below are ...


They are different things, it depends on what you are looking for: Bollinger bands are constructed based on the standard deviation of closing prices over the last n periods. An analyst can draw high and low bands a chosen number of standard deviations (typically two) above and below the n-period moving average. The bands move away from one another when ...


got my answer myself, and the answer is: That depends, but people mostly use close price.

Only top voted, non community-wiki answers of a minimum length are eligible