Class EuropeanVanillaOptionFunction
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.tree.EuropeanVanillaOptionFunction
-
- All Implemented Interfaces:
OptionFunction,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class EuropeanVanillaOptionFunction extends Object implements OptionFunction, org.joda.beans.ImmutableBean, Serializable
European vanilla option function.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEuropeanVanillaOptionFunction.MetaThe meta-bean forEuropeanVanillaOptionFunction.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetNumberOfSteps()Gets the number of time steps.DoubleArraygetPayoffAtExpiryTrinomial(DoubleArray stateValue)Computes payoff at expiry for trinomial tree.doublegetSign()Gets the sign.doublegetStrike()Gets the strike value.doublegetTimeToExpiry()Gets the time to expiry.inthashCode()static EuropeanVanillaOptionFunction.Metameta()The meta-bean forEuropeanVanillaOptionFunction.EuropeanVanillaOptionFunction.MetametaBean()static EuropeanVanillaOptionFunctionof(double strike, double timeToExpiry, PutCall putCall, int numberOfSteps)Obtains an instance.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.pricer.impl.tree.OptionFunction
getNextOptionValues, getNextOptionValues, getPayoffAtExpiryTrinomial
-
-
-
-
Method Detail
-
of
public static EuropeanVanillaOptionFunction of(double strike, double timeToExpiry, PutCall putCall, int numberOfSteps)
Obtains an instance.- Parameters:
strike- the striketimeToExpiry- the time to expiryputCall- put or callnumberOfSteps- the number of time steps- Returns:
- the instance
-
getPayoffAtExpiryTrinomial
public DoubleArray getPayoffAtExpiryTrinomial(DoubleArray stateValue)
Description copied from interface:OptionFunctionComputes payoff at expiry for trinomial tree.The payoff values for individual nodes at expiry are computed from state values at the final layer. For example, the state values represent underlying prices of an option at respective nodes.
- Specified by:
getPayoffAtExpiryTrinomialin interfaceOptionFunction- Parameters:
stateValue- the state values- Returns:
- the payoff at expiry
-
meta
public static EuropeanVanillaOptionFunction.Meta meta()
The meta-bean forEuropeanVanillaOptionFunction.- Returns:
- the meta-bean, not null
-
metaBean
public EuropeanVanillaOptionFunction.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getStrike
public double getStrike()
Gets the strike value.- Returns:
- the value of the property
-
getTimeToExpiry
public double getTimeToExpiry()
Gets the time to expiry.- Specified by:
getTimeToExpiryin interfaceOptionFunction- Returns:
- the value of the property
-
getSign
public double getSign()
Gets the sign.The sign is +1 for call and -1 for put.
- Returns:
- the value of the property
-
getNumberOfSteps
public int getNumberOfSteps()
Gets the number of time steps.- Specified by:
getNumberOfStepsin interfaceOptionFunction- Returns:
- the value of the property
-
-