Exemplo n.º 1
0
        public virtual IVolSurface BumpMaturityStrikePoint(int indexMaturity, int indexStrike, double volChange)
        {
            var newMatrix = ValueOnGrids.Clone() as double[, ];

            //newMatrix[indexStrike, indexMaturity] += volChange; // note axis1 and 2 are corresponding to matrix dimension 2 and 1 respectively.
            newMatrix[indexMaturity, indexStrike] += volChange;

            return(new ImpliedVolSurface(_valuationDate, RowGrid, ColGrid, newMatrix, _interp, dcConvention: _dcConvention, volSurfaceType: _surfType));
        }
Exemplo n.º 2
0
        public virtual IVolSurface BumpMaturitySlice(int index, double volChange)
        {
            var newMatrix = ValueOnGrids.Clone() as double[, ];

            for (var i = 0; i < ColGrid.Length; i++)
            {
                //newMatrix[i, index] += volChange;		// note axis1 and 2 are corresponding to matrix dimension 2 and 1 respectively.
                newMatrix[index, i] += volChange;
            }
            return(new ImpliedVolSurface(_valuationDate, RowGrid, ColGrid, newMatrix, _interp, dcConvention: _dcConvention, volSurfaceType: _surfType));
        }
Exemplo n.º 3
0
        public virtual IVolSurface BumpVolSurf(double volChange)
        {
            var newMatrix = ValueOnGrids.Clone() as double[, ];

            for (var i = 0; i < RowGrid.Length; ++i)
            {
                for (var j = 0; j < ColGrid.Length; ++j)
                {
                    newMatrix[i, j] += volChange;
                }
            }
            return(new ImpliedVolSurface(_valuationDate, RowGrid, ColGrid, newMatrix, _interp, dcConvention: _dcConvention, volSurfaceType: _surfType));
        }