Exemple #1
0
        public Date ImpliedExpiryDate(IOption option, IMarketCondition market, double targetPremium)
        {
            var timeIncrement = AnalyticalOptionPricerUtil.optionTimeToMaturityIncrement(option);
            var calculator    = ConfigureCalculator(option, market, timeIncrement: timeIncrement);

            return(calculator.SolveExpiryDate(targetPremium));
        }
Exemple #2
0
        public double ImpliedVolFromPremium(double targetPremium,
                                            VanillaOption option, MarketCondition market)
        {
            var timeIncrement = AnalyticalOptionPricerUtil.optionTimeToMaturityIncrement(option);
            var calculator    = ConfigureCalculator(option, market, timeIncrement: timeIncrement);

            return(calculator.SolveVol(targetPremium));
        }