//-------------------------------------------------------------------------
 public virtual void test_basics()
 {
     assertEquals(VOL_SIMPLE_MONEY_PRICE.ValuationDate, VAL_DATE_TIME.toLocalDate());
     assertEquals(VOL_SIMPLE_MONEY_PRICE.ValuationDateTime, VAL_DATE_TIME);
     assertEquals(VOL_SIMPLE_MONEY_PRICE.Index, EUR_EURIBOR_3M);
     assertEquals(VOL_SIMPLE_MONEY_PRICE.Name, IborFutureOptionVolatilitiesName.of("Price"));
 }
 private IborFutureOptionSensitivity(IborFutureOptionVolatilitiesName volatilitiesName, double expiry, LocalDate fixingDate, double strikePrice, double futurePrice, Currency currency, double sensitivity)
 {
     JodaBeanUtils.notNull(volatilitiesName, "volatilitiesName");
     JodaBeanUtils.notNull(expiry, "expiry");
     JodaBeanUtils.notNull(fixingDate, "fixingDate");
     JodaBeanUtils.notNull(currency, "currency");
     this.volatilitiesName = volatilitiesName;
     this.expiry           = expiry;
     this.fixingDate       = fixingDate;
     this.strikePrice      = strikePrice;
     this.futurePrice      = futurePrice;
     this.currency         = currency;
     this.sensitivity      = sensitivity;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 2100884654:         // volatilitiesName
                    this.volatilitiesName = (IborFutureOptionVolatilitiesName)newValue;
                    break;

                case -1289159373:         // expiry
                    this.expiry = (double?)newValue.Value;
                    break;

                case 1255202043:         // fixingDate
                    this.fixingDate = (LocalDate)newValue;
                    break;

                case 50946231:         // strikePrice
                    this.strikePrice = (double?)newValue.Value;
                    break;

                case -518499002:         // futurePrice
                    this.futurePrice = (double?)newValue.Value;
                    break;

                case 575402001:         // currency
                    this.currency = (Currency)newValue;
                    break;

                case 564403871:         // sensitivity
                    this.sensitivity = (double?)newValue.Value;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains an instance.
 /// </summary>
 /// <param name="volatilitiesName">  the name of the volatilities </param>
 /// <param name="expiry">  the expiry date-time of the option as a year fraction </param>
 /// <param name="fixingDate">  the fixing date of the underlying future </param>
 /// <param name="strikePrice">  the strike price of the option </param>
 /// <param name="futurePrice">  the price of the underlying future </param>
 /// <param name="sensitivityCurrency">  the currency of the sensitivity </param>
 /// <param name="sensitivity">  the value of the sensitivity </param>
 /// <returns> the point sensitivity object </returns>
 public static IborFutureOptionSensitivity of(IborFutureOptionVolatilitiesName volatilitiesName, double expiry, LocalDate fixingDate, double strikePrice, double futurePrice, Currency sensitivityCurrency, double sensitivity)
 {
     return(new IborFutureOptionSensitivity(volatilitiesName, expiry, fixingDate, strikePrice, futurePrice, sensitivityCurrency, sensitivity));
 }
예제 #5
0
 /// <summary>
 /// Obtains an identifier used to find Ibor future option volatilities.
 /// </summary>
 /// <param name="name">  the name </param>
 /// <returns> an identifier for the volatilities </returns>
 public static IborFutureOptionVolatilitiesId of(IborFutureOptionVolatilitiesName name)
 {
     return(new IborFutureOptionVolatilitiesId(name));
 }
예제 #6
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains an identifier used to find Ibor future option volatilities.
 /// </summary>
 /// <param name="name">  the name </param>
 /// <returns> an identifier for the volatilities </returns>
 public static IborFutureOptionVolatilitiesId of(string name)
 {
     return(new IborFutureOptionVolatilitiesId(IborFutureOptionVolatilitiesName.of(name)));
 }
예제 #7
0
 private IborFutureOptionVolatilitiesId(IborFutureOptionVolatilitiesName name)
 {
     JodaBeanUtils.notNull(name, "name");
     this.name = name;
 }