Skip to content

Commit

Permalink
corrects helper constructor. Fixes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaga committed Dec 5, 2023
1 parent 4c77a20 commit 7b53673
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/helpers/inflation.rst
Expand Up @@ -5,18 +5,21 @@ Inflation
ZeroCouponInflationSwapHelper
-----------------------------

.. function:: ql.ZeroCouponInflationSwapHelper(quote, period, date, calendar, convention, daycounter, index)

.. function:: ql.ZeroCouponInflationSwapHelper(quote, period, date, calendar, convention, daycounter, index, yieldTermStructure)
.. function:: ql.ZeroCouponInflationSwapHelper(quote, period, date, calendar, convention, daycounter, index, observationInterpolation, yieldTermStructure)

.. code-block:: python
import QuantLib as ql
quote = ql.QuoteHandle(ql.SimpleQuote(0.02))
period = ql.Period('6M')
date = ql.Date(15,6,2020)
calendar = ql.TARGET()
convention = ql.ModifiedFollowing
daycounter = ql.Actual360()
index = ql.EUHICPXT(True)
flatForward = ql.FlatForward(ql.Date(15,6,2020), ql.QuoteHandle(ql.SimpleQuote(0.05)), ql.Actual360())
yieldTermStructure = ql.YieldTermStructureHandle(flatForward)
helper = ql.ZeroCouponInflationSwapHelper(quote, period, date, calendar, convention, daycounter, index)
helper = ql.ZeroCouponInflationSwapHelper(quote, period, date, calendar, convention, daycounter, index, ql.CPI.Linear, yieldTermStructure)

0 comments on commit 7b53673

Please sign in to comment.