Giving back to the community (some new/updated indicators)
Author: avishn
Creation Date: 7/9/2010 7:17 PM
profile picture

avishn

#1
Just some new and updated indicators for Comminity.Indicators
profile picture

avishn

#2
Percent Rank (corrects Community.Indicators' version, matches MS Excel output, implements PartialValue)
CODE:
Please log in to see this code.
profile picture

avishn

#3
David Varadi's DV2 (implements PartialValue, important if you trade at market close)
CODE:
Please log in to see this code.
profile picture

avishn

#4
DV2, bounded version, combines the two indicators above
CODE:
Please log in to see this code.
profile picture

avishn

#5
David Varadi's DVO ("the mother oscillator"), the idea is published in this article -- http://daveab.com/mr_swing/index.htm

CODE:
Please log in to see this code.


Note: because of complexity of parameters, this implementation has two static methods to create an instance of indicator -- DVO.Series takes string parameters and DVO.Series2 takes array parameters.

DV2 mentioned above is a specific configuration of more generic DVO with parameters "0, 0.5, 0.5, 0" and "0.5, 0.5".

Implements PartialValue.
profile picture

Eugene

#6
Great, thank you for the contribution. I'll include it in Community.Indicators in the next update.
profile picture

Eugene

#7
...except for the DVO (which requires .NET 3.5 due to its use of LINQ). This one will be added in a future release.
profile picture

avishn

#8
Recent post on CSS Analytics http://cssanalytics.wordpress.com/2010/09/08/using-non-parametric-statistics-to-improve-portfolio-optimization/ reminded me that I was planning to share a couple of non-parametric tools...

Spearman Rank Correlation

CODE:
Please log in to see this code.


Requires ALGLIB DLL.
You can also obtain z-score and t-score series to check robustness of correlation.

profile picture

avishn

#9
Kendall Tau Rank Correlation

CODE:
Please log in to see this code.


CPU-intensive. Also allows you to obtain z-score.
profile picture

Eugene

#10
Thank you!
profile picture

Eugene

#11
"Kendall Tau Rank Correlation" will make it into the next release of Community Indicators but inclusion of "Spearman Rank Correlation" is unlikely. It requires ALGLIB DLL which is not OK to use in commercial applications due to GPL. Sure, Community Indicators is free an open source but Wealth-Lab isn't, and one of our rules of thumb learnt in the school of hard knocks is "never deal with GPL" (exception: LGPL).
profile picture

Eugene

#12
Since the "More Info" link for Kendall Tau-Rank correlation points to Wikipedia, thought I'd share a code snippet illustrating the syntax here:
CODE:
Please log in to see this code.


This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).