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 |

20-Day Historical Volatility PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Flava
Posted : Saturday, October 15, 2011 12:18:10 PM
Registered User
Joined: 5/31/2011
Posts: 1
I have been creating a PCF to follow 20-Day Historical Volatility and I have a few questions:1) Is there a way to create variables so that I don't have to write out the formula for the mean average 20 times? That would help to keep the PCF cleaner.2) The Volatility numbers that I'm getting resemble figures I'm getting out of Excel, but do not match exactly. The calculations in the PCF are always a few points off. Is there a limitation in the PCFs regarding how far past the decimal point the calculations go? (The natural logs of the close to close price changes in my formula go out many places beyond the decimal point.) If that is the problem, is there any way to work around that in order to get exact figures? 3) Are there any shortcuts in the notation for standard deviation or variance? Something like: STDEV(), as it is in Excel?I am using TC2000 v.12Thank you so much for your help!
diceman
Posted : Saturday, October 15, 2011 2:01:12 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

See this:


http://forums.worden.com/default.aspx?g=posts&t=53801


Thanks
diceman

Bruce_L
Posted : Monday, October 17, 2011 10:35:37 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The Personal Criteria Formula Language does not have syntax for constructing variables or loops. It is designed to represent a single formula on a single logical line and is not a scripting language. There is no built in syntax for standard deviation or variance.

Modelling Bollinger Bands (& Standard Deviation) in a TC PCF

The logarithmic historical volatility topic referenced by diceman should contain the correct PCF for the 20-Day Historical Volatility.

Based on my testing, the PCF Language seems to do its calculations using the IEEE 32-bit (4-byte) single precision floating point numbers. The values used can can range from -3.4028235E+38 through -1.401298E-45 for negative values and from 1.401298E-45 through 3.4028235E+38 for positive values. There is no way to force the calculations to use a different data type.

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