public DayDataKtbAvgSpotFuture GetTenDaysAvg()
        {
            DayDataKtbAvgSpotFuture ret = new DayDataKtbAvgSpotFuture();

            ret.Spot = GetTenDaysAvg_Raw(_spotData);
            ret.Future = GetTenDaysAvg_Raw(_futureData);

            return ret;
        }
        public DayDataKtbAvgSpotFuture GetTenDaysAvgWithoutMinMax()
        {
            DateTime minPriceDiffDate = GetMinPriceDiffDate(_spotData, _futureData);
            DateTime maxPriceDiffDate = GetMaxPriceDiffDate(_spotData, _futureData);

            DayDataKtbAvgSpotFuture ret = new DayDataKtbAvgSpotFuture();

            ret.Spot = GetTenDaysAvgWithoutMinMax_Raw(_spotData, minPriceDiffDate, maxPriceDiffDate);
            ret.Future = GetTenDaysAvgWithoutMinMax_Raw(_futureData, minPriceDiffDate, maxPriceDiffDate);

            return ret;
        }
        public void GetTenDaysAvgWithoutMinMaxTest()
        {
            string spotCode = "KR1035027161";
            string futureCode = "167FC000";
            DateTime targetDate = new DateTime(2011, 10, 24);

            HistoricAvgDayDataGenerator_KtbSkel target =
                new HistoricAvgDayDataGenerator_KtbSkel(spotCode, futureCode, targetDate);

            DayDataKtbAvgSpotFuture data = target.GetTenDaysAvg();

            DayDataKtbAvgSpotFuture expected = new DayDataKtbAvgSpotFuture();
            expected.Spot = GetExpectedSpotDayData();
            expected.Future = GetExpectedFutureDayData();

            Compare(data.Spot, expected.Spot);
            Compare(data.Future, expected.Future);
        }
Beispiel #4
0
 IMonitorEnterPolicy CreateDynamic(DayDataKtbAvgSpotFuture pair)
 {
     return new DynamicTenDaysAvg(pair.Spot, pair.Future);
 }