public BondOptionStrike(XmlNode xmlNode)
 {
     XmlNodeList referenceSwapCurveNodeList = xmlNode.SelectNodes("referenceSwapCurve");
     if (referenceSwapCurveNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceSwapCurveNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceSwapCurveIDRef = item.Attributes["id"].Name;
                 ReferenceSwapCurve ob = ReferenceSwapCurve();
                 IDManager.SetID(referenceSwapCurveIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceSwapCurveIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceSwapCurve = new ReferenceSwapCurve(item);
             }
         }
     }
     
 
     XmlNodeList priceNodeList = xmlNode.SelectNodes("price");
     if (priceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceIDRef = item.Attributes["id"].Name;
                 OptionStrike ob = OptionStrike();
                 IDManager.SetID(priceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 price = new OptionStrike(item);
             }
         }
     }
     
 
 }
 public StrikeSpread(XmlNode xmlNode)
 {
     XmlNodeList upperStrikeNodeList = xmlNode.SelectNodes("upperStrike");
     if (upperStrikeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in upperStrikeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 upperStrikeIDRef = item.Attributes["id"].Name;
                 OptionStrike ob = OptionStrike();
                 IDManager.SetID(upperStrikeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 upperStrikeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 upperStrike = new OptionStrike(item);
             }
         }
     }
     
 
     XmlNodeList upperStrikeNumberOfOptionsNodeList = xmlNode.SelectNodes("upperStrikeNumberOfOptions");
     if (upperStrikeNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in upperStrikeNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 upperStrikeNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(upperStrikeNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 upperStrikeNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 upperStrikeNumberOfOptions = new PositiveDecimal(item);
             }
         }
     }
     
 
 }
 public StrikeSpread(XmlNode xmlNode)
 {
     XmlNode upperStrikeNode = xmlNode.SelectSingleNode("upperStrike");
     
     if (upperStrikeNode != null)
     {
         if (upperStrikeNode.Attributes["href"] != null || upperStrikeNode.Attributes["id"] != null) 
         {
             if (upperStrikeNode.Attributes["id"] != null) 
             {
                 upperStrikeIDRef_ = upperStrikeNode.Attributes["id"].Value;
                 OptionStrike ob = new OptionStrike(upperStrikeNode);
                 IDManager.SetID(upperStrikeIDRef_, ob);
             }
             else if (upperStrikeNode.Attributes["href"] != null)
             {
                 upperStrikeIDRef_ = upperStrikeNode.Attributes["href"].Value;
             }
             else
             {
                 upperStrike_ = new OptionStrike(upperStrikeNode);
             }
         }
         else
         {
             upperStrike_ = new OptionStrike(upperStrikeNode);
         }
     }
     
 
     XmlNode upperStrikeNumberOfOptionsNode = xmlNode.SelectSingleNode("upperStrikeNumberOfOptions");
     
     if (upperStrikeNumberOfOptionsNode != null)
     {
         if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null || upperStrikeNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (upperStrikeNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                 IDManager.SetID(upperStrikeNumberOfOptionsIDRef_, ob);
             }
             else if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null)
             {
                 upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
             }
         }
         else
         {
             upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
         }
     }
     
 
 }
예제 #4
0
        public StrikeSpread(XmlNode xmlNode)
        {
            XmlNodeList upperStrikeNodeList = xmlNode.SelectNodes("upperStrike");

            if (upperStrikeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in upperStrikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        upperStrikeIDRef = item.Attributes["id"].Name;
                        OptionStrike ob = OptionStrike();
                        IDManager.SetID(upperStrikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        upperStrikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        upperStrike = new OptionStrike(item);
                    }
                }
            }


            XmlNodeList upperStrikeNumberOfOptionsNodeList = xmlNode.SelectNodes("upperStrikeNumberOfOptions");

            if (upperStrikeNumberOfOptionsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in upperStrikeNumberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        upperStrikeNumberOfOptionsIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(upperStrikeNumberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        upperStrikeNumberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        upperStrikeNumberOfOptions = new PositiveDecimal(item);
                    }
                }
            }
        }
 public BondOptionStrike(XmlNode xmlNode)
 {
     XmlNode referenceSwapCurveNode = xmlNode.SelectSingleNode("referenceSwapCurve");
     
     if (referenceSwapCurveNode != null)
     {
         if (referenceSwapCurveNode.Attributes["href"] != null || referenceSwapCurveNode.Attributes["id"] != null) 
         {
             if (referenceSwapCurveNode.Attributes["id"] != null) 
             {
                 referenceSwapCurveIDRef_ = referenceSwapCurveNode.Attributes["id"].Value;
                 ReferenceSwapCurve ob = new ReferenceSwapCurve(referenceSwapCurveNode);
                 IDManager.SetID(referenceSwapCurveIDRef_, ob);
             }
             else if (referenceSwapCurveNode.Attributes["href"] != null)
             {
                 referenceSwapCurveIDRef_ = referenceSwapCurveNode.Attributes["href"].Value;
             }
             else
             {
                 referenceSwapCurve_ = new ReferenceSwapCurve(referenceSwapCurveNode);
             }
         }
         else
         {
             referenceSwapCurve_ = new ReferenceSwapCurve(referenceSwapCurveNode);
         }
     }
     
 
     XmlNode priceNode = xmlNode.SelectSingleNode("price");
     
     if (priceNode != null)
     {
         if (priceNode.Attributes["href"] != null || priceNode.Attributes["id"] != null) 
         {
             if (priceNode.Attributes["id"] != null) 
             {
                 priceIDRef_ = priceNode.Attributes["id"].Value;
                 OptionStrike ob = new OptionStrike(priceNode);
                 IDManager.SetID(priceIDRef_, ob);
             }
             else if (priceNode.Attributes["href"] != null)
             {
                 priceIDRef_ = priceNode.Attributes["href"].Value;
             }
             else
             {
                 price_ = new OptionStrike(priceNode);
             }
         }
         else
         {
             price_ = new OptionStrike(priceNode);
         }
     }
     
 
 }
예제 #6
0
        public BondOptionStrike(XmlNode xmlNode)
        {
            XmlNodeList referenceSwapCurveNodeList = xmlNode.SelectNodes("referenceSwapCurve");

            if (referenceSwapCurveNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in referenceSwapCurveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referenceSwapCurveIDRef = item.Attributes["id"].Name;
                        ReferenceSwapCurve ob = ReferenceSwapCurve();
                        IDManager.SetID(referenceSwapCurveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referenceSwapCurveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referenceSwapCurve = new ReferenceSwapCurve(item);
                    }
                }
            }


            XmlNodeList priceNodeList = xmlNode.SelectNodes("price");

            if (priceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in priceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        priceIDRef = item.Attributes["id"].Name;
                        OptionStrike ob = OptionStrike();
                        IDManager.SetID(priceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        priceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        price = new OptionStrike(item);
                    }
                }
            }
        }
        public BondOptionStrike(XmlNode xmlNode)
        {
            XmlNode referenceSwapCurveNode = xmlNode.SelectSingleNode("referenceSwapCurve");

            if (referenceSwapCurveNode != null)
            {
                if (referenceSwapCurveNode.Attributes["href"] != null || referenceSwapCurveNode.Attributes["id"] != null)
                {
                    if (referenceSwapCurveNode.Attributes["id"] != null)
                    {
                        referenceSwapCurveIDRef_ = referenceSwapCurveNode.Attributes["id"].Value;
                        ReferenceSwapCurve ob = new ReferenceSwapCurve(referenceSwapCurveNode);
                        IDManager.SetID(referenceSwapCurveIDRef_, ob);
                    }
                    else if (referenceSwapCurveNode.Attributes["href"] != null)
                    {
                        referenceSwapCurveIDRef_ = referenceSwapCurveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceSwapCurve_ = new ReferenceSwapCurve(referenceSwapCurveNode);
                    }
                }
                else
                {
                    referenceSwapCurve_ = new ReferenceSwapCurve(referenceSwapCurveNode);
                }
            }


            XmlNode priceNode = xmlNode.SelectSingleNode("price");

            if (priceNode != null)
            {
                if (priceNode.Attributes["href"] != null || priceNode.Attributes["id"] != null)
                {
                    if (priceNode.Attributes["id"] != null)
                    {
                        priceIDRef_ = priceNode.Attributes["id"].Value;
                        OptionStrike ob = new OptionStrike(priceNode);
                        IDManager.SetID(priceIDRef_, ob);
                    }
                    else if (priceNode.Attributes["href"] != null)
                    {
                        priceIDRef_ = priceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        price_ = new OptionStrike(priceNode);
                    }
                }
                else
                {
                    price_ = new OptionStrike(priceNode);
                }
            }
        }
예제 #8
0
        public StrikeSpread(XmlNode xmlNode)
        {
            XmlNode upperStrikeNode = xmlNode.SelectSingleNode("upperStrike");

            if (upperStrikeNode != null)
            {
                if (upperStrikeNode.Attributes["href"] != null || upperStrikeNode.Attributes["id"] != null)
                {
                    if (upperStrikeNode.Attributes["id"] != null)
                    {
                        upperStrikeIDRef_ = upperStrikeNode.Attributes["id"].Value;
                        OptionStrike ob = new OptionStrike(upperStrikeNode);
                        IDManager.SetID(upperStrikeIDRef_, ob);
                    }
                    else if (upperStrikeNode.Attributes["href"] != null)
                    {
                        upperStrikeIDRef_ = upperStrikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        upperStrike_ = new OptionStrike(upperStrikeNode);
                    }
                }
                else
                {
                    upperStrike_ = new OptionStrike(upperStrikeNode);
                }
            }


            XmlNode upperStrikeNumberOfOptionsNode = xmlNode.SelectSingleNode("upperStrikeNumberOfOptions");

            if (upperStrikeNumberOfOptionsNode != null)
            {
                if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null || upperStrikeNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (upperStrikeNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                        IDManager.SetID(upperStrikeNumberOfOptionsIDRef_, ob);
                    }
                    else if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                    }
                }
                else
                {
                    upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                }
            }
        }