Skip to content

Commit

Permalink
added vanillaOption
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaga committed Jun 25, 2020
1 parent 1c4ff2a commit d62ce57
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/instruments/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ Options
Vanilla Options
***************

.. function:: ql.VanillaOption(payoff, europeanExercise)

Payoffs:

- `ql.EuropeanExercise(date)`
- `ql.AmericanExercise(earliestDate, latestDate)`
- `ql.BermudanExercise(dates)`
- `ql.RebatedExercise`

Types:

- `ql.Option.Call`
- `ql.Option.Put`

.. code-block:: python
strike = 100.0
maturity= ql.Date(15,6,2025)
option_type = ql.Option.Call
payoff = ql.PlainVanillaPayoff(option_type, strike)
europeanExercise = ql.EuropeanExercise(maturity)
europeanOption = ql.VanillaOption(payoff, europeanExercise)
americanExercise = ql.AmericanExercise(ql.Date().todaysDate(), maturity)
americanOption = ql.VanillaOption(payoff, americanExercise)
bermudanExercise = ql.BermudanExercise([ql.Date(15,6,2024), ql.Date(15,6,2025)])
bermudanOption = ql.VanillaOption(payoff, bermudanExercise)
Asian Options
*************

Expand Down

0 comments on commit d62ce57

Please sign in to comment.