interest_days 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +4 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +9 -1
- data/Gemfile +8 -2
- data/Gemfile.lock +13 -1
- data/README.md +8 -9
- data/interest_days-0.2.0.gem +0 -0
- data/interest_days.gemspec +2 -2
- data/lib/interest_days/calculation/isda_act_364.rb +14 -0
- data/lib/interest_days/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca962567dc653cf2dd4c735476b0e06b55f702bf1a3b982c66fb0c61304389cc
|
|
4
|
+
data.tar.gz: e9ceabbe93ca424b1c6f14fbee19cb7cec8cc8ec424c8cad6cfd48f958318d8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e4530bdc1365fbeb9910d9fe0c0cc5b69a3cb63324cd8e03a57b0fa72d00441f61c37288df4f417b2458464f20ff3c5adceee1c6bb5e4dd9e76f7f530d61afa
|
|
7
|
+
data.tar.gz: 545e7cd8d63020090ad70c631b78e1a5ac51218f27c2e73b23064694dcbc1f10e90a8d53df7c6b55995def2756612e8ca8791f8728eaa2965360f3f302de540d
|
data/.github/workflows/main.yml
CHANGED
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
## [0.2.0] / 2021-10-08
|
|
3
|
+
==================
|
|
4
|
+
|
|
5
|
+
* Feature/#2 30 360 bond basis (#4)
|
|
6
|
+
* Merge pull request #1 from eugenmueller/FIX/readme_typo
|
|
7
|
+
* FIX: indention in README
|
|
8
|
+
* FIX: fix readme typo
|
|
9
|
+
* add .history dir to gitignore
|
|
2
10
|
|
|
3
11
|
## [0.1.0] - 2021-10-03
|
|
4
12
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
interest_days (0.2.
|
|
4
|
+
interest_days (0.2.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
ast (2.4.2)
|
|
10
|
+
codecov (0.6.0)
|
|
11
|
+
simplecov (>= 0.15, < 0.22)
|
|
10
12
|
diff-lcs (1.4.4)
|
|
13
|
+
docile (1.4.0)
|
|
11
14
|
parallel (1.20.1)
|
|
12
15
|
parser (3.0.2.0)
|
|
13
16
|
ast (~> 2.4.1)
|
|
@@ -45,19 +48,28 @@ GEM
|
|
|
45
48
|
rubocop (~> 1.0)
|
|
46
49
|
rubocop-ast (>= 1.1.0)
|
|
47
50
|
ruby-progressbar (1.11.0)
|
|
51
|
+
simplecov (0.21.2)
|
|
52
|
+
docile (~> 1.1)
|
|
53
|
+
simplecov-html (~> 0.11)
|
|
54
|
+
simplecov_json_formatter (~> 0.1)
|
|
55
|
+
simplecov-html (0.12.3)
|
|
56
|
+
simplecov_json_formatter (0.1.3)
|
|
48
57
|
unicode-display_width (2.0.0)
|
|
49
58
|
|
|
50
59
|
PLATFORMS
|
|
60
|
+
x86_64-darwin-19
|
|
51
61
|
x86_64-darwin-20
|
|
52
62
|
x86_64-linux
|
|
53
63
|
|
|
54
64
|
DEPENDENCIES
|
|
65
|
+
codecov (~> 0.6.0)
|
|
55
66
|
interest_days!
|
|
56
67
|
rake (~> 13.0)
|
|
57
68
|
rspec (~> 3.0)
|
|
58
69
|
rubocop (~> 1.7)
|
|
59
70
|
rubocop-rake
|
|
60
71
|
rubocop-rspec
|
|
72
|
+
simplecov (~> 0.21.2)
|
|
61
73
|
|
|
62
74
|
BUNDLED WITH
|
|
63
75
|
2.2.21
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# InterestDays
|
|
2
2
|
|
|
3
3
|
This gem provide interest day factor calculation based on ISDA conventions e.g. Isda Act 360.
|
|
4
|
-
Since version 0.2 interest_day gem support 30/360 US EOM and 30/360 Bond Basis conventions.
|
|
4
|
+
Since version 0.2 interest_day gem support 30/360 US EOM and 30/360 Bond Basis conventions.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -23,20 +23,19 @@ Or install it yourself as:
|
|
|
23
23
|
|
|
24
24
|
You can simple use the InterestDays::Calculator like:
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
```ruby
|
|
27
|
+
calculator = InterestDays::Calculator.new(start_date: start, end_date: end, strategy: :isda_act_360)
|
|
28
|
+
|
|
29
|
+
calculator.interest_day_count_factor
|
|
30
|
+
```
|
|
31
31
|
|
|
32
|
-
currently there a
|
|
32
|
+
currently there a five supported conventions:
|
|
33
33
|
- :isda_act_360
|
|
34
34
|
- :isda_act_365
|
|
35
35
|
- :isda_30_e_360
|
|
36
36
|
- :us_eom_30_360
|
|
37
37
|
- :bond_basis_30_360
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
## Development
|
|
41
40
|
|
|
42
41
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
@@ -45,7 +44,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
45
44
|
|
|
46
45
|
## Contributing
|
|
47
46
|
|
|
48
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/eugenmueller/interest_days.
|
|
47
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/eugenmueller/interest_days. ;)
|
|
49
48
|
|
|
50
49
|
## License
|
|
51
50
|
|
|
Binary file
|
data/interest_days.gemspec
CHANGED
|
@@ -5,7 +5,7 @@ require_relative "lib/interest_days/version"
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "interest_days"
|
|
7
7
|
spec.version = InterestDays::VERSION
|
|
8
|
-
spec.authors = ["Eugen Mueller"]
|
|
8
|
+
spec.authors = ["Eugen Mueller", "Kevin Liebholz"]
|
|
9
9
|
spec.email = ["eugen.mllr@gmail.com"]
|
|
10
10
|
|
|
11
11
|
spec.summary = "Interest day calculation"
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
|
|
19
19
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
20
20
|
spec.metadata["source_code_uri"] = "https://github.com/eugenmueller/interest_days"
|
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/eugenmueller/interest_days/CHANGELOG.md"
|
|
21
|
+
spec.metadata["changelog_uri"] = "https://github.com/eugenmueller/interest_days/blob/v0.2.0/CHANGELOG.md"
|
|
22
22
|
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module InterestDays
|
|
4
|
+
module Calculation
|
|
5
|
+
# ISDA Act 360 Convention calculation
|
|
6
|
+
class IsdaAct364 < Base
|
|
7
|
+
RELEVANT_DAYS_IN_YEAR = 364
|
|
8
|
+
|
|
9
|
+
def day_count_factor
|
|
10
|
+
days.fdiv(RELEVANT_DAYS_IN_YEAR)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: interest_days
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eugen Mueller
|
|
8
|
+
- Kevin Liebholz
|
|
8
9
|
autorequire:
|
|
9
10
|
bindir: exe
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: rspec
|
|
@@ -71,11 +72,13 @@ files:
|
|
|
71
72
|
- Rakefile
|
|
72
73
|
- bin/console
|
|
73
74
|
- bin/setup
|
|
75
|
+
- interest_days-0.2.0.gem
|
|
74
76
|
- interest_days.gemspec
|
|
75
77
|
- lib/interest_days.rb
|
|
76
78
|
- lib/interest_days/calculation/base.rb
|
|
77
79
|
- lib/interest_days/calculation/isda_30_e_360.rb
|
|
78
80
|
- lib/interest_days/calculation/isda_act_360.rb
|
|
81
|
+
- lib/interest_days/calculation/isda_act_364.rb
|
|
79
82
|
- lib/interest_days/calculation/isda_act_365.rb
|
|
80
83
|
- lib/interest_days/calculation/thirty_threesixty_base.rb
|
|
81
84
|
- lib/interest_days/calculation/us_eom_30_360.rb
|
|
@@ -87,7 +90,7 @@ licenses:
|
|
|
87
90
|
metadata:
|
|
88
91
|
homepage_uri: https://github.com/eugenmueller/interest_days
|
|
89
92
|
source_code_uri: https://github.com/eugenmueller/interest_days
|
|
90
|
-
changelog_uri: https://github.com/eugenmueller/interest_days/CHANGELOG.md
|
|
93
|
+
changelog_uri: https://github.com/eugenmueller/interest_days/blob/v0.2.0/CHANGELOG.md
|
|
91
94
|
post_install_message:
|
|
92
95
|
rdoc_options: []
|
|
93
96
|
require_paths:
|