3
$\begingroup$

I'm trying to model option value changes during the progression of the last trading day before expiry. All option pricing Quantlib examples that I've seen work with day-level granularity. I'm wondering if Quantlib can support a finer granularity in its models, and if so, how this might be set up? Thanks in advance.

N.B. I'm using the Python wrapper for Quantlib at this time.

$\endgroup$
2
$\begingroup$

It's possible, but you'll need to recompile both the C++ library and the Python wrappers. On Windows, you'll have to edit ql/userconfig.hpp and uncomment the line

//#    define QL_HIGH_RESOLUTION_DATE

On other systems, you'll have to pass the flag --enable-intraday when you call ./configure. This will cause the library to use the Boost.Date library internally, giving you (in principle) microsecond granularity.

I'm not sure that all day-count conventions support this. Act/360, Act/365 and Act/Act should, but keep your eyes open for problems. This configuration is not the default, and thus is less tested.

$\endgroup$
3
  • $\begingroup$ I figure this is outdated, but could you point to a tutorial on how to recompile the python wrappers? Say I clone the entire repo from your github, what'd be my next step? $\endgroup$ Feb 16 at 10:51
  • $\begingroup$ quantlib.org/install.shtml $\endgroup$ Feb 16 at 14:17
  • $\begingroup$ Right, thank you! $\endgroup$ Feb 16 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.