

AustraliaASX : Public holidays for the Australian Stock Exchange (ASX).# counts the number of business days between dates Julia> advancebdays(:USSettlement, Date(2015, 1, 2), 1)

Julia> tobday(:USSettlement, Date(2015, 1, 1) forward = false) Julia> isbday(BusinessDays.USSettlement(), Date(2015, 1, 1)) # but for the best performance, use a singleton instance # Calendars can be referenced using symbols Julia> BusinessDays.initcache(:USSettlement) # creates cache for US Federal holidays, allowing fast computations Tutorial julia> using BusinessDays, Dates So, in order to take advantage of high speed computation provided by this package, one must call BusinessDays.initcache function. It's important to point out that cache is disabled by default. julia> BusinessDays.cleancache() # cleans existing cache, if any It takes around 38 minutes to process the same benchmark test. If we disable BusinessDays's cache, however, the performance is slightly worse than QuantLib's implementation. Julia> bdays(cal, d0, d1) # force JIT compilationĠ.000012 seconds (9 allocations: 240 bytes) While there are many implementations of Business Days calculators out there, the usual implementation is based on this kind of algorithm: dt0 = initial_date
Business day calculator software#
A Business Days calculator is a small piece of software used to perform this important step of the valuation process. Many financial contracts, specially Fixed Income instruments, depend on a particular calendar of holidays to determine how many days exist between the valuation date and the maturity of the contract.
Business day calculator code#
This code was developed with a mindset of a Financial Institution that has a big Fixed Income portfolio. Julia> Pkg.add("BusinessDays") Motivation Requirementsįrom a Julia session, run: julia> using Pkg

A highly optimized Business Days calculator written in Julia language.
