Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Kurtosis and Skewness Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ksrooprai
Posted : Sunday, June 15, 2008 6:01:45 PM
Registered User
Joined: 11/28/2005
Posts: 38
I am using Perry Kaufman's book (New Trading Systems and Methods) and I am trying to put a PCF together for Kurtosis on page 33.  I know the math is limited in a PCF so can you please help me put the PCF together for the following periods:

3 Day
5 Day
8 Day
13 Day
21 Day
34 Day
55 Day
89 Day
125 Day
144 Day

I am also, after the PCF for skewness that is in the same book in page 31, for the same above mentioned periods.

Can you please help with this please.
Many thanks in advance.
diceman
Posted : Sunday, June 15, 2008 10:42:21 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
Does he supply the formulas?
 
 
Thanks
diceman
 
 
 
ksrooprai
Posted : Monday, June 16, 2008 3:46:05 PM
Registered User
Joined: 11/28/2005
Posts: 38
Yes he does.  The timeframes are my own that I have been testing for other things, which I have based on Fib numbers.
Bruce_L
Posted : Monday, June 16, 2008 3:47:21 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
ksrooprai,
We can't help you without the formulas. We don't have the book.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ksrooprai
Posted : Monday, June 16, 2008 5:54:15 PM
Registered User
Joined: 11/28/2005
Posts: 38
Bruce,

Kurtosis:

       (n(n+1))
_____________ ( Sigma (( xi - average of x ) / standard deviation ) 4 ) -  3(n-1)2
                                                                                                                                 _____
((n-1)(n-2)(n-3))                                                                                                  (n-2)(n-3)

where n = the number of prices in the distribution, xi = th individual prices

Skewness:

         n
_________ ( Sigma (( xi - average of x ) / standard deviation ) 3 )
                                                                                                                          
((n-1)(n-2))                                                                

Thanks,

Kardaya
ksrooprai
Posted : Friday, June 20, 2008 8:35:06 PM
Registered User
Joined: 11/28/2005
Posts: 38
Bruce,

Apologies, any development on this?

In MS Excel these is a KURT and Skew function that will do these formulas, however, I am after these for a PCF for scanning purposes.

Thanks.
ksrooprai
Posted : Tuesday, September 4, 2012 1:06:32 PM
Registered User
Joined: 11/28/2005
Posts: 38

Bruce,

I have attempted to write the Kurtosis and Skewness formulas for 20 peiods myself but I am not getting the values I should be getting. I think it maybe a problem in my standard deviation calculation, can you take a look at the follown and let me know if I have witten the formula for a 20 period standard deviation correctly.

 

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

Thanks.

Bruce_L
Posted : Tuesday, September 4, 2012 1:26:33 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Your standard deviation formula is just fine. The way I would normally write it is a bit shorter and probably more efficient:

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) / 20)

But your version should theortically produce better results (especially for low priced or low volatility symbols) because it is a double pass algorithm for calculating standard deviation while mine is a single pass algorithm for calculating standard deviation. The algorithms are mathematically the same, but yours should handle the rounding that computers need to do to create the calculations a bit better (which is why I had to add the ABS() function to my version).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ksrooprai
Posted : Thursday, September 13, 2012 7:27:17 PM
Registered User
Joined: 11/28/2005
Posts: 38

Bruce,

Thank you for this. I managed to calculate the Kurtosis and I checked it back in Excel to the Excel function. However, when I try to do this for a 60 period, TC falls over. I think the calculation is too big for TC to handle, given that the standard deviation calculation above would be repeated 60 times in the formula.

Thank you for your help, much appreciated.

Bruce_L
Posted : Friday, September 14, 2012 7:52:04 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



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