finrb 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.dockerignore +2 -0
- data/.gitattributes +83 -0
- data/.gitignore +114 -0
- data/.rubocop.yml +19 -0
- data/.ruby-version +1 -0
- data/.semver +5 -0
- data/.travis.yml +7 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +74 -0
- data/COPYING +674 -0
- data/COPYING.LESSER +165 -0
- data/Dockerfile +35 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +116 -0
- data/README.md +99 -0
- data/Rakefile +33 -0
- data/docs/.gitkeep +0 -0
- data/docs/api.md +1104 -0
- data/finrb.gemspec +98 -0
- data/lib/finrb/amortization.rb +199 -0
- data/lib/finrb/cashflows.rb +171 -0
- data/lib/finrb/config.rb +11 -0
- data/lib/finrb/decimal.rb +23 -0
- data/lib/finrb/rates.rb +167 -0
- data/lib/finrb/transaction.rb +124 -0
- data/lib/finrb/utils.rb +1171 -0
- data/lib/finrb.rb +23 -0
- metadata +306 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b72e5d95b3aa441749bbee34bca785ca86672b0cfcc88c93d1112f7e23711c92
|
4
|
+
data.tar.gz: ccafe9aadb9b906f8666f3367bae4c197f72590e09271da4f58e363dff528aaf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 887939c488c423d841e409688d40f1c064591a1e52548787d5f20424ca63c50fc9eba081388dcf73700a2f0e71708ed3873dd348d1a4e284d1e23a4efb4d7c7a
|
7
|
+
data.tar.gz: 3f0174c556ac2760e01235e891cfeb8665a3f81eac55c41137ae08d9aa1e2c1534b401c23b5dd24c30df97797d04d6dc5c6125830857e1292d5e6fd013767a12
|
data/.dockerignore
ADDED
data/.gitattributes
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
# Common settings that generally should always be used with your language specific settings
|
2
|
+
|
3
|
+
# Auto detect text files and perform LF normalization
|
4
|
+
* text=auto
|
5
|
+
|
6
|
+
#
|
7
|
+
# The above will handle all files NOT found below
|
8
|
+
#
|
9
|
+
|
10
|
+
# Documents
|
11
|
+
*.bibtex text diff=bibtex
|
12
|
+
*.doc diff=astextplain
|
13
|
+
*.DOC diff=astextplain
|
14
|
+
*.docx diff=astextplain
|
15
|
+
*.DOCX diff=astextplain
|
16
|
+
*.dot diff=astextplain
|
17
|
+
*.DOT diff=astextplain
|
18
|
+
*.pdf diff=astextplain
|
19
|
+
*.PDF diff=astextplain
|
20
|
+
*.rtf diff=astextplain
|
21
|
+
*.RTF diff=astextplain
|
22
|
+
*.md text diff=markdown
|
23
|
+
*.mdx text diff=markdown
|
24
|
+
*.tex text diff=tex
|
25
|
+
*.adoc text
|
26
|
+
*.textile text
|
27
|
+
*.mustache text
|
28
|
+
*.csv text
|
29
|
+
*.tab text
|
30
|
+
*.tsv text
|
31
|
+
*.txt text
|
32
|
+
*.sql text
|
33
|
+
*.epub diff=astextplain
|
34
|
+
|
35
|
+
# Graphics
|
36
|
+
*.png binary
|
37
|
+
*.jpg binary
|
38
|
+
*.jpeg binary
|
39
|
+
*.gif binary
|
40
|
+
*.tif binary
|
41
|
+
*.tiff binary
|
42
|
+
*.ico binary
|
43
|
+
# SVG treated as text by default.
|
44
|
+
*.svg text
|
45
|
+
# If you want to treat it as binary,
|
46
|
+
# use the following line instead.
|
47
|
+
# *.svg binary
|
48
|
+
*.eps binary
|
49
|
+
|
50
|
+
# Scripts
|
51
|
+
*.bash text eol=lf
|
52
|
+
*.fish text eol=lf
|
53
|
+
*.sh text eol=lf
|
54
|
+
*.zsh text eol=lf
|
55
|
+
# These are explicitly windows files and should use crlf
|
56
|
+
*.bat text eol=crlf
|
57
|
+
*.cmd text eol=crlf
|
58
|
+
*.ps1 text eol=crlf
|
59
|
+
|
60
|
+
# Serialisation
|
61
|
+
*.json text
|
62
|
+
*.toml text
|
63
|
+
*.xml text
|
64
|
+
*.yaml text
|
65
|
+
*.yml text
|
66
|
+
|
67
|
+
# Archives
|
68
|
+
*.7z binary
|
69
|
+
*.gz binary
|
70
|
+
*.tar binary
|
71
|
+
*.tgz binary
|
72
|
+
*.zip binary
|
73
|
+
|
74
|
+
# Text files where line endings should be preserved
|
75
|
+
*.patch -text
|
76
|
+
|
77
|
+
#
|
78
|
+
# Exclude files from exporting
|
79
|
+
#
|
80
|
+
|
81
|
+
.gitattributes export-ignore
|
82
|
+
.gitignore export-ignore
|
83
|
+
.gitkeep export-ignore
|
data/.gitignore
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
# Used by dotenv library to load environment variables.
|
2
|
+
# .env
|
3
|
+
|
4
|
+
# Ignore Byebug command history file.
|
5
|
+
.byebug_history
|
6
|
+
|
7
|
+
## Specific to RubyMotion:
|
8
|
+
.dat*
|
9
|
+
.repl_history
|
10
|
+
build/
|
11
|
+
*.bridgesupport
|
12
|
+
build-iPhoneOS/
|
13
|
+
build-iPhoneSimulator/
|
14
|
+
|
15
|
+
## Specific to RubyMotion (use of CocoaPods):
|
16
|
+
#
|
17
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
18
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
19
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
20
|
+
#
|
21
|
+
# vendor/Pods/
|
22
|
+
|
23
|
+
## Documentation cache and generated files:
|
24
|
+
/.yardoc/
|
25
|
+
/_yardoc/
|
26
|
+
/doc/
|
27
|
+
/rdoc/
|
28
|
+
|
29
|
+
## Environment normalization:
|
30
|
+
/.bundle/
|
31
|
+
/vendor/bundle
|
32
|
+
/lib/bundler/man/
|
33
|
+
|
34
|
+
# for a library or gem, you might want to ignore these files since the code is
|
35
|
+
# intended to run in multiple environments; otherwise, check them in:
|
36
|
+
# Gemfile.lock
|
37
|
+
# .ruby-version
|
38
|
+
# .ruby-gemset
|
39
|
+
|
40
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
41
|
+
.rvmrc
|
42
|
+
|
43
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
44
|
+
# .rubocop-https?--*
|
45
|
+
|
46
|
+
*.rbc
|
47
|
+
capybara-*.html
|
48
|
+
.rspec
|
49
|
+
/db/*.sqlite3
|
50
|
+
/db/*.sqlite3-journal
|
51
|
+
/db/*.sqlite3-[0-9]*
|
52
|
+
/public/system
|
53
|
+
/coverage/
|
54
|
+
/spec/tmp
|
55
|
+
*.orig
|
56
|
+
rerun.txt
|
57
|
+
pickle-email-*.html
|
58
|
+
|
59
|
+
# Ignore all logfiles and tempfiles.
|
60
|
+
/log/*
|
61
|
+
/tmp/*
|
62
|
+
!/log/.keep
|
63
|
+
!/tmp/.keep
|
64
|
+
|
65
|
+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
66
|
+
config/initializers/secret_token.rb
|
67
|
+
config/master.key
|
68
|
+
|
69
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
70
|
+
# config/secrets.yml
|
71
|
+
|
72
|
+
# dotenv, dotenv-rails
|
73
|
+
# TODO Comment out these rules if environment variables can be committed
|
74
|
+
.env
|
75
|
+
.env*.local
|
76
|
+
|
77
|
+
## Environment normalization:
|
78
|
+
/.bundle
|
79
|
+
/vendor/bundle
|
80
|
+
|
81
|
+
# these should all be checked in to normalize the environment:
|
82
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
83
|
+
|
84
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
85
|
+
.rvmrc
|
86
|
+
|
87
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
88
|
+
/vendor/assets/bower_components
|
89
|
+
*.bowerrc
|
90
|
+
bower.json
|
91
|
+
|
92
|
+
# Ignore pow environment settings
|
93
|
+
.powenv
|
94
|
+
|
95
|
+
# Ignore Byebug command history file.
|
96
|
+
.byebug_history
|
97
|
+
|
98
|
+
# Ignore node_modules
|
99
|
+
node_modules/
|
100
|
+
|
101
|
+
# Ignore precompiled javascript packs
|
102
|
+
/public/packs
|
103
|
+
/public/packs-test
|
104
|
+
/public/assets
|
105
|
+
|
106
|
+
# Ignore yarn files
|
107
|
+
/yarn-error.log
|
108
|
+
yarn-debug.log*
|
109
|
+
.yarn-integrity
|
110
|
+
|
111
|
+
# Ignore uploaded files in development
|
112
|
+
/storage/*
|
113
|
+
!/storage/.keep
|
114
|
+
/public/uploads
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rake
|
4
|
+
- rubocop-minitest
|
5
|
+
|
6
|
+
Lint/NumberConversion:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
TargetRubyVersion: 3.0
|
11
|
+
EnabledByDefault: true
|
12
|
+
NewCops: enable
|
13
|
+
UseCache: true
|
14
|
+
Exclude:
|
15
|
+
- '.git/**/*'
|
16
|
+
- 'tmp/**/*'
|
17
|
+
- 'bin/**/*'
|
18
|
+
CacheRootDirectory: tmp
|
19
|
+
MaxFilesInCache: 36000
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1.2
|
data/.semver
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--no-private lib/**/*.rb - COPYING COPYING.LESSER HISTORY README
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# finrb changelog
|
2
|
+
|
3
|
+
# Finance gem changelog
|
4
|
+
|
5
|
+
## Version 2.0.2
|
6
|
+
|
7
|
+
19 March 2019
|
8
|
+
|
9
|
+
* Fix BigDecimal deprecation warning
|
10
|
+
* Support Ruby 2.6.2
|
11
|
+
* Update dependencies
|
12
|
+
|
13
|
+
## Version 2.0.1
|
14
|
+
|
15
|
+
17 October 2017
|
16
|
+
|
17
|
+
* Added Support for configuration file to set up default eps and guess for IRR & XIRR
|
18
|
+
* Added guess rate for IRR & XIRR
|
19
|
+
* NVP now does not change the given cashflow array
|
20
|
+
|
21
|
+
## Version 2.0.0
|
22
|
+
|
23
|
+
23 Jul 2013
|
24
|
+
|
25
|
+
* Removed Integer#months, Integer#years, and replaced Numeric#to_d by Numeric#to_s in the interest of Rails compatibility.
|
26
|
+
* Converted unit tests from the shoulda framework to minitest.
|
27
|
+
* Removed octal numbers in test_cashflow.rb
|
28
|
+
* Thanks to @thadd, @bramswenson, and @xpe for their contributions to this release!
|
29
|
+
|
30
|
+
## Version 1.1.2
|
31
|
+
|
32
|
+
16 Jun 2012
|
33
|
+
|
34
|
+
* Bugfix: Array#irr and Array#xirr check for a valid sequence of cash flows.
|
35
|
+
* Bugfix: Integer#months and Integer#years no longer collide with Rails methods.
|
36
|
+
|
37
|
+
## Version 1.1.0
|
38
|
+
|
39
|
+
11 Sep 2011
|
40
|
+
|
41
|
+
* Added XNPV and XIRR functions, with basic testing.
|
42
|
+
* Bugfix: Array#sum no longer collides with the Array#sum defined in Rails.
|
43
|
+
* Bugfix: Numeric#amortize now correctly calls Finrb::Amortization#new.
|
44
|
+
|
45
|
+
## Version 1.0.0
|
46
|
+
|
47
|
+
20 Jul 2011
|
48
|
+
|
49
|
+
* Moved to Ruby 1.9.
|
50
|
+
* All classes are now contained within the +Finrb+ namespace.
|
51
|
+
* LOTS of additional documentation and examples.
|
52
|
+
* Introduced _shoulda_ for unit tests, to make things a little more readable.
|
53
|
+
* Bugfix: The +amortize+ Numeric method now accepts a variable number of rates.
|
54
|
+
* Some code refactoring and clean-up for a small performance increase.
|
55
|
+
|
56
|
+
## Version 0.2.0
|
57
|
+
|
58
|
+
28 Jun 2011
|
59
|
+
|
60
|
+
* Added support for adjustable rate mortgages.
|
61
|
+
* Added support for additional payments.
|
62
|
+
|
63
|
+
## Version 0.1.1
|
64
|
+
|
65
|
+
21 Jun 2011
|
66
|
+
|
67
|
+
* Code examples in README now display correctly in the online documentation.
|
68
|
+
|
69
|
+
## Version 0.1.0
|
70
|
+
|
71
|
+
21 Jun 2011
|
72
|
+
|
73
|
+
* Support for fixed-rate mortgage amortization.
|
74
|
+
* NPV, IRR array methods for cash flow analysis.
|