File tree Expand file tree Collapse file tree 3 files changed +60
-19
lines changed
Expand file tree Collapse file tree 3 files changed +60
-19
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,10 @@ cdef class Calendar:
2727 calendars will be moved to the exchange/country convention.
2828 '''
2929
30- property name :
31- def __get__ (self ):
32- return self ._thisptr.name().decode(' utf-8' )
30+ @property
31+ def name (self ):
32+ """ name of the calendar"""
33+ return self ._thisptr.name().decode(' utf-8' )
3334
3435 def __str__ (self ):
3536 return self .name
Original file line number Diff line number Diff line change 11cdef extern from ' ql/time/calendars/unitedstates.hpp' namespace \
2- ' QuantLib::UnitedStates' :
2+ ' QuantLib::UnitedStates' nogil :
33
44 cpdef enum class Market:
5- """ US calendars"""
6- Settlement # generic settlement calendar
7- NYSE # New York stock exchange calendar
8- GovernmentBond # government-bond calendar
9- NERC # off-peak days for NERC
10- LiborImpact # Libor impact calendar
11- FederalReserve # Federal Reserve Bankwire System
12- SOFR # SOFR fixing calendar
5+ """ US calendars
6+
7+ Attributes
8+ ----------
9+ Settlement
10+ generic settlement calendar
11+ NYSE
12+ New York stock exchange calendar
13+ GovernmentBond
14+ government-bond calendar
15+ NERC
16+ off-peak days for NERC
17+ LiborImpact
18+ Libor impact calendar
19+ FederalReserve
20+ Federal Reserve Bankwire System
21+ SOFR
22+ SOFR fixing calendar
23+ """
24+ Settlement
25+ NYSE
26+ GovernmentBond
27+ NERC
28+ LiborImpact
29+ FederalReserve
30+ SOFR
Original file line number Diff line number Diff line change @@ -74,15 +74,37 @@ cdef class UnitedStates(Calendar):
7474 * Labor Day, first Monday in September
7575 * Thanksgiving Day, fourth Thursday in November
7676 * Christmas, December 25th (moved to Monday if Sunday)
77+
78+ Parameters
79+ ----------
80+ market: Market, default Market.Settlement
81+
82+ Attributes
83+ ----------
84+ Settlement
85+ generic settlement calendar
86+ NYSE
87+ New York stock exchange calendar
88+ GovernmentBond
89+ government-bond calendar
90+ NERC
91+ off-peak days for NERC
92+ LiborImpact
93+ Libor impact
94+ FederalReserve
95+ Federal Reserve Bankwire System
96+ SOFR
97+ SOFR fixing calendar
98+
7799 '''
78100
79- Settlement = Market.Settlement # generic settlement calendar
80- NYSE = Market.NYSE # New York stock exchange calendar
81- GovernmentBond = Market.GovernmentBond # government-bond calendar
82- NERC = Market.NERC # off-peak days for NERC
83- LiborImpact = Market.LiborImpact # Libor impact
84- FederalReserve = Market.FederalReserve # Federal Reserve Bankwire System
85- SOFR = Market.SOFR # SOFR fixing calendar
101+ Settlement = Market.Settlement
102+ NYSE = Market.NYSE
103+ GovernmentBond = Market.GovernmentBond
104+ NERC = Market.NERC
105+ LiborImpact = Market.LiborImpact
106+ FederalReserve = Market.FederalReserve
107+ SOFR = Market.SOFR
86108
87109 def __cinit__ (self , Market market = Market.Settlement):
88110 self ._thisptr = _us.UnitedStates(market)
You can’t perform that action at this time.
0 commit comments