コード例 #1
0
        private string SetRic(DEXSRPTemplate dex)
        {
            string result    = string.Empty;
            string monthCode = string.Empty;
            string yearCode  = string.Empty;

            if (callOrPut.Equals("C"))
            {
                if (dicCall.ContainsKey(expireMonthMMM))
                {
                    monthCode = dicCall[expireMonthMMM];
                }
            }
            else if (callOrPut.Equals("P"))
            {
                if (dicPut.ContainsKey(expireMonthMMM))
                {
                    monthCode = dicPut[expireMonthMMM];
                }
            }

            yearCode = expireYearYY;
            result   = string.Format("S50{0}{1}{2}.FX", StrikePrice, monthCode, yearCode);
            return(result);
        }
コード例 #2
0
        public TFEXBulkFileTemplate(DEXSRPTemplate dex)
        {
            callOrPut = GetCallOrPut(dex.NewTIShortName);
            AddDic();
            Tag           = "47512";
            Type          = "DERIVATIVE";
            Category      = "EIO";
            CallPutOption = SetCallPutOption(callOrPut);
            DerivativesQuoteUnderlyingAsset = ".SET50";
            ExpiryDate = SetExpiryDate(dex.ExpiredDate);
            DerivativesLastTradingDay = DateTimeConvert(dex.LastTradeDate.Replace("/", "-"), "yyyy-MM-dd", "dd-MMM-yyyy");
            RetireDate                   = SetRetireDate(DerivativesLastTradingDay);
            DerivativesLotSize           = dex.ContractSize;
            StrikePrice                  = dex.StrikePrice.Replace(".000000", "");
            DerivativesLotUnit           = "INDEX";
            Exchange                     = "TFX";
            Currency                     = "THB";
            DerivativesMethodOfDelivery  = "CASH";
            OptionsExerciseStyle         = "E";
            TickerSymbol                 = "S50";
            DerivativesTickValue         = "20";
            RcsAssetClass                = "OPT";
            DerivativesTradingStyle      = "E";
            DerivativesContractType      = "7";
            DerivativesPeriodicity       = "Q";
            DerivativesSeriesDescription = "Thailand Futures Exchange SET 50 Index Option";
            TradingSymbol                = dex.NewTIShortName;
            DerivativesFirstTradingDay   = DateTimeConvert(dex.FirstTradeDate.Replace("/", "-"), "yyyy-MM-dd", "dd-MMM-yyyy");
            OptionStub                   = "S50.FX";

            Ric             = SetRic(dex);
            AssetCommonName = string.Format("S50 {0}{1} {2}{3}", expireMonthMMM, expireYearYY, StrikePrice, callOrPut).ToUpper();
            AssetShortName  = AssetCommonName;
        }