public void PrepareInputSeries_TwoSeries_FirstOne_EndsSooner()
        {
            TripletAnalyser tripletAnalyser = new TripletAnalyser();
            IList<string> symbolList = new List<string>();
            DateTime minDate = new DateTime(2000, 1, 1);
            DateTime maxDate = new DateTime(2001, 1, 1);
            string exchange = "Exchange";
            string symbol = "Symbol_1";

            IStoreOHLCVIntervals intervalRepository = MockRepository.GenerateStub<IStoreOHLCVIntervals>();

            intervalRepository.Stub(r => r.GetByTimeSpan(exchange,symbol, minDate, maxDate))
                .Return(GenerateInputSeriesList(symbol, minDate, maxDate.Subtract(minDate).Days));

            symbol = "Symbol_2";
            intervalRepository.Stub(r => r.GetByTimeSpan(exchange, symbol, minDate, maxDate))
                 .Return(GenerateInputSeriesList(symbol, minDate, maxDate.AddDays(10).Subtract(minDate).Days));

            List<double[]> intersection = tripletAnalyser.PrepareInputSeries(new List<string>() { "Exchange:Symbol_1", "Exchange:Symbol_2" }, minDate, maxDate, intervalRepository);

            Assert.AreEqual(2, intersection.Count);
            Assert.AreEqual(366, intersection[0].Length);
            Assert.AreEqual(366, intersection[1].Length);
            Assert.LessOrEqual(Double.Epsilon, Math.Abs(minDate.Ticks - intersection[0][0]));
            Assert.LessOrEqual(Double.Epsilon, Math.Abs(maxDate.Ticks - intersection[0][355]));
        }
        public void PerformAnalysis()
        {
            TripletAnalyser tripletAnalyser = new TripletAnalyser();

              MaxEigenResults result =  tripletAnalyser.PerformAnalysis(GetJohnsenSeries());
        }
        public void SplitSeriesTest()
        {
            TripletAnalyser tripletAnalyser = new TripletAnalyser();
            List<double[]> seriesList = new List<double[]>();

            seriesList.Add(new double[52]);
            seriesList.Add(new double[52]);
            seriesList.Add(new double[52]);

            for (int i = 0; i < 52; i++)
            {
                seriesList[0][i] = i;
                seriesList[1][i] = i * 100;
                seriesList[2][i] = i * 1000;

            }

               List<List<double[]>> splitseries = tripletAnalyser.SplitSeries(seriesList, 10);
               Assert.AreEqual(6, splitseries.Count);
        }