We might also compute the average price over the past M days ... and plot it. When they cross we BUY ... or maybe we SELL depending upon whether the crossing is from above or below It might look like so: So we play with the numbers M and N until we're happy. Of course, a simple 200-day Moving Average, like MA = (P1 + P2 + P3 + ... + P200)/200, gives equal weight to all Prices, even the one that occurred 200 days ago! So, if we want to give more weight to more recent Prices, we could use a Weighted Moving Average: WMA = (P1 + 2P2 + 3P3 + ... + 200P200)/K where K is a magic number (which we'll explain in a minute). Note that we are assuming that P1 is the price 200 days ago and P200 is the most recent Price ... and this most recent price is multiplied by 200 so it's 200 times more significant than the 200-day old Price, right?
Okay, what's K?
WMA = (P + 2P + 3P + ... + 200P)/K = P(1 + 2 + 3 + ... + 200)/K As you might imagine, there's a magic formula for this sum, namely: 1 + 2 + 3 + ... + 200 = 200*201/2 so that's the value for K.
In general, for an N-day moving average, we have
Our Weighted Moving Average is now:
Of course, nobody sez that the relative weights 1, 2, 3, ... are etched in stone. We could choose any weights w1, w2, w3, ... wN, and get:
Note that the number K is chosen so that, in the case where all Prices are equal, the Moving Average is equal to that Price as well. It's time for a picture (where we use the weights 1, 2, 3, ...):
Note that the Weighted Moving Average (which emphasizes more recent Prices) follows the stock price more closely than the Simple 20-day average.
If today's closing price is $16 and last month it closed at $12, then is today's price more significant ... because it's more recent (hence more relevant)? I don't think so, not if only ten shares traded at $16 whereas ten million traded last month at $12. (Okay, I exaggerate, but you get the idea, no?) That brings us to my favourite (which we'll call VMA), not necessarily because it gives better BUY/SELL signals, but because it makes some sense (to me, cuz VMAN-day is approximately the average price paid for each share of stock over the past N days).
It's simple.
Here's a stock and the volume of trades: The trading price in May was really important ... look at the volume! Anyway, we plot the weighted moving average over, say N = 100 days (why not?) and get:
I'm getting ahead of myself. We see the stock price and the 100-day VMA in a lovely blue and also the 5-day Moving Average. (I hate to place too much stock ... uh, emphasis, on the dynamics of the stock price; it's too finicky, too nervous, too apt to spike-then-fall, too volatile ... so we use a fast moving average, like 5-day, 'cause it follows the stock price pretty closely and it's smooother, right?)
So what're the BUY/SELL signals?
When VMA - (5-day) > A then we BUY.
For example, if we plot the difference VMA - (5-day) we get: OOPs! I've used the label VA for the Volume Weighted Average, rather than VMA; sorry 'bout that.
And what're optimal choices for A and B?
So why do I like VMA (as opposed to the other jillion technical indicators)?
Suppose there are just two traders, Buyers
and Sellers. Suppose the stock price goes up significantly from $16, then Buyer will sell (in order to lock in his profits). This will drive the price down, so, as a VMA-observer we should SELL as well. Suppose, on the other hand, the price goes down significantly, then Seller (she had previously sold to Buyer) will jump back in cuz the stock is now cheap again. This will drive the price up, so, as a VMA-observer we should BUY as well. The problem is, of course, to identify this price. The best we can do is to compute the Average purchase price of the stock over the past umpteen days. Guess what that is?
Well, almost. You see, the VMA assumes all the stock traded at the
day's closing price which ain't necessarily so ... but VMA
is a good estimate of the average price, right? Of course, buy low and sell high is a good dictum, but low compared to what? High compared to what?
that's what!
Example: You start with, say $10K in CASH and $10K in some stock. Each time VMA100-day says to BUY you spend 50% of your Cash (cuz you'll want some left in case there's another BUY comin' up). Each time VMA100-day says to SELL you sell 50% of your Stock (cuz you'll want some left in case there's another SELL comin' up). How does your portfolio compare to the change in stock price?
So what did I choose for A and B? A = 4.5 and B = -1.5, and now that I have these numbers (which are a characteristic of this stock over this time period) I use them to give me BUY and SELL signals for the (near) future. Oh, one more thing ... It's convenient to know how close we are to a BUY or a SELL. To this end we can, each day, determine the stock price that would have given a BUY or SELL, like so: For a BUY we want VMA - (P1 + P2 + P3 + P4 + P5)/5 > A which requires: P5 < 5 (VMA - A) - (P1 + P2 + P3 + P4) which we plot, in GREEN. Further, for a SELL we want VMA - (P1 + P2 + P3 + P4 + P5)/5 < B which requires: P5 > 5 (VMA - B) - (P1 + P2 + P3 + P4) which we plot, in RED.
That gives: where we BUY (or SELL) when the Stock Price is below (or above) these curves. You can see a SELL in July and a BUY in September and another SELL may be comin' up ...
What kind of stocks should we consider forVMA? I figure they should be:
Not too exciting (tho' the losses were less than Buy & Hold).
How to choose A & B ?It's poor technique to choose numbers A, B, which have little relation to the prices and volumes we're considering, so consider choosing them as follows:We'll SELL when the fast MA is significantly GREATER than the VMA, say 25% greater. That requires (P1 + P2 + ... + PN)/N > 1.25 VMA or, let's just say MA/VMA > 1.25 or, better still
We'll BUY when the fast MA is significantly LESS than the VMA, say 15% less. That requires
You understand that these percentages, 25% and 15%, are entirely up to us and are inextricably linked to our greed ... so let's call them GREEDY PERCENTAGES.
Anyway ... a picture is in order: Here we plot MA/VMA -1 and note when it's greater or less than 25%. (Them's the red and green lines, indicating sell or buy) OR, we could (as we did earlier) plot the stock price as well as the prices that would give a BUY or SELL:
When the Stock Price moves above the SELL line, we ... uh, sell and when it moves below the BUY line ... well, maybe it's better to look at it this way:
We plot the VMA and the
MA and the
Stock Price
and the BUY and SELL
and Uh ... did I mention we used a 200-day Volume-weighted Moving Average here? So, have I made a bundle using VMA? I'll let you know. (See VMA trial)
There's a spreadsheet to play with: Volume Weighted Averaging where the stock data is downloaded from an Internet site and you get to choose your greedy-percentages ... and whether it's 100-day or 157-day VMA and whether you spend ALL or just 47% of your cash when you buy and, when you sell you can sell just 23% of your stock and ... well, you get the idea. PLAY WITH IT!
There is just this proviso: |
to be continued ... one-of-these-days