Click or drag to resize
Correlation

Correlation of trading system's returns.

Following code shows how to get a correlation table of several trading systems.

Correlation is calculated from equities returns.

Correlation
/* 
 Disclaimer: 
 The systems used in this example were selected randomly.
 Data shown in this example can contain errors.*/


Int64[] systems = new Int64[] {
    46106678, // Bob Dylan
    90325773, // Ascendatnt
    84690231, // Genefish Hong Kong
    92728998, // RSI Opportunistic
    90134941 // SPXTrends Futures
};

H4 = "A correlation table with default values";
TABLE = GetCorrelationTable(systems);

H4 = "A correlation table without SP500";
TABLE = GetCorrelationTable(systems, null);

H4 = "A correlation table using SPY instead of SP500";
TABLE = GetCorrelationTable(systems, "SPY");

H4 = "A correlation table of monthly returns using tradeMONSTER commissions plan";
TABLE = GetCorrelationTable(systems, null, TimeInterval.Month, "tm");

H4 = "Include SP500 index to the above setup";
TABLE = GetCorrelationTable(systems, "SP500", TimeInterval.Month, "tm");

H4 = "Use other symbol for correlations. For example \"QQQ\".";
TABLE = GetCorrelationTable(systems, "QQQ", TimeInterval.Month, "tm");
Correlation Default
Correlation Default
Correlation without SP500
Correlation Default WithoutSP 500
Correlation with SPY
Correlation Default WithSPY
Correlation with Parameters
Correlation Monthly trade Monster