Ejemplo n.º 1
0
 public TO_FundingModel GetTransportObject() =>
 new TO_FundingModel
 {
     BuildDate   = BuildDate,
     VolSurfaces = VolSurfaces.ToDictionary(x => x.Key, x => x.Value.GetTransportObject()),
     Curves      = Curves.ToDictionary(x => x.Key, x => x.Value.GetTransportObject()),
     FxMatrix    = ((FxMatrix)FxMatrix).GetTransportObject()
 };
Ejemplo n.º 2
0
        public bool TryGetVolSurface(string name, out IVolSurface volSurface)
        {
            if (VolSurfaces.TryGetValue(name, out volSurface))
            {
                return(true);
            }

            if (TryGetInverseSurface(name, out volSurface))
            {
                return(true);
            }

            volSurface = null;
            return(false);
        }
Ejemplo n.º 3
0
 public IVolSurface GetVolSurface(string name) => VolSurfaces.TryGetValue(name, out var curve) ? curve : throw new Exception($"Surface named {name} not found");
Ejemplo n.º 4
0
        private bool TryGetInverseSurface(string name, out IVolSurface volSurface)
        {
            var inverseName = name.Substring(name.Length - 3, 3) + "/" + name.Substring(0, 3);

            return(VolSurfaces.TryGetValue(inverseName, out volSurface));
        }