Skip to content

Commit

Permalink
tav v0.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
felipenoris committed Mar 7, 2020
1 parent b3442ed commit 61fd126
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "4f18b42c-503e-5345-9536-bb0f25fc7038"
license = "MIT"
authors = ["Felipe Noronha <[email protected]>"]
repo = "https://github.com/JuliaFinance/BusinessDays.jl.git"
version = "0.9.7-dev"
version = "0.9.7"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
13 changes: 9 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ julia> Pkg.add("BusinessDays")

## Motivation

This code was developed with a mindset of a Financial Institution that has a big *Fixed Income* portfolio. 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. A *Business Days* calculator is a small piece of software used to perform this important step of the valuation process.
While there are many implementations of *Business Days* calculators out there, the usual implementation is based on this kind of algorithm:
This code was developed with a mindset of a Financial Institution that has a big *Fixed Income* portfolio.
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.
A *Business Days* calculator is a small piece of software used to perform this important step of the valuation process.

While there are many implementations of *Business Days* calculators out there,
the usual implementation is based on this kind of algorithm:

```r
dt0 = initial_date
Expand All @@ -38,7 +43,7 @@ end while

This works fine for general use. But the performance becomes an issue if one must repeat this calculation many times. Say you have 50 000 contracts, each contract with 20 cash flows. If you need to apply this algorithm to each cash flow, you will need to perform it 1 000 000 times.

For instance, let's try out this code using *R* and *[QuantLib](https://github.com/lballabio/QuantLib)* ([RQuantLib](https://github.com/eddelbuettel/rquantlib)):
For instance, let's try out this code using *R* and [QuantLib](https://github.com/lballabio/QuantLib) ([RQuantLib](https://github.com/eddelbuettel/rquantlib)):

```r
library(RQuantLib)
Expand Down Expand Up @@ -66,7 +71,7 @@ Unit: seconds
```

While one computation takes up to 2 milliseconds, we're in trouble if we have to repeat it for the whole portfolio: it takes about **half an hour** to complete. This is not due to R's performance, because *[RQuantLib](https://github.com/eddelbuettel/rquantlib)* is a simple wrapper to [QuantLib](https://github.com/lballabio/QuantLib) *C++* library.
While one computation takes up to 2 milliseconds, we're in trouble if we have to repeat it for the whole portfolio: it takes about **half an hour** to complete. This is not due to R's performance, because [RQuantLib](https://github.com/eddelbuettel/rquantlib) is a simple wrapper to [QuantLib](https://github.com/lballabio/QuantLib) C++ library.

**BusinessDays.jl** uses a *tailor-made* cache to store Business Days results, reducing the time spent to the order of a few *microseconds* for a single computation. Also, the time spent to process the whole portfolio is reduced to **under a second**.

Expand Down

2 comments on commit 61fd126

@felipenoris
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/10680

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.7 -m "<description of version>" 61fd1268782b13e1ebc0c7a070c227306bf7174e
git push origin v0.9.7

Please sign in to comment.