I'm reading Introduction to Selected Classes of the QuantLib Library I by Dimitri Reiswich and am trying to "convert" it to Python.
It seems to me that some C++ possibilities aren't available in python.
I'm not familiar with SWIG but I guess it's a matter of declaring them in the appropriate *.i files.
For instance both these work following the pdf text:
January: either QuantLib::January or QuantLib::Jan
print(ql.Date(12, 12, 2015))
print(ql.Date(12, ql.January, 2015))
But why Jan doesn't work ?
print(ql.Date(12, ql.Jan, 2015))
In the Calendar description the 2 following commented lines return an error, browsing through the code I failed at finding them. Would someone be kind enough to point me directions on how to make them available ?
import QuantLib as ql
def calendarTesting():
frankfurtCal = ql.Germany(ql.Germany.FrankfurtStockExchange)
saudiArabCal = ql.SaudiArabia()
myEve = ql.Date(31, 12, 2009)
print('is BD: {}'.format(frankfurtCal.isBusinessDay(myEve)))
print('is Holiday: {}'.format(frankfurtCal.isHoliday(myEve)))
# print('is weekend: {}'.format(saudiArabCal.isWeekend(ql.Saturday)))
print('is last BD: {}'.format(frankfurtCal.isEndOfMonth(ql.Date(30, 12, 2009))))
# print('last BD: {}'.format(frankfurtCal.endOfMonth(myEve)))
calendarTesting()