Skip to content
All library documents

How Business/252 Calendars Affect QuantLib Option Pricing

Article Quant Q&A · Author: pinkusfloyd

Summary

The document explains why adding a holiday to a QuantLib calendar does not necessarily change a European option's price. In the example, the option's exercise date is fixed and the model uses an Actual/365 Fixed day counter. Although the holiday appears in the calendar's holiday list, the displayed option value and delta remain unchanged because that day counter measures elapsed time using calendar days rather than business days.

The accepted answer recommends using a Business/252 day counter tied to the calendar when the intended time measure should reflect business days. It also notes that the volatility term structure can use Business/252 while interest-rate curves retain Actual/365 Fixed if only volatility should respond to the holiday. The example demonstrates a modeling configuration, not a general rule that holidays always reduce option value: pricing effects depend on which term structures use the calendar-based day count and on the model setup.

Key ideas

  • Adding a holiday to a QuantLib calendar does not change time measured by Actual/365 Fixed.
  • A Business/252 day counter uses the calendar to count business days for year fractions.
  • Different day counters can be assigned to volatility and rate term structures.
  • The price effect depends on which model inputs use the calendar-based day count.

Tags

Full text
# QuantLib including holiday in option price


# QuantLib including holiday in option price












I am trying to add a holiday to my calendar in QuantLib such that my option pricing model considers this in pricing where I would expect that the time to expiry should decrease with the inclusion of a holiday, and my option reduce in price. However, when I use the `.addHoliday` method it successfully adds the holiday to the Calendar, but the option price doesn't change. It seems as if the option time to expiry is used from the DayCounter object and doesn't use the Calendar. Would my interpretation here be correct and if so, how would I add a holiday such that it affects my option pricing? My expectation is that the option price decreases by the same amount as if I reduced the expiry date by a day. Example below

```
import QuantLib as ql

def get_option_price(add_holiday):
    calculation_date = ql.Date(18, 1, 2023)
    ql.Settings.instance().evaluationDate = calculation_date

    expiry = ql.Date(30, 1, 2023)
    spot_price = 100.
    strike_price = 105.
    volatility = 0.50
    dividend_rate = 0
    option_type = ql.Option.Call

    risk_free_rate = 0.001
    day_count = ql.Actual365Fixed()
    calendar = ql.UnitedStates(0)
    
    if add_holiday:
        calendar.addHoliday(ql.Date(24, 1, 2023))
    print(add_holiday, ql.Calendar.holidayList(calendar, calculation_date, expiry))

    payoff = ql.PlainVanillaPayoff(option_type, strike_price)
    exercise = ql.EuropeanExercise(expiry)
    european_option = ql.VanillaOption(payoff, exercise)

    spot_handle = ql.QuoteHandle(ql.SimpleQuote(spot_price))
    flat_ts = ql.YieldTermStructureHandle(ql.FlatForward(calculation_date, risk_free_rate, day_count))
    dividend_yield = ql.YieldTermStructureHandle(ql.FlatForward(calculation_date, dividend_rate, day_count))
    flat_vol_ts = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(calculation_date, calendar, volatility, day_count))
    bsm_process = ql.BlackScholesMertonProcess(spot_handle, dividend_yield, flat_ts, flat_vol_ts)

    european_option.setPricingEngine(ql.AnalyticEuropeanEngine(bsm_process))
    print(european_option.NPV(), european_option.delta())

get_option_price(False)
get_option_price(True)
```

```
False ()
1.7305073013860064 0.3111915181849204
True (Date(24,1,2023),)
1.7305073013860064 0.3111915181849204
```

## Answer by Luigi Ballabio (score 3, accepted)

https://quant.stackexchange.com/a/74422

Replace

```
    day_count = ql.Actual365Fixed()
    calendar = ql.UnitedStates(0)
```

with

```
    calendar = ql.UnitedStates(0)
    day_count = ql.Business252(calendar)
```

to get the behavior you expect. If you want only the volatility to be affected, use business/252 for the vol curve and act/365F for the rate curves.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.