Quote from damir00:
you do what the MA calculation does: you get rid of the positions outside the MA window you're interested in. in your specific case, at some time during day 6 you sell what you bought on day 1 and buy the close of day 6. your cost basis will then exactly replicate the MA.
The MA calculation just drops off the sixth day as if you dumped the shares at the price you paid for them - so there are two ways of looking at it - a moving position or a bunch of separate positions:
Latest 6 days prices - 11, 10, 9, 8, 7, 6
MA of last 5 days is (10+9+8+7+6)/5 = 8
Your buy @ the close:
Buy 100 @ 11 = 1100 (day 1)
Buy 100 @ 10 = 1000 (day 2)
Buy 100 @ 9 = 900 (day 3)
Buy 100 @ 8 = 800 (day 4)
Buy 100 @ 7 = 700 (day 5)
Sell 100 @ 6.5 = -650 (assumes you sell at better than the 6th day close)
Buy 100 @ 6 = 600 (day 6)
Average cost basis on the overall 500 share "moving position" is 8.90/share
Alternatively, you don't treat it as a "moving position" but rather as 5 separate positions and take daily P&L hits for dumping the oldest position and replacing it with a new position - presuming that's how you were thinking about it.
So in this case you'd record a P&L hit of -$450 and then assume your cost basis on the remaining 500 shares (average of 5 individual lots) is the 5 day MA of $8/share. In which case in a downtrending market you record a stream of daily losses to keep the net moving position artificially tracking at the 5 day MA.
But frankly I don't see why the overall approach in general (regardless of whether you roll the cost averaging for the moving position or you post the net rollover P&L each day) is of any special value.
And what's the point of starting the thread if the originator is going to play games about explaining why/what he's thinking of?? People shouldn't bother asking such a question if they're unwilling to explain it sufficiently for people to understand the context.
"Just look at a chart with a short MA and figure it out"?? That's an assinine response when he's the one asking for help in the first place. Sounding a lot like a junior trader wannabe who thinks he's found the holy grail, wants others to give him answers, but doesn't want to explain the context of his questions for fear his "secret" will get out.
Yawn.