Learn R Programming

Trading (version 2.0)

NormXASampEn: Normalized Cross Sample Entropy

Description

Calculates the Normalized Cross Sample Entropy of the track records of two assets/strategies based on the sample entropy.

Usage

NormXASampEn(x, y, m = 2, r = 0.2)

Arguments

x

a vector containing the track record of the underlying asset/strategy, this will be normalized during the algorithm

y

a vector containing the track record of the underlying asset/strategy, this 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

Value

A double value containing the Normalized Cross Sample Entropy

References

Lopez de Prado, Marcos, Codependence (Presentation Slides) (January 2, 2020). Available at SSRN: https://ssrn.com/abstract=3512994

Examples

Run this code
# NOT RUN {
x = PerformanceAnalytics::edhec[,c("Short Selling")]
y = PerformanceAnalytics::edhec[,c("Convertible Arbitrage")]
Normalized_Cross_Sample_Entropy = NormXASampEn(x, y, m=2, r=0.2)

# }

Run the code above in your browser using DataLab