Click or drag to resize
Welcome

Welcome to the Collective2 Explorer .

This project enables deep investigation of Collective2 data. It is not just Collective2's Grid on steroids! You can query Collective2 database, perform any calculations, filter and aggregate data and much more. The results of your questions are presented in various user interface widgets which further support data exploration.

This topic contains the following sections:

How it works

Collective2 Explorer is based on the C# programming language.

Sounds scary? We hope that we will be able to make Collective2 Explorer useful also for non-programmers.

To achieve this goal we are using LINQ.

Microsoft says: LINQ introduces standard, easily-learned patterns for querying and updating data.

Maybe. We, programmers, are biased. So we do not know, if it is really true. But you can try it! Welcome to C2Explorer!

Available data

Collective2 Explorer uses currently these Collective2 data:

This section contains the following subsections:

 

Trading systems

 

A basic data about trading systems like: system name, starting capital, current cash or equity, a number of winners and loser and so on. See c2ex_publicsystems for all available items.

Did you find a formula, indicator or statistics not found on Collective2? Do it yourself! For example this one for all reasonable Collective2 systems: Determining Expectancy in Your Trading

The Grid on steroids
// "Determining Expectancy in Your Trading" for systems started on 2014

var myData = from system in C2SYSTEMS
             where system.Started.Year == 2014
              && system.NumTrades > 100 // reasonable amount for stats
              && system.NumWins > 0
              && system.AvgLoss > 0 // divider
             select new
             {
                 SystemName = system.SystemName,
                 WinRatio = (Decimal)system.NumWins / system.NumTrades,
                 LossRatio = (Decimal)system.NumLoss / system.NumTrades,
                 RewardToRisk = system.AvgWin / system.AvgLoss
             };

TABLE = myData; // See what we have so far

TABLE = from item in myData
        select new
        {
            Name = item.SystemName,
            RewardToRisk = Math.Round(item.RewardToRisk, 2),
            Expectancy = Math.Round(((item.RewardToRisk * item.WinRatio) - item.LossRatio), 2)
        };

 

Trades

 

A database of all trades of all trading systems.

You can investigate trades of each trading system or of the group of systems. Or all Collective2 systems trades.

For example: Do you want to know a trade with the biggest profit on 2015?

2015 winner
// The biggest winning trade in 2015.

var tmp = from trade in C2TRADES
          where trade.ExitTime.Year == 2015
          select new { trade.SystemId, trade.Result };

var maxtrade = tmp.MaxBy(trade => trade.Result);
TEXT = "System id = " + maxtrade.SystemId.ToString();
TEXT = "Max. win = " + maxtrade.Result.ToString();

 

Signals

 

A database of all trading signals (orders) of all trading systems.

Are you curious how much commissions are systems paying when trading stocks?

Commissions (stocks trades)
// Commissions paid for stock trades.

Decimal commissions = 0.01M; // $0.01 per share 
TABLE =
    from system in C2SYSTEMS
    where system.OpenEquity > 0 // just profitable systems
    from signal in C2SIGNALS
    where signal.SystemId == system.SystemId && signal.Instrument == "stock"
    group signal by signal.SystemId into signalsPerSystem
    select new
    {
        System = signalsPerSystem.Key,
        SignalsNum = signalsPerSystem.Count(),
        SignalsQuant = signalsPerSystem.Sum(sig => sig.Quant),
        // if quant < 100 then commission is $1 (ticket fee)
        Commissions = Math.Round(signalsPerSystem.Sum(sig => sig.Quant < 100 ? 1 : sig.Quant * commissions), 2)
    };

 

Equity

 

A database of all trading systems accounts equities points.

Would you like a descriptive statistics of some system?

Equity - descriptive statistics
H1 = "Descriptive Statistics Example";

var ID = 96043352; // Mustang
var mustang = GetAccountEquity(ID);

var c2Equity = (from eq in mustang select (Double)eq.Value).ToArray();

var ds = new DescriptiveStatistics(c2Equity);

TEXT = "------ Equity Statistics ------";
TEXT = String.Format("Minimum : {0}", ds.Minimum);
TEXT = String.Format("Maximum : {0}", ds.Maximum);
TEXT = String.Format("Mean    : {0}", Math.Round(ds.Mean, 2));
TEXT = String.Format("Skewness: {0}", Math.Round(ds.Skewness, 2));
TEXT = String.Format("StdDev  : {0}", Math.Round(ds.StandardDeviation, 2));

 

Statistics

 

(Statistics is preliminary and subject to change.)

A list of systems having Sharpe in the range [1.5; 2.0] or Calmar in [3; 5].

Statistics
// Systems having Sharpe in the range [1.5; 2.0] or Calmar in [3; 5].

TABLE = from s in C2STATS
        where
        (s.StatName == "jCalmar" && s.StatValueVal >= 1.5M && s.StatValueVal <= 2.0M)
        ||
        (s.StatName == "jSharpe" && s.StatValueVal >= 3M && s.StatValueVal <= 5M)
        select s;