How does the quantlib set up hour time, say in the example below:
ql.Date(20, 1, 2023), US calendar,
what is the time, 12 AM US time? local machine time?
say I would like to set up a NY 4 pm time, is it possible?
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It only takes a minute to sign up.
Sign up to join this communityBy default, an instance of Date is just a date and doesn't have time information.
It's possible to compile QuantLib so that it also has a time (see here), but this is not enabled by default since it slows down the library. If you do choose that configuration, you'll need to recompile both QuantLib and its Python wrappers yourself.
Also, the non-default configuration allows Date instances to have a time, but not a timezone. You'll be able to say ql.Date(20, 1, 2023, 16, 0, 0)
to specify 4PM, but not that it's NY time. It leaves it up to you to convert and use consistent times.