BarrierOption Class Reference

### A free/open-source library for quantitative finance

Classes | Public Member Functions | Protected Attributes
BarrierOption Class Reference
Financial instruments

Barrier option on a single asset. More...

`#include <ql/instruments/barrieroption.hpp>`

Inheritance diagram for BarrierOption:
[legend]

List of all members.

## Classes
class | arguments
| Arguments for barrier option calculation More...
class | engine
| Barrier-option engine base class More...
## Public Member Functions
| BarrierOption (Barrier::Type barrierType, Real barrier, Real rebate, const boost::shared_ptr< StrikedTypePayoff > &payoff, const boost::shared_ptr< Exercise > &exercise)
void | setupArguments (PricingEngine::arguments *) const
Volatility | impliedVolatility (Real price, const boost::shared_ptr< GeneralizedBlackScholesProcess > &process, Real accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7, Volatility maxVol=4.0) const
## Protected Attributes
Barrier::Type | barrierType_
Real | barrier_
Real | rebate_

## Detailed Description

Barrier option on a single asset.

The analytic pricing engine will be used if none if passed.

Examples:
  Replication.cpp.

## Member Function Documentation

void setupArguments | ( | PricingEngine::arguments * |  | ) | const`[virtual]`

When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.

Reimplemented from Option.

Reimplemented in DividendBarrierOption.

Volatility impliedVolatility | ( | Real | price,
|  | const boost::shared_ptr< GeneralizedBlackScholesProcess > & | process,
|  | Real | accuracy = `1.0e-4`,
|  | Size | maxEvaluations = `100`,
|  | Volatility | minVol = `1.0e-7`,
|  | Volatility | maxVol = `4.0`
| ) |  | const

Warning:
  see VanillaOption for notes on implied-volatility calculation.