finance 0.1.0 → 0.1.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.
- data/README +15 -16
- metadata +3 -3
data/README
CHANGED
@@ -2,40 +2,40 @@ _finance_ - a library for financial calculations in Ruby.
|
|
2
2
|
|
3
3
|
= INSTALL
|
4
4
|
|
5
|
-
|
5
|
+
$ sudo gem install finance
|
6
6
|
|
7
7
|
= OVERVIEW
|
8
8
|
|
9
9
|
== GETTING STARTED
|
10
10
|
|
11
|
-
|
11
|
+
>> require 'finance'
|
12
12
|
|
13
13
|
== AMORTIZATION
|
14
14
|
|
15
15
|
You are interested in borrowing $250,000 under a 30 year, fixed-rate loan with a 4.25% APR.
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
>> rate = Rate.new(0.0425, :apr, :duration => 30.years)
|
18
|
+
>> amortization = 250000.amortize(rate)
|
19
19
|
|
20
20
|
Find the standard monthly payment:
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
>> amortization.payment
|
23
|
+
=> DecNum('-1229.91')
|
24
24
|
|
25
25
|
Find the total cost of the loan:
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
>> amortization.payments.sum
|
28
|
+
=> DecNum('-442766.55')
|
29
29
|
|
30
30
|
How much will you pay in interest?
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
>> amortization.interest.sum
|
33
|
+
=> DecNum('192766.55')
|
34
34
|
|
35
35
|
How much interest in the first six months?
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
>> amortization.interest[0,6].sum
|
38
|
+
=> DecNum('5294.62')
|
39
39
|
|
40
40
|
= ABOUT
|
41
41
|
|
@@ -57,18 +57,17 @@ Currently implemented features include:
|
|
57
57
|
Planned features include:
|
58
58
|
|
59
59
|
* Adjustable rate mortgage amortization.
|
60
|
-
* Payment modifications (i.e., how does paying an additional $75 per
|
61
|
-
month affect the amortization?)
|
60
|
+
* Payment modifications (i.e., how does paying an additional $75 per month affect the amortization?)
|
62
61
|
* Balloon payments.
|
63
62
|
* Support for amortization methods other than 30/360.
|
64
63
|
|
65
64
|
= RESOURCES
|
66
65
|
|
67
66
|
This gem and related documentation is available through
|
68
|
-
|
67
|
+
{https://rubygems.org/gems/finance RubyGems}.
|
69
68
|
|
70
69
|
Source code and bug tracking is available via
|
71
|
-
|
70
|
+
{http://github.com/wkranec/finance github}.
|
72
71
|
|
73
72
|
= COPYRIGHT
|
74
73
|
|
metadata
CHANGED