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 |

Profile: garp
About
User Name: garp
Groups: Member, Platinum User, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Friday, March 4, 2005
Last Visit: Monday, January 16, 2006 2:29:37 PM
Number of Posts: 40
[0.01% of all post / 0.01 posts per day]
Avatar
Last 10 Posts
Topic: Handling holes in data
Posted: Tuesday, September 20, 2005 12:34:45 PM
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



Topic: Handling holes in data
Posted: Tuesday, September 20, 2005 11:57:07 AM
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
Topic: MA calculation
Posted: Thursday, August 18, 2005 10:43:34 AM
So let me finally nail this down.
The simple MA for day 6 includes days 2,3,4,5,6 and is 107.30
The simple MA for day 5 includes days 1,2,3,4,5 and is 105.78, but is not displayed.

Please confirm.

G
Topic: MA calculation
Posted: Thursday, August 18, 2005 10:28:48 AM
So the sixth day MA is the sum of the previous 5 days divided by the period. It cannot include the sixth day because the close is not yet finalized. Thus I do not understand why the sixth day MA is computed on days 2,3,4,5,6. What happens to day 1?

I'm developing a ATS based on IB's API and using TC-Net to check my buy and sell signals. I'm getting data inconsistencies so I need to nail this down. Thanks for the help.
G
Topic: MA calculation
Posted: Thursday, August 18, 2005 9:47:44 AM
You dropped off the first term. The 6th day MA is the average of the first 5 periods.
I get:
(100.33 + 108.31 + 109.40 + 104.87 + 106.00)/5=528.91/5=105.78

G
Topic: MA calculation
Posted: Thursday, August 18, 2005 2:33:24 AM
Doug, Bruce,
I recomputed the 5 EMA and got 106.20 versus TC-Net's 106.21. The missing penny is probably a rounding error on my part as I calculated it by hand.

But when I specify a simple moving average, I would expect a value of 105.78 (528.91/5) for day 6, i.e., 8/26. However, TC-Net gives a 107.30. So why the difference?

G
Topic: MA calculation
Posted: Wednesday, August 17, 2005 1:33:23 AM
Hi guys,
First, I'd like to compliment you on the fine presentations at Trader Expo in Chicago.

Now a question:
In looking at the chart for GOOG, I noticed something that doesn't make sense. I have GOOG set up with a bunch of indicator, one of which is a 5 EMA. Starting with Aug 19, 2004, the dat of the IPO, I show the following close values and moving average calculation
08/19/2004 close_______________:100.33
08/20/2004 close_______________:108.31
08/23/2004 close_______________:109.40
08/24/2004 close_______________:104.87
08/25/2004 close_______________:106.00
Sum____________________________:528.91
Average, 528.91/5 :105.78

However, TC-Net shows 0.00 as a value for 8/25 - which is bogus, and 106.21 for a MA on 8/26. So, Where's the value for 8/25?

Also, since it's an exponential MA, the value for 8/26 should be ((107.91-105.78) * 2/6 )+ 105.78 = 106.49, which TC-Net calculates as 106.21. I'm using Wilder's formula for EMA from his book, "New Concepts in Technical Trading Systems", which is: EMA(current) = ( (Price(current) - EMA(prev) ) x Multiplier) + EMA(prev)

Where multiplier is: 2 / (1 + N) where N is the specified number of periods.

G


Topic: MA & EMA calculation
Posted: Sunday, June 19, 2005 2:09:29 PM
Hi,
If you're calculationg a moving average fro a lightly traded stock, and there is NO activity for a tick period, how do you get prices for that interval?

G
Topic: Stochastics Calculation
Posted: Thursday, June 2, 2005 4:26:20 PM
I see the confusion. I asked the trainer several days ago what value does TCNet display? the response was that it displays SK. I'm refering to the upper left corner in panel 1. BTW, it is GOOG I'm working with.

Thanks
G
Topic: Stochastics Calculation
Posted: Thursday, June 2, 2005 1:11:38 PM
Hi,
I'm doing formula backtesting and am getting a value for Stochastics
that is at offs with TCNet.

Lane Stochastics calculations for period 3, smoothing period 3

using %K=100*(close-lowest_low_for_period_n)/
(highet_high_for_period_n-lowest_low_for_period_n)

I have TCNet settings set for period 3, K smoothing 3, %D of 3.
This is my data, straight from TCNet

date______________:|5/2/05|
open______________:222.05
high______________:223.70
low_______________:220.21
close_____________:222.29
Kstoch____________:0.0
SKstoch___________:0.0

date______________:|5/3/05|
open______________:221.85
high______________:228.15
low_______________:221.32
close_____________:226.19
Kstoch____________:0.0
SKstoch___________:0.0

date______________:|5/4/05|
open______________:227.23
high______________:229.88
low_______________:227.00
close_____________:228.50
Kstoch____________:85.73
SKstoch___________:0.00

date______________:|5/5/05|
open______________:228.62
high______________:228.62
low_______________:225.88
close_____________:226.98
Kstoch____________:66.12
SKstoch___________:0.00

date______________:|5/6/05|
open______________:228.40
high______________:229.25
low_______________:226.47
close_____________:228.02
Kstoch____________:53.50
SKstoch___________:68.45

SK Stochastics calculated by TC Net is 75.72
I come up with 68.45. It's a simple caculation, just a 3 period average of

85.73
66.12
53.50

which equals to 205.35/3 or 68.45. Where are you getting 75.72????

Perplexed Garp