Exemplo n.º 1
0
        public override SortedDictionary <double, double> StripYieldCurve(IborCurve iborCurve)
        {
            if (_yieldCurvePoints != null)
            {
                return(_yieldCurvePoints);
            }

            _yieldCurvePoints = new SortedDictionary <double, double>();

            double rate;

            foreach (var item in _curvePoints)
            {
                rate = Math.Log(1 + item.Value * item.Key) / item.Key;
                _yieldCurvePoints.Add(item.Key, rate);
            }

            return(_yieldCurvePoints);
        }
Exemplo n.º 2
0
        public override SortedDictionary <double, double> StripYieldCurve(IborCurve iborCurve)
        {
            _yieldCurvePoints = new SortedDictionary <double, double>();

            double P_t_TN;
            double sum = 0;
            double level;
            double swapRate;

            foreach (var item in _curvePoints)
            {
                level    = item.Key;
                swapRate = item.Value;

                //sum += _Tenor * iborCurve.GetRate(x) * swapRate;

                double yield = (1 - sum) / (1 + swapRate * _Tenor);

                _yieldCurvePoints.Add(level, yield);
            }

            return(_yieldCurvePoints);
        }
Exemplo n.º 3
0
 public override SortedDictionary <double, double> StripYieldCurve(IborCurve iborCurve)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public abstract SortedDictionary <double, double> StripYieldCurve(IborCurve iborCurve);