Models Category Group




Welcome | Documentation format | QuantTools Groups | QuantTools Categories | Licence

Key TAGs | Excel Index | API Index


http://www.QuantTools.com


  1. CapeTools LMM Volatility/Correlation Models


    General Description

    Functions to create correlation and volatility models used by the Libor Market Model (LMM) LiborMarketModel() and LiborMarketModel() functions.

    The correlation Model objects that can be created are :

    • LMMLinearExpCorrModel() (Exponential correlation model - rho{i,j}=e^{(-beta*abs(i-j))})
    • LMMFixedVolModel() (Extended exponential correlation model - rho{i,j}=rho+(1-rho)*e^{(-beta*abs(i-j))})


    The volatility Model objects that can be created are :

    • LMMLinearExpVolModel() (Linear exponential volatility model - sigma(t)=((a*(T{i}-t)+d)*exp{-b(T{i}-t)}+c))
    • LMMLinearExpVolModel2() (Extended linear-exponential volatility model - sigma(t)=k_i*((a*(T{i}-t)+d)*exp{-b(T{i}-t)}+c))
    • LMMFixedVolModel() (Constant volatilities)


    There are also two LMM process functions to be used for the LMM montecarlo framework.


  2. CapeTools Models


    General Description

    Functions to create interest rate model objects that can be calibrated via the various interest rate calibration functions present within the 'CapeTools Calibration' category of functions. The interest rate Model objects that can be created are :

    • BlackModel() ( Black's Option Formula : can be passed to the BlackCapFloorEngine() or the BlackSwaptionEngine() objects)
    • G2TwoFactorModel() (Two factor additive ShortRate Model)
    • HullWhite1FModel() (Single-factor Hull-White (extended Vasicek) ShortRate Model object)
    • BK1FModel() (Single-factor BlackKarasinski ShortRate Model object)
    • Vasicek1FModel() (Single-factor Vasicek ShortRate Model object)
    • LiborMarketModel() (Forward Libor Market Model object)



  3. CapeTools Payoff


    General Description

    Functions to price option products under a pricing engine framework.

    To price a single product under this framework, you require 5 objects to be constructed. These are :

    1. A pricing engine object
    2. An exercise object
    3. A payoff object
    4. One or more process objects
    5. A pricer object


    The pricing engine object specifies the method of calculation (Tree, MC, direct, integration etc...).

    The exercise object specifies the date(s) that exercise can take place.

    The payoff object specifies the payoff function.

    The process object(s) specifies the characteristics of the underlyer(s) whether Equity, FX or Commodity.

    The pricer object takes in the Engine, Exercise, Payoff and Process objects and compute a price.


    This category of contains the Payoff objects that are to be passed to option pricing functions (see the 'CapeTools EngineOptions' category of functions). The following Payoff types can be constructed :

    • PlainVanilla() ( For a call max(price-strike,0.0), for a put max(strike-price,0.0) )
    • PercentageStrike() ( Strike expressed as a percentage. For a call, price*max(1-moneyness,0.0), for a put, price*max(moneyness-1,0.0) )
    • CashOrNothing() ( Binary cash-or-nothing payoff. For a call, if(price-strike is greater than 0.0 , cashPayoff , 0.0), for a put, if(strike-price is greater than 0.0 , cashPayoff , 0.0) )
    • AssetOrNothingPayoff() ( Binary asset-or-nothing payoff. For a call, if(price-strike is greater than 0.0 , price , 0.0), for a put, if(strike-price is greater than 0.0 , price , 0.0) )
    • Gap() ( Binary gap payoff. For a call, if(price-strike is greater than 0.0 , price-strikePayoff , 0.0), for a put, if(strike-price is greater than 0.0 , strikePayoff-price , 0.0) )
    • Gap() ( Binary gap payoff. For a call, if(price-strike is greater than 0.0 , price-strikePayoff , 0.0), for a put, if(strike-price is greater than 0.0 , strikePayoff-price , 0.0) )


    You can also create a generic payoff function via the following function :

    • GenericPayOff()


    The custom Generic PayOff function takes one underlyer (x) and up to 16 constant arguments (strike being one of them). x represents the underlying price (stock, FX Rate etc...) and will be populated during the pricing. Parameters 'a' through 'n' are the user defined constants. The constant e is predefined as 2.718281828459045235360287; the constant pi is predefined as 3.141592653589793238462643.

    Within this function you define both the 'call' and 'put' formulas and then indicate which one is to be priced. (ie callFormula=max(x-strike,a+b*c), putFormula=max(strike-x,a+b*c) )

    Valid functions and operators that can be used within the payoff expressions are :

    Predefined functions (case sensitive) :

    • sin(x) ( sine function )
    • cos(x) ( cosine function )
    • tan(x) ( tangens function )
    • asin(x) ( arcus sine function )
    • acos(x) ( arcus cosine function )
    • atan(x) ( arcus tangens function )
    • sinh(x) ( hyperbolic sine function )
    • cosh(x) ( hyperbolic cosine function )
    • tanh(x) ( hyperbolic tangens function )
    • asinh(x) ( hyperbolic arcus sine function )
    • acosh(x) ( hyperbolic arcus cosine function )
    • atanh(x) ( hyperbolic arcur tangens function )
    • log2(x) ( logarithm to the base 2 )
    • log10(x) ( logarithm to the base 10 )
    • log(x) ( logarithm to the base 10 )
    • ln(x) ( logarithm to the base e (2.71828...)
    • exp(x) ( e raised to the power of x )
    • sqrt(x) ( square root of a value )
    • sign(x) ( sign function ) -1=(if x<0), 1=(if x>0 )
    • rint(x) ( round to nearest integer )
    • abs(x) ( absolute value )
    • min(a,b,c,d,e,...) ( min of all arguments ie - min(-2,1,5,-6) )
    • max(a,b,c,d,e,...) ( max of all arguments ie - max(-2,1,5,-6) )
    • sum(a,b,c,d,e,...) ( sum of all arguments ie - sum(-2,1,5,-6) )
    • avg(a,b,c,d,e,...) ( mean value of all arguments ie - avg(-2,1,5,-6) )
    • ite(x,y,z) ( if ... then ... else ... : ie - ite(a<b, 5.0, -3.0) )


    Predefined operators :

    • + ( addition )
    • - ( subtraction )
    • * ( multiplication )
    • / ( division )
    • ^ ( raise x to the power of y )


    Predefined operators that can be used within the first parameter of the ite() or iff() function :

    • and ( logical and )
    • or ( logical or )
    • <= ( less or equal )
    • >= ( greater or equal )
    • != ( not equal )
    • == ( equal to )
    • > ( greater than )
    • < ( less than )

    • Brackets, '(' and ')', can also be used to simplify expressions.

  4. CapeTools Exercise


    General Description

    Functions to price option products under a pricing engine framework.

    To price a single product under this framework, you require 5 objects to be constructed. These are :

    1. A pricing engine object
    2. An exercise object
    3. A payoff object
    4. One or more process objects
    5. A pricer object


    The pricing engine object specifies the method of calculation (Tree, MC, direct, integration etc...).

    The exercise object specifies the date(s) that exercise can take place.

    The payoff object specifies the payoff function.

    The process object(s) specifies the characteristics of the underlyer(s) whether Equity, FX or Commodity.

    The pricer object takes in the Engine, Exercise, Payoff and Process objects and compute a price.


    This category of contains the Exercise objects that are to be passed to option pricing functions (see the 'CapeTools EngineOptions' category of functions). The following Exercise types can be constructed.

    • EuropeanExercise()
    • BermudanExercise()
    • AmericanExercise()


    You can also create Bermudan exercise objects from interest rate leg, Schedule, Swap and Bond objects via the following functions.

    • ExerciseFromLeg()
    • ExerciseFromSche()
    • ExerciseFromSW()
    • ExerciseFromFIXBND()


    To display the dates stored within an Exercise object, you can execute the following function :

    • DisplayExerciseDates() ( For the American Exercise object, only the starting and ending dates will be shown)



Copyright (c) 2003-2007 CapeTools - All Rights Reserved.