Barrier options
Barrier options are pathdependent options, with payoffs that depend on the price of the underlying asset at expiration and whether or not the asset price crosses a barrier during the life of the option. There are two categories or types of Barrier options: "knockin" and "knockout". "Knockin" or "in" options are paid for up front, but you do not receive the option until the asset price crosses the barrier. "Knockout" or "out" options come into existence on the issue date but becomes worthless if the asset price hits the barrier before the expiration date. If the option is a knockin (knockout), a predetermined cash rebate may be paid at expiration if the option has not been knocked in (knockedout) during its lifetime. The barrier monitoring frequency specifies how often the price is checked for a breach of the barrier. All of the analytical models have a flag to change the monitoring frequency where the default frequency is continuous.
Barrier option functions:
Single Barrier 
There are four types of single barrier options: downandin, upandin, downandout and upandout. A downandin option comes into existence and knockedin only if the asset price falls to the barrier level. An upand in option comes into existence and knockedin only if the asset price rises to the barrier level. A downandout option comes into existence and knockedout only if the asset price falls to the barrier level. An upandin option comes into existence and knockedout only if the asset price rises to the barrier level. European single barrier options can be priced analytically using a model introduced by Reiner and Rubinstein (1991). A trinomial lattice is used for the numerical calculation of an American or European style single barrier options. The FinOptions functions BarrierSingle and BarrierSingleTri can be used to evaluate single barrier options with European or American exercise types, respectively. 


Double Barrier 
A double barrier option is either knocked in or knocked out if the asset price touches the lower or upper barrier during its lifetime. Once a barrier is crossed, the option comes into existence if it is a knockin barrier or becomes worthless if it is a knocked out barrier. Double barrier options can be priced analytically using a model introduced by Ikeda and Kunitomo (1992). The FinOptions function BarrierDouble can be used to evaluate European double barrier options. 


Lookback Barrier 
A lookbarrier option is the combination of a forward starting fixed strike Lookback option and a partial time barrier option. The option’s barrier monitoring period starts at time zero and ends at an arbitrary date before expiration. If the barrier is not triggered during this period, the fixed strike Lookback option will be kick off at the end of the barrier tenor. Lookback barrier options can be priced analytically using a model introduced by Bermin (1996). The FinOptions function BarrierLookback can be used to evaluate European lookbarrier options. 


Partialtime Barrier 
For single asset partialtime barrier options, the monitoring period for a barrier crossing is confined to only a fraction of the option’s lifetime. There are two types of partialtime barrier options: partialtimestart and partialtimeend. Partialtimestart barrier options have the monitoring period start at time zero and end at an arbitrary date before expiration. Partialtimeend barrier options have the monitoring period start at an arbitrary date before expiration and end at expiration. Partialtimeend barrier options are then broken down again into two categories: B1 and B2. Type B1 is defined such that only a barrier hit or crossed causes the option to be knocked out. There is no difference between up and down options. Type B2 options are defined such that a downandout call is knocked out as soon as the underlying price is below the barrier. Similarly, an upandout call is knocked out as soon as the underlying price is above the barrier.[1] Partialtime barrier options can be priced analytically using a model introduced by Heynen and Kat (1994). The FinOptions has two functions to evaluate European partialtime barrier options: BarrierPartialStart and BarrierPartialEnd. 


Soft Barrier 
A softbarrier option is similar to a standard barrier option, except that the barrier is no longer a single level. Rather, it is a soft range between a lower level and an upper level. Softbarrier options are knocked in or knocked out proportionally. Introduced by Hart and Ross (1994), the valuation formula can be used to price softdownandin call and softupandin put options. The value of the related "out" option can be determined by subtracting the "in" option value from the value of a standard plain option. Softbarrier options can be priced analytically using a model introduced by Hart and Ross (1994). The FinOptions function BarrierSoft can be used to evaluate European softbarrier options. 


Partialtime Twoasset 
Partialtime twoasset barrier options are similar to standard twoasset barrier options, except that the barrier hits are monitored only for a fraction of the option's lifetime. The option is knocked in or knocked out is Asset 2 hits the barrier during the monitoring period. The payoff depends on Asset 1 and the strike price. Partialtime twoasset barrier options can be priced analytically using a model introduced by Bermin (1996). The FinOptions function BarrierPartialTA can be used to evaluate European partialtime twoasset barrier options. 


Twoasset Barrier 
The underlying asset, Asset 1, determines how much the option is in or outofthemoney. The other asset, Asset 2, is the trigger asset that is linked to barrier hits. Twoasset barrier options can be priced analytically using a model introduced by Heynen and Kat (1994). The FinOptions function BarrierTwoAsset can be used to evaluate European twoasset barrier options. 
The BarrierSingle function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of a European single barrier option using Reiner and Rubinstein’s model. This function evaluates upandin, downandin, upandout, and downandout barrier options for both calls and puts.
The BarrierSingleTri function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of an American or European style single barrier option a trinomial lattice model. This function evaluates upandin, downandin, upandout, and downandout barrier options for both calls and puts.
The BarrierDouble function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of a European double barrier option using Ikeda and Kunitomo’s model. This function evaluates knockout and knockin double barrier options for both calls and puts.
The BarrierLookback function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of a European Lookback barrier option using Bermin’s model. This function evaluates upandin and upandout calls as well as downandin and downandout puts.
The BarrierPartialStart function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of a European Partialtimestart barrier option using Heynen and Kat’s model. This function evaluates upandin, downandin, upandout, and downandout barrier options for both calls and puts.
The BarrierPartialEnd function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of a European Partialtimeend barrier option using Heynen and Kat’s model. This function evaluates onetouch, upandin, downandin, upandout, downandout barrier options for both calls and puts.
The BarrierSoft function calculates the theoretical price, sensitivities, the implied volatility, and the implied strike value of a European soft barrier option using a Hart and Ross model. This function evaluates DownandIn and DownandOut calls as well as UpandIn and UpandOut puts.
The BarrierPartialTA function calculates the theoretical price, sensitivities, the implied volatility, the implied strike, and the implied correlation value of a European partialtime twoasset barrier option using Bermin’s model. This function evaluates upandin, downandin, upandout, and downandout barrier options for both calls and puts.
The BarrierTwoAsset function calculates the theoretical price, sensitivities, the implied volatility, the implied strike and the implied correlation value of a European twoasset barrier option using Heynen and Kat’s model. This function evaluates upandin, downandin, upandout, and downandout barrier options for both calls and puts.
References
[1] Haug E.G., The complete guide to option pricing formulas, 1998, McGrawHill