public Option(double currentPrice, double riskFreeRate, int expirationPeriods, double u, double d, double qu, PutCallType putCallType, AmericanEuropeanType americanEuropeanType) { this.currentPrice = currentPrice; this.riskFreeRate = riskFreeRate; this.expirationPeriods = expirationPeriods; this.u = u; this.d = d; this.qu = qu; this.qd = 1 - qu; this.putCallType = putCallType; this.americanEuropeanType = americanEuropeanType; }
private AmericanEuropeanType americanEuropeanType; // American/european public ZeroCouponBondOption(double rate, double u, double d, double qu, int expirationPeriods, double strike, PutCallType putCallType, AmericanEuropeanType americanEuropeanType) { this.zcb = new ZeroCouponBond(rate, u, d, qu); this.rate = rate; this.u = u; this.d = d; this.qu = qu; this.qd = 1 - qu; this.expirationPeriods = expirationPeriods; this.strike = strike; this.putCallType = putCallType; this.americanEuropeanType = americanEuropeanType; }