コード例 #1
0
ファイル: BondFutureTrade.java プロジェクト: Rowmance/Strata
 /**
  * Creates an instance.
  *
  * @param info the value of the property
  * @param product the value of the property, not null
  * @param quantity the value of the property
  * @param price the value of the property
  */
 BondFutureTrade(TradeInfo info, BondFuture product, double quantity, double price) {
   JodaBeanUtils.notNull(product, "product");
   ArgChecker.notNegative(price, "price");
   this.info = info;
   this.product = product;
   this.quantity = quantity;
   this.price = price;
 }
コード例 #2
0
 private OvernightCompoundedRateObservation(
     OvernightIndex index, LocalDate startDate, LocalDate endDate, int rateCutOffDays) {
   JodaBeanUtils.notNull(index, "index");
   JodaBeanUtils.notNull(startDate, "startDate");
   JodaBeanUtils.notNull(endDate, "endDate");
   ArgChecker.notNegative(rateCutOffDays, "rateCutOffDays");
   this.index = index;
   this.startDate = startDate;
   this.endDate = endDate;
   this.rateCutOffDays = rateCutOffDays;
   validate();
 }
コード例 #3
0
 /**
  * The Step-in (Protection Effective Date or sometimes just Effective Date) is usually T+1. This
  * is when protection (and risk) starts in terms of the model.
  *
  * @param stepIn Zero or more days (after trade day)
  * @return A new factory with the step-in days set.
  */
 public CdsAnalyticFactory withStepIn(int stepIn) {
   ArgChecker.notNegative(stepIn, "stepIn");
   return new CdsAnalyticFactory(
       stepIn,
       _cashSettle,
       _payAccOnDefault,
       _couponInterval,
       _stubType,
       _protectStart,
       _recoveryRate,
       _businessdayAdjustmentConvention,
       _calendar,
       _accrualDayCount,
       _curveDayCount);
 }
コード例 #4
0
 /**
  * Sets the number of business days before the end of the period that the rate is cut off.
  *
  * <p>When a rate cut-off applies, the final daily rate is determined this number of days before
  * the end of the period, with any subsequent days having the same rate.
  *
  * <p>The amount must be zero or positive. A value of zero or one will have no effect on the
  * standard calculation. The fixing holiday calendar of the index is used to determine business
  * days.
  *
  * <p>For example, a value of {@code 3} means that the rate observed on {@code (periodEndDate -
  * 3 business days)} is also to be used on {@code (periodEndDate - 2 business days)} and {@code
  * (periodEndDate - 1 business day)}.
  *
  * <p>If there are multiple accrual periods in the payment period, then this should typically
  * only be non-zero in the last accrual period.
  *
  * @param rateCutOffDays the new value
  * @return this, for chaining, not null
  */
 public Builder rateCutOffDays(int rateCutOffDays) {
   ArgChecker.notNegative(rateCutOffDays, "rateCutOffDays");
   this.rateCutOffDays = rateCutOffDays;
   return this;
 }
コード例 #5
0
ファイル: BondFutureTrade.java プロジェクト: Rowmance/Strata
 /**
  * Sets the price that was traded, in decimal form.
  *
  * <p>This is the price agreed when the trade occurred.
  *
  * @param price the new value
  * @return this, for chaining, not null
  */
 public Builder price(double price) {
   ArgChecker.notNegative(price, "price");
   this.price = price;
   return this;
 }