public class BlackBarrierPriceFormulaRepository extends Object
Constructor and Description |
---|
BlackBarrierPriceFormulaRepository() |
Modifier and Type | Method and Description |
---|---|
double |
price(double spot,
double strike,
double timeToExpiry,
double costOfCarry,
double rate,
double lognormalVol,
boolean isCall,
SimpleConstantContinuousBarrier barrier)
Computes the price of a barrier option.
|
ValueDerivatives |
priceAdjoint(double spot,
double strike,
double timeToExpiry,
double costOfCarry,
double rate,
double lognormalVol,
boolean isCall,
SimpleConstantContinuousBarrier barrier)
Computes the price and derivatives of a barrier option.
|
public double price(double spot, double strike, double timeToExpiry, double costOfCarry, double rate, double lognormalVol, boolean isCall, SimpleConstantContinuousBarrier barrier)
spot
- the spotstrike
- the striketimeToExpiry
- the time to expirycostOfCarry
- the cost of carryrate
- the interest ratelognormalVol
- the lognormal volatilityisCall
- true if call, false otherwisebarrier
- the barrierpublic ValueDerivatives priceAdjoint(double spot, double strike, double timeToExpiry, double costOfCarry, double rate, double lognormalVol, boolean isCall, SimpleConstantContinuousBarrier barrier)
spot
- the spotstrike
- the striketimeToExpiry
- the time to expirycostOfCarry
- the cost of carryrate
- the interest ratelognormalVol
- the lognormal volatilityisCall
- true if call, false otherwisebarrier
- the barrierCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.