refinance 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +1 -1
- data/README.md +176 -12
- data/lib/refinance/version.rb +1 -1
- data/refinance.gemspec +19 -17
- data/test/annuities_helper.rb +57 -0
- data/test/bigdecimal_annuities_test.rb +9 -2
- data/test/float_annuities_test.rb +10 -1
- data/test/refinance_test.rb +3 -10
- data/test/test_helper.rb +2 -58
- metadata +29 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2b891ac8019babc3e1e7dddeeca467eab9d4b23f
|
4
|
+
data.tar.gz: c1afcdc0ac1014dee2e3f0bc11621f5308caa28b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 118220872ce33ab4b8d3d5a16b690c78af2d90d907021fb7ddbf57b8e7965abd67f99ff58b781a4e06ac12e998e56a845d217d7e48c754ec1c02aa36a9c7a592
|
7
|
+
data.tar.gz: f2b738e5e698945af6219359d62da8274e5826b8448860915ee608c1da4f026584b442a894c08d8d3b6adbf880d0975dedfe40affc0a2c5b79436feb19145a05
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -5,17 +5,178 @@ Currently, it contains algorithms for calculating the properties of ordinary
|
|
5
5
|
annuities: principal, interest rate, number of payment periods, and payment
|
6
6
|
amount.
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
## Introduction
|
9
|
+
|
10
|
+
Refinance does calculations related to
|
11
|
+
[annuities](http://en.wikipedia.org/wiki/Annuity_%28finance_theory%29) in
|
12
|
+
finance theory. In general, an annuity is a finite series of regular payments;
|
13
|
+
an installment loan for a car is an example that might be familiar to you.
|
14
|
+
|
15
|
+
Refinance allows you to answer questions like these:
|
16
|
+
|
17
|
+
1. Say you have a car loan and are paying a fixed amount each month to pay it
|
18
|
+
off. If you got a reduced interest rate, exactly how much lower would your
|
19
|
+
monthly payments be?
|
20
|
+
|
21
|
+
2. If you get a reduced interest rate but continue to pay the same monthly
|
22
|
+
payments, exactly how much shorter will the loan duration be?
|
23
|
+
|
24
|
+
3. Say you want to borrow money to buy a car. If your bank will lend you money
|
25
|
+
at an X% annual interest rate, and you're willing to make monthly payments as
|
26
|
+
high as $Y, how expensive of a car can you buy?
|
27
|
+
|
28
|
+
4. Say you're making monthly payments of $X to pay off a $Y loan. What interest
|
29
|
+
rate are you being charged?
|
30
|
+
|
31
|
+
5. Say your loan has an interest rate of X% per month. What is its effective
|
32
|
+
_annual_ interest rate?
|
33
|
+
|
34
|
+
Annuities have four defining properties (at least for our purposes), and the
|
35
|
+
first four questions above provide examples of each: The first question is
|
36
|
+
asking for the annuity's _periodic payment amount_. The second is asking for
|
37
|
+
the _number of remaining payments_. The third is asking for the _principal_.
|
38
|
+
And the fourth is asking for the _interest rate_.
|
39
|
+
|
40
|
+
In general, if you know three of those properties, Refinance can calculate
|
41
|
+
the fourth.
|
42
|
+
|
43
|
+
The fifth question is about converting an interest rate. Perhaps you think this
|
44
|
+
is trivial: if you're paying 1% per month, then it's equivalent to paying 12%
|
45
|
+
per year, right? Wrong. It's more like 12.68%. You need to account for the
|
46
|
+
effects of [compound interest](http://en.wikipedia.org/wiki/Compound_interest).
|
47
|
+
|
48
|
+
|
49
|
+
## Usage example
|
50
|
+
|
51
|
+
I'll use [Example 2 from Stan Brown's paper](http://oakroadsystems.com/math/loan.htm#Sample2):
|
52
|
+
|
53
|
+
> You are buying a $250,000 house, with 10% down, on a 30-year mortgage at a
|
54
|
+
> fixed rate of 7.8%. What is the monthly payment?
|
55
|
+
|
56
|
+
We want to calculate the monthly payment, so we'll use the method
|
57
|
+
Refinance::Annuities.payment. That method requires three arguments: the
|
58
|
+
interest rate (per month, since we're calculating the monthly payment), the
|
59
|
+
total number of monthly payments, and the principal. These are easy to
|
60
|
+
determine from the example:
|
61
|
+
|
62
|
+
* The interest rate is 7.8%, but there are two things to note here. First, 7.8%
|
63
|
+
is a [nominal annual rate](http://en.wikipedia.org/wiki/Nominal_interest_rate),
|
64
|
+
and we want the monthly interest rate. So we divide 7.8% by 12 (because there
|
65
|
+
are 12 months in a year) and get 0.65%. Second, the method wants the argument
|
66
|
+
in decimal form, not percent form, so 0.65% becomes 0.0065.
|
67
|
+
|
68
|
+
* The loan lasts 30 years, and we want the number of payment periods -- that
|
69
|
+
is, the number of months. 30 years is 360 months.
|
70
|
+
|
71
|
+
* The house's purchase price is $250,000, and we're making a 10% down payment,
|
72
|
+
so the loan's principal will be 90% of $250,000, or $225,000.
|
73
|
+
|
74
|
+
Now we can call the method:
|
75
|
+
|
76
|
+
Refinance::Annuities.payment 0.0065, 360.0, 225000.0
|
77
|
+
|
78
|
+
(You can name the arguments "interest rate", "periods", and "principal". For
|
79
|
+
this and related methods, the arguments go in alphabetical order.)
|
80
|
+
|
81
|
+
The return value is 1619.7086268909618. So the monthly payment is about
|
82
|
+
$1,619.71.
|
83
|
+
|
84
|
+
|
85
|
+
## API
|
86
|
+
|
87
|
+
Here's a summary of the public-facing methods provided by this library. They
|
88
|
+
are all stateless "functions".
|
89
|
+
|
90
|
+
Arguments to these methods are not directly converted to a particular numeric
|
91
|
+
type; they can be any objects that support the necessary mathematical methods.
|
92
|
+
Instances of Float and BigDecimal will work for real-valued arguments.
|
93
|
+
|
94
|
+
Interest rates must be in decimal form, not percent form.
|
95
|
+
|
96
|
+
|
97
|
+
### Refinance::Annuities.interest_rate
|
98
|
+
|
99
|
+
This method calculates an annuity's interest rate over its payment period. The
|
100
|
+
result will be given as a decimal number, not as a percent. There is no
|
101
|
+
closed-form solution for this, so the answer is iteratively approximated with
|
102
|
+
the
|
103
|
+
[Newton-Raphson method](http://en.wikipedia.org/wiki/Newton-raphson_method).
|
104
|
+
|
105
|
+
Arguments:
|
106
|
+
|
107
|
+
1. The periodic payment amount.
|
108
|
+
2. The total number of payment periods.
|
109
|
+
3. The principal.
|
110
|
+
4. (Optional) The initial guess at the interest rate.
|
111
|
+
5. (Optional) The precision; the algorithm will stop if the magnitude of the
|
112
|
+
last improvement was less than this.
|
113
|
+
6. (Optional) The maximum number of decimal places. After each iteration, the
|
114
|
+
guess will be rounded to this many decimal places.
|
115
|
+
7. (Optional) The maximum number of iterations to allow.
|
116
|
+
|
117
|
+
|
118
|
+
### Refinance::Annuities.payment
|
119
|
+
|
120
|
+
This method calculates an annuity's periodic payment amount.
|
121
|
+
|
122
|
+
Arguments:
|
123
|
+
|
124
|
+
1. The interest rate over one payment period.
|
125
|
+
2. The total number of payment periods.
|
126
|
+
3. The principal.
|
127
|
+
|
128
|
+
|
129
|
+
### Refinance::Annuities.periods
|
130
|
+
|
131
|
+
This method calculates the total number of payment periods for an annuity.
|
132
|
+
|
133
|
+
Arguments:
|
134
|
+
|
135
|
+
1. The interest rate over one payment period.
|
136
|
+
2. The periodic payment amount.
|
137
|
+
3. The principal.
|
138
|
+
|
139
|
+
|
140
|
+
### Refinance::Annuities.principal
|
141
|
+
|
142
|
+
This method calculates the principal of an annuity.
|
143
|
+
|
144
|
+
Arguments:
|
145
|
+
|
146
|
+
1. The interest rate over one payment period.
|
147
|
+
2. The periodic payment amount.
|
148
|
+
3. The total number of payment periods.
|
149
|
+
|
150
|
+
|
151
|
+
### Refinance::Annuities.effective_interest_rate
|
152
|
+
|
153
|
+
This method calculates the effective annual interest rate.
|
154
|
+
|
155
|
+
Arguments:
|
156
|
+
|
157
|
+
1. The nominal annual interest rate.
|
158
|
+
2. The number of compounding periods per year.
|
159
|
+
|
160
|
+
|
161
|
+
## Implementation
|
162
|
+
|
163
|
+
The algorithms are simple rather than fast and
|
164
|
+
[numerically stable](http://en.wikipedia.org/wiki/Numerical_stability). At
|
165
|
+
present, they deal only with _annuities immediate_ (in which the interest is
|
166
|
+
accumulated _before_ the payment), not _annuities due_ (in which the interest
|
167
|
+
is accumulated _after_ the payment).
|
168
|
+
|
13
169
|
|
14
170
|
## Requirements
|
15
171
|
|
16
|
-
This library is tested with
|
17
|
-
Interpreter)
|
18
|
-
|
172
|
+
This library is tested with the following versions of MRI (Matz's Ruby
|
173
|
+
Interpreter): 1.9.3, 2.0.0, 2.1.0, 2.1.1, and 2.1.2.
|
174
|
+
|
175
|
+
If you wish you to use BigDecimal, we recommend using the
|
176
|
+
[bigdecimal gem](https://rubygems.org/gems/bigdecimal) instead of the version
|
177
|
+
of BigDecimal that ships in the standard library. Refinance's test suite does
|
178
|
+
not pass with the version of BigDecimal that ships with MRI 2.1.0.
|
179
|
+
|
19
180
|
|
20
181
|
## Installation
|
21
182
|
|
@@ -31,6 +192,7 @@ Or install it yourself as:
|
|
31
192
|
|
32
193
|
$ gem install refinance
|
33
194
|
|
195
|
+
|
34
196
|
## Contributing
|
35
197
|
|
36
198
|
1. Fork it
|
@@ -39,15 +201,17 @@ Or install it yourself as:
|
|
39
201
|
4. Push to the branch (`git push origin my-new-feature`)
|
40
202
|
5. Create new Pull Request
|
41
203
|
|
204
|
+
|
42
205
|
## Authorship and copyright information
|
43
206
|
|
44
207
|
This software was written by [reInteractive](http://reinteractive.net/), a
|
45
208
|
software consulting company in Sydney, Australia. It is distributed under the
|
46
209
|
MIT License; see LICENSE.txt for details.
|
47
210
|
|
211
|
+
|
48
212
|
## Acknowledgements
|
49
213
|
|
50
|
-
Thanks to Stan Brown for his paper
|
51
|
-
Formulas](http://oakroadsystems.com/math/loan.htm)_. It is
|
52
|
-
introduction to the mathematics of annuities, and we used some of
|
53
|
-
as test cases.
|
214
|
+
Thanks to Stan Brown for his paper
|
215
|
+
_[Loan or Investment Formulas](http://oakroadsystems.com/math/loan.htm)_. It is
|
216
|
+
an excellent introduction to the mathematics of annuities, and we used some of
|
217
|
+
its examples as test cases.
|
data/lib/refinance/version.rb
CHANGED
data/refinance.gemspec
CHANGED
@@ -1,24 +1,26 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'refinance/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'refinance'
|
8
|
+
spec.version = Refinance::VERSION
|
9
|
+
spec.author = 'reInteractive'
|
10
|
+
spec.email = 'enquiries@reinteractive.net'
|
11
|
+
spec.description = %q{A collection of finance algorithms related to annuities.}
|
12
|
+
spec.summary = %q{Simple annuity algorithms}
|
13
|
+
spec.homepage = 'https://github.com/reinteractive-open/refinance'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = '>= 1.9.3'
|
16
|
+
spec.platform = Gem::Platform::RUBY
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ["lib"]
|
21
22
|
|
22
|
-
|
23
|
-
|
23
|
+
spec.add_development_dependency 'rake', '10.3.2'
|
24
|
+
spec.add_development_dependency 'minitest', '5.3.5'
|
25
|
+
spec.add_development_dependency 'bigdecimal', '1.2.5'
|
24
26
|
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module AnnuitiesHelper
|
2
|
+
def assert_improve_interest_rate options
|
3
|
+
actual = Refinance::Annuities.improve_interest_rate(
|
4
|
+
options.fetch(:payment),
|
5
|
+
options.fetch(:periods),
|
6
|
+
options.fetch(:principal),
|
7
|
+
options.fetch(:guess))
|
8
|
+
|
9
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
10
|
+
end
|
11
|
+
|
12
|
+
def assert_interest_rate_stops_if_improvement_is_small options
|
13
|
+
actual = Refinance::Annuities.interest_rate(options.fetch(:payment),
|
14
|
+
options.fetch(:periods), options.fetch(:principal),
|
15
|
+
options.fetch(:guess), options.fetch(:precision))
|
16
|
+
|
17
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
18
|
+
end
|
19
|
+
|
20
|
+
def assert_interest_rate_does_multiple_iterations options
|
21
|
+
actual = Refinance::Annuities.interest_rate(options.fetch(:payment),
|
22
|
+
options.fetch(:periods), options.fetch(:principal),
|
23
|
+
options.fetch(:guess), options.fetch(:precision),
|
24
|
+
options.fetch(:max_decimals), options.fetch(:max_iterations))
|
25
|
+
|
26
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
27
|
+
end
|
28
|
+
|
29
|
+
def assert_payment options
|
30
|
+
actual = Refinance::Annuities.payment(options.fetch(:interest_rate),
|
31
|
+
options.fetch(:periods), options.fetch(:principal))
|
32
|
+
|
33
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
34
|
+
end
|
35
|
+
|
36
|
+
def assert_periods options
|
37
|
+
actual = Refinance::Annuities.periods(options.fetch(:interest_rate),
|
38
|
+
options.fetch(:payment), options.fetch(:principal))
|
39
|
+
|
40
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
41
|
+
end
|
42
|
+
|
43
|
+
def assert_principal options
|
44
|
+
actual = Refinance::Annuities.principal(options.fetch(:interest_rate),
|
45
|
+
options.fetch(:payment), options.fetch(:periods))
|
46
|
+
|
47
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
48
|
+
end
|
49
|
+
|
50
|
+
def assert_effective_interest_rate options
|
51
|
+
actual = Refinance::Annuities.effective_interest_rate(
|
52
|
+
options.fetch(:nominal_annual_interest_rate),
|
53
|
+
options.fetch(:compounding_periods_per_year))
|
54
|
+
|
55
|
+
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
56
|
+
end
|
57
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
|
-
require 'bigdecimal'
|
3
2
|
|
4
|
-
class BigDecimalAnnuitiesTest <
|
3
|
+
class BigDecimalAnnuitiesTest < Minitest::Test
|
4
|
+
include AnnuitiesHelper
|
5
5
|
|
6
6
|
def test_improve_interest_rate
|
7
7
|
# Based on Example 6 in http://oakroadsystems.com/math/loan.htm .
|
@@ -31,6 +31,13 @@ class BigDecimalAnnuitiesTest < AnnuitiesTest
|
|
31
31
|
delta: BigDecimal.new('0.0000000001')
|
32
32
|
end
|
33
33
|
|
34
|
+
def test_interest_rate_stops_if_max_iterations_reached
|
35
|
+
expected = BigDecimal.new('0.42')
|
36
|
+
actual = Refinance::Annuities.interest_rate(0, 0, 0, expected, 0, 1, 0)
|
37
|
+
|
38
|
+
assert_equal expected, actual
|
39
|
+
end
|
40
|
+
|
34
41
|
def test_payment
|
35
42
|
# Based on Example 2 in http://oakroadsystems.com/math/loan.htm .
|
36
43
|
assert_payment interest_rate: BigDecimal.new('0.0065'),
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class FloatAnnuitiesTest <
|
3
|
+
class FloatAnnuitiesTest < Minitest::Test
|
4
|
+
include AnnuitiesHelper
|
4
5
|
|
5
6
|
def test_improve_interest_rate
|
6
7
|
# Based on Example 6 in http://oakroadsystems.com/math/loan.htm .
|
@@ -24,7 +25,15 @@ class FloatAnnuitiesTest < AnnuitiesTest
|
|
24
25
|
delta: 0.0000000001
|
25
26
|
end
|
26
27
|
|
28
|
+
def test_interest_rate_stops_if_max_iterations_reached
|
29
|
+
expected = 0.42
|
30
|
+
actual = Refinance::Annuities.interest_rate(0, 0, 0, expected, 0, 1, 0)
|
31
|
+
|
32
|
+
assert_equal expected, actual
|
33
|
+
end
|
34
|
+
|
27
35
|
def test_payment
|
36
|
+
# Based on Example 2 in http://oakroadsystems.com/math/loan.htm .
|
28
37
|
assert_payment interest_rate: 0.0065, periods: 360.0, principal: 225000.0,
|
29
38
|
expected: 1619.708627, delta: 0.000001
|
30
39
|
end
|
data/test/refinance_test.rb
CHANGED
@@ -1,18 +1,11 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class RefinanceTest < Minitest::
|
3
|
+
class RefinanceTest < Minitest::Test
|
4
4
|
def test_refinance_is_a_module
|
5
|
-
assert_kind_of Module, ::Refinance
|
5
|
+
assert_kind_of ::Module, ::Refinance
|
6
6
|
end
|
7
7
|
|
8
8
|
def test_version_is_a_string
|
9
|
-
assert_kind_of String, ::Refinance::VERSION
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_interest_rate_stops_if_max_iterations_reached
|
13
|
-
expected = 0.42
|
14
|
-
actual = Refinance::Annuities.interest_rate(0, 0, 0, expected, 0, 1, 0)
|
15
|
-
|
16
|
-
assert_equal expected, actual
|
9
|
+
assert_kind_of ::String, ::Refinance::VERSION
|
17
10
|
end
|
18
11
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,60 +1,4 @@
|
|
1
1
|
require 'minitest/autorun'
|
2
|
+
require 'bigdecimal'
|
2
3
|
require 'refinance'
|
3
|
-
|
4
|
-
class AnnuitiesTest < Minitest::Unit::TestCase
|
5
|
-
def assert_improve_interest_rate options
|
6
|
-
actual = Refinance::Annuities.improve_interest_rate(
|
7
|
-
options.fetch(:payment),
|
8
|
-
options.fetch(:periods),
|
9
|
-
options.fetch(:principal),
|
10
|
-
options.fetch(:guess))
|
11
|
-
|
12
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
13
|
-
end
|
14
|
-
|
15
|
-
def assert_interest_rate_stops_if_improvement_is_small options
|
16
|
-
actual = Refinance::Annuities.interest_rate(options.fetch(:payment),
|
17
|
-
options.fetch(:periods), options.fetch(:principal),
|
18
|
-
options.fetch(:guess), options.fetch(:precision))
|
19
|
-
|
20
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
21
|
-
end
|
22
|
-
|
23
|
-
def assert_interest_rate_does_multiple_iterations options
|
24
|
-
actual = Refinance::Annuities.interest_rate(options.fetch(:payment),
|
25
|
-
options.fetch(:periods), options.fetch(:principal),
|
26
|
-
options.fetch(:guess), options.fetch(:precision),
|
27
|
-
options.fetch(:max_decimals), options.fetch(:max_iterations))
|
28
|
-
|
29
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
30
|
-
end
|
31
|
-
|
32
|
-
def assert_payment options
|
33
|
-
actual = Refinance::Annuities.payment(options.fetch(:interest_rate),
|
34
|
-
options.fetch(:periods), options.fetch(:principal))
|
35
|
-
|
36
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
37
|
-
end
|
38
|
-
|
39
|
-
def assert_periods options
|
40
|
-
actual = Refinance::Annuities.periods(options.fetch(:interest_rate),
|
41
|
-
options.fetch(:payment), options.fetch(:principal))
|
42
|
-
|
43
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
44
|
-
end
|
45
|
-
|
46
|
-
def assert_principal options
|
47
|
-
actual = Refinance::Annuities.principal(options.fetch(:interest_rate),
|
48
|
-
options.fetch(:payment), options.fetch(:periods))
|
49
|
-
|
50
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
51
|
-
end
|
52
|
-
|
53
|
-
def assert_effective_interest_rate options
|
54
|
-
actual = Refinance::Annuities.effective_interest_rate(
|
55
|
-
options.fetch(:nominal_annual_interest_rate),
|
56
|
-
options.fetch(:compounding_periods_per_year))
|
57
|
-
|
58
|
-
assert_in_delta options.fetch(:expected), actual, options.fetch(:delta)
|
59
|
-
end
|
60
|
-
end
|
4
|
+
require 'annuities_helper'
|
metadata
CHANGED
@@ -1,56 +1,64 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- reInteractive
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - '='
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 10.
|
19
|
+
version: 10.3.2
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - '='
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 10.
|
26
|
+
version: 10.3.2
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: minitest
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '='
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: 5.3.5
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '='
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
version: 5.3.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bigdecimal
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.2.5
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.2.5
|
46
55
|
description: A collection of finance algorithms related to annuities.
|
47
|
-
email:
|
48
|
-
- enquiries@reinteractive.net
|
56
|
+
email: enquiries@reinteractive.net
|
49
57
|
executables: []
|
50
58
|
extensions: []
|
51
59
|
extra_rdoc_files: []
|
52
60
|
files:
|
53
|
-
- .gitignore
|
61
|
+
- ".gitignore"
|
54
62
|
- Gemfile
|
55
63
|
- LICENSE.txt
|
56
64
|
- README.md
|
@@ -59,6 +67,7 @@ files:
|
|
59
67
|
- lib/refinance/annuities.rb
|
60
68
|
- lib/refinance/version.rb
|
61
69
|
- refinance.gemspec
|
70
|
+
- test/annuities_helper.rb
|
62
71
|
- test/bigdecimal_annuities_test.rb
|
63
72
|
- test/float_annuities_test.rb
|
64
73
|
- test/refinance_test.rb
|
@@ -66,32 +75,29 @@ files:
|
|
66
75
|
homepage: https://github.com/reinteractive-open/refinance
|
67
76
|
licenses:
|
68
77
|
- MIT
|
78
|
+
metadata: {}
|
69
79
|
post_install_message:
|
70
80
|
rdoc_options: []
|
71
81
|
require_paths:
|
72
82
|
- lib
|
73
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
84
|
requirements:
|
76
|
-
- -
|
85
|
+
- - ">="
|
77
86
|
- !ruby/object:Gem::Version
|
78
87
|
version: 1.9.3
|
79
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
89
|
requirements:
|
82
|
-
- -
|
90
|
+
- - ">="
|
83
91
|
- !ruby/object:Gem::Version
|
84
92
|
version: '0'
|
85
|
-
segments:
|
86
|
-
- 0
|
87
|
-
hash: 1916847891747794597
|
88
93
|
requirements: []
|
89
94
|
rubyforge_project:
|
90
|
-
rubygems_version:
|
95
|
+
rubygems_version: 2.2.2
|
91
96
|
signing_key:
|
92
|
-
specification_version:
|
97
|
+
specification_version: 4
|
93
98
|
summary: Simple annuity algorithms
|
94
99
|
test_files:
|
100
|
+
- test/annuities_helper.rb
|
95
101
|
- test/bigdecimal_annuities_test.rb
|
96
102
|
- test/float_annuities_test.rb
|
97
103
|
- test/refinance_test.rb
|