Imm#
- class rateslib.scheduling.Imm(item)#
Bases:
object
Enumerable type for International Money-Market (IMM) date definitions.
For further information on these descriptors see the Rust low level docs for Imm.
Attributes Summary
Methods Summary
get
(year, month)Return an IMM date from a given year and month under the given definition.
next
(date)Return the next IMM date after
date
under the given definition.to_json
()Return a JSON representation of the object.
validate
(date)Check whether a date is an IMM date under the given definition.
Attributes Documentation
- Day20 = <rl.Imm.Day20>#
- Day20_HMUZ = <rl.Imm.Day20_HMUZ>#
- Day20_HU = <rl.Imm.Day20_HU>#
- Day20_MZ = <rl.Imm.Day20_MZ>#
- Eom = <rl.Imm.Eom>#
- Fri2 = <rl.Imm.Fri2>#
- Fri2_HMUZ = <rl.Imm.Fri2_HMUZ>#
- Leap = <rl.Imm.Leap>#
- Wed1_Post9 = <rl.Imm.Wed1_Post9>#
- Wed1_Post9_HMUZ = <rl.Imm.Wed1_Post9_HMUZ>#
- Wed3 = <rl.Imm.Wed3>#
- Wed3_HMUZ = <rl.Imm.Wed3_HMUZ>#
Methods Documentation
- get(year, month)#
Return an IMM date from a given year and month under the given definition.
- Parameters:
year (int) – The year.
month (int) – The month.
- Return type:
datetime
- next(date)#
Return the next IMM date after
date
under the given definition.- Parameters:
date (datetime) – The input date.
- Return type:
datetime
- to_json()#
Return a JSON representation of the object.
- Return type:
str
- validate(date)#
Check whether a date is an IMM date under the given definition.
- Parameters:
date (datetime) – The input date.
- Return type:
bool