View source: R/SampleEntropy.R
SampleEntropy | R Documentation |
Calculates the sample entropy of a track record. Sample entropy is an improvement of the approximate entropy and should produce accurate results for timeseries of smaller length like historical returns of strategies
SampleEntropy(returns, m = 2, r = 0.2)
returns |
a vector containing the track record of the underlying asset/strategy, these will be normalized during the algorithm |
m |
an integer value defining the embedding dimension , default value is 2 |
r |
a double value defining the tolerance, default value is 0.2 |
The sample Entropy of the input returns
Tasos Grivas <tasos@openriskcalculator.com>
https://en.wikipedia.org/wiki/Sample_entropy
## calling SampleEntropy() without an argument loads the historical edhec
## data for the "Short Selling" strategy
returns = PerformanceAnalytics::edhec[,c("Short Selling")]
Sample_Entropy = SampleEntropy(returns,m=2,r=0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.