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 |

Standard Deviation Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
rpowell2u
Posted : Thursday, November 16, 2006 10:49:04 AM
Registered User
Joined: 12/3/2004
Posts: 7
Good morning. If I wanted to chart the standard deviation of a stock price using a 1 day moving average and a 5 day moving average, how would I do that?

Thanks,

Robert
Bruce_L
Posted : Thursday, November 16, 2006 10:59:49 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I might be misunderstanding the question, but I don't think it would make much sense to plot a 1-Period Standard Deviation. A 1-Period Moving Average is the same as the underlying indicator.

5-Period Standard Deviation Custom Indicator:

Select Chart Template | Add Indicator | Indicator.
- Visible: Checked
- Center Zero Line: Unchecked
- Plot using price scale: Unchecked
- Smoothing Average: 1
- Average Type: Doesn't matter (because the Smoothing Average is 1)
- Indicator Formula: SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 - 5 * AVGC5 ^ 2) / 5)

You may wish to review the following:

Plotting Custom Indicators with Examples
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Thursday, November 16, 2006 11:08:54 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
The Standard Deviation of Period 1 of any data sequence is 0 (zero).

Thanks,
Jim Murphy
Bruce_L
Posted : Thursday, November 16, 2006 11:12:52 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
Which is why I think I might be misunderstanding the question. Maybe there is an unspecified underlying Standard Deviation to which the Moving Averages are being applied (in other words, rpowell2u might want both the Standard Deviation itself and the 5-Period Moving Average of the Standard Deviation).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Thursday, November 16, 2006 11:45:23 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

I also do not understand the request.

My post was in response to your statement:

"... I don't think it would make much sense to plot a 1-Period Standard Deviation."

Some may not know that it is identically zero.

Thanks,
Jim Murphy
rpowell2u
Posted : Thursday, November 16, 2006 11:52:49 AM
Registered User
Joined: 12/3/2004
Posts: 7
I was using 1MA and 5MA as examples and you guys are right, the std dev of a single data point will be zero.

What I was thinking of with a one day std dev, would be to look at something like this:

9am stock trades at 5 on 4,000 sh
9:01am stock trades at 6 on 7,000 sh
9:02am stock trades at 4 on 2,000 sh

In the above example I would weight the stock trades with volume in 1000sh increments so that I would be taking a standard deviation of the following:

5,5,5,5,6,6,6,6,6,6,6,4,4

The result would be a mean of 5.38 with a std dev of .77

Is that possible to do within TC2000 if you have the streaming version?

Thanks again and sorry for the original confusion.

Robert
Bruce_L
Posted : Thursday, November 16, 2006 1:29:13 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I really can't think of an automated way to do base this on the start of the trading day using TeleChart.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
docmba
Posted : Tuesday, November 28, 2006 8:43:52 AM
Gold Customer Gold Customer

Joined: 10/7/2004
Posts: 17
Hi Bruce ,
Tryng to use 2 standard dev to signal 5 % probability on the upper price limit as a signal to buy puts , bear call spreads . The formula below was harnessed from previous requests. Tell if I am wrong on how to sort for these upper 2 stand dev sorts.
Here is what i did:
1.created custom indicator as follows -
BB(20,2) = set period = 20 & width =20 . I using a 20 day smooth moving ave.
2.created a pcf for 2 standard dev as demonstrated below:

AvgC20 - 2 * SQR((( C*C +C1*C1
+C2*C2 +C3*C3 +C4*C4 +C5*C5 +C6*C6
+C7*C7 +C8*C8 +C9*C9 +C10*C10
+C11*C11 +C12*C12 +C13*C13 +C14*C14
+C15*C15 +C16*C16 +C17*C17 +C18*C18
+C19*C19 ) - ( 20 * AvgC20*AvgC20 ) ) / 19 )



Below is what I observed:
1.the upper bolinger band does not intersect the "sorted" 2 stand price.
2.The sorted 2 stand dev price lagged the close for that day.The "sorted" number i.e 34 (I presume thia is price at 2nd stand) while the closing was 29.THe market close always lagged resulting in missed opportunity.

What I am not understanding as I want to find stocks at their upper 2nd stand dev ,which is demonstrated by a sort number and 2nd stand dev baND .The 2nd stand dev sorted price COINCIDES WITH THE CLOSE .In other words, using the templates written out above: PCF 2 stand dev & BB formual custom indicator I want to find where the market close coincides with upper 2nd stand. ?

Thankyou,
Dr Silverhardt
docmba (user)
(email removed by Moderator)


docmba
Posted : Thursday, November 30, 2006 10:39:25 AM
Gold Customer Gold Customer

Joined: 10/7/2004
Posts: 17
Hello,
I requested your feedback/help on stand dev 11/28/06 tues.I haven't seen any response?
Thankyou,
Dr Silverhardt
docmba
Bruce_L
Posted : Thursday, November 30, 2006 11:14:21 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (docmba)
Here is what i did:
1.created custom indicator as follows -
BB(20,2) = set period = 20 & width =20 . I using a 20 day smooth moving ave.

Bollinger Bands can be created without the use of a Custom Indicator. Just add the built in Bollinger Bands indicator to Price. Is the 20-Period Smoothing Average added to the Bollinger Bands? If so, is it Simple or Exponential?

QUOTE (docmba)
AvgC20 - 2 * SQR((( C*C +C1*C1 +C2*C2 +C3*C3 +C4*C4 +C5*C5 +C6*C6 +C7*C7 +C8*C8 +C9*C9 +C10*C10 +C11*C11 +C12*C12 +C13*C13 +C14*C14 +C15*C15 +C16*C16 +C17*C17 +C18*C18 +C19*C19 ) - ( 20 * AvgC20*AvgC20 ) ) / 19 )

Below is what I observed:
1.the upper bolinger band does not intersect the "sorted" 2 stand price.

Your formula is for the Lower Bollinger Band. You would need to change the first "-" to a "+" to get the formula for the Upper Bollinger Band:

AVGC20 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 19)

QUOTE (docmba)
What I am not understanding as I want to find stocks at their upper 2nd stand dev ,which is demonstrated by a sort number and 2nd stand dev baND .The 2nd stand dev sorted price COINCIDES WITH THE CLOSE .In other words, using the templates written out above: PCF 2 stand dev & BB formual custom indicator I want to find where the market close coincides with upper 2nd stand. ?

You might want to try sorting by a 20-Period %b:

50 * (C - AVGC20) / SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 19) + 50

You are looking for values near 150. You could use this as an EasyScan Condition and adjust the Rangefinder appropriately. You may wish to review the following:

Using EasyScan to find stocks that meet your own criteria

-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.