Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Handling holes in data Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
garp
Posted : Tuesday, September 20, 2005 11:57:07 AM
Registered User
Joined: 3/4/2005
Posts: 40
Let's say you're computing a moving average on closing prices. For one of the intervals, there is no, or 0 volume, so for that interval there is no closing price. Now, if you use 0 as the price, as there was no volume, you skew your moving average and get a corrupted value. But if you use the price for the last interval for which there was a price, and use it to fill the price for the 0 volume interval, you give undue weight to that price and skew your result. Lastly, if you just skip over the 0 volume interval and use the noving average for the last valid interval, you're subverting the formula which calls for the sum of the previous n periods divided by n, not the sum of the previous n-1 intervals. Besides, what if you get a run of 0 volume intervals?
So how is this handled?
G
Craig_S
Posted : Tuesday, September 20, 2005 12:02:40 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
A moving average of price does not look for valid volume. If there was no volume that day then the close will be whatever the last trade price was.

Depending on the period of the average you won't see much of a distortion.

Personally, I would never waste time analyzing a stock that does not trade every day.

- Craig
Here to Help!
Doug_H
Posted : Tuesday, September 20, 2005 12:03:41 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
There is never a time when there is no closing price. If a stock closes one day at $10, and then the next day it doesn't trade at all, that simply means it opens at $10 and closes at $10 that next day. The fact that it's the same closing price as the day before does not mean the average is now wrong. It's no different than if the stock traded all day long, but ended up closing at the very same price as the previous day's close.

- Doug
Teaching Online!
garp
Posted : Tuesday, September 20, 2005 12:34:45 PM
Registered User
Joined: 3/4/2005
Posts: 40
Sounds logical Spock. So, let's say we have a stock with the following (totally made up) SMA calculation:

15+14+16+17+20 / 5

resulting in a legit value. Now, the next period has no activity, i.e., no price for that interval. Is the calculation now:

14+16+17+20+20 / 5

or

14+16+17+20 / 4

G



Bruce_L
Posted : Tuesday, September 20, 2005 12:37:36 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
It would be:

14+16+17+20+20 / 5

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.