finmodeling 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -0
- data/Gemfile +2 -0
- data/README.md +289 -269
- data/Rakefile +12 -0
- data/TODO.txt +113 -20
- data/examples/{dump_report.rb → dump_latest_10k.rb} +1 -1
- data/examples/list_disclosures.rb +50 -0
- data/examples/lists/nasdaq-mid-to-mega-tech-symbols.txt +0 -0
- data/examples/show_report.rb +112 -32
- data/examples/show_reports.rb +162 -33
- data/finmodeling.gemspec +4 -1
- data/lib/finmodeling/annual_report_filing.rb +97 -18
- data/lib/finmodeling/array_with_stats.rb +0 -0
- data/lib/finmodeling/assets_calculation.rb +12 -3
- data/lib/finmodeling/assets_item.rb +0 -0
- data/lib/finmodeling/assets_item_vectors.rb +0 -0
- data/lib/finmodeling/balance_sheet_analyses.rb +19 -4
- data/lib/finmodeling/balance_sheet_calculation.rb +52 -37
- data/lib/finmodeling/calculation_summary.rb +119 -14
- data/lib/finmodeling/can_cache_classifications.rb +0 -0
- data/lib/finmodeling/can_cache_summaries.rb +0 -0
- data/lib/finmodeling/can_choose_successive_periods.rb +15 -0
- data/lib/finmodeling/can_classify_rows.rb +0 -0
- data/lib/finmodeling/capm.rb +80 -0
- data/lib/finmodeling/cash_change_calculation.rb +3 -3
- data/lib/finmodeling/cash_change_item.rb +0 -0
- data/lib/finmodeling/cash_change_item_vectors.rb +0 -0
- data/lib/finmodeling/cash_change_summary_from_differences.rb +36 -0
- data/lib/finmodeling/cash_flow_statement_analyses.rb +36 -0
- data/lib/finmodeling/cash_flow_statement_calculation.rb +28 -52
- data/lib/finmodeling/classifiers.rb +2 -0
- data/lib/finmodeling/company.rb +0 -0
- data/lib/finmodeling/company_filing.rb +30 -7
- data/lib/finmodeling/company_filing_calculation.rb +16 -6
- data/lib/finmodeling/company_filings.rb +112 -46
- data/lib/finmodeling/comprehensive_income_calculation.rb +60 -0
- data/lib/finmodeling/comprehensive_income_statement_calculation.rb +74 -0
- data/lib/finmodeling/comprehensive_income_statement_item.rb +20 -0
- data/lib/finmodeling/comprehensive_income_statement_item_vectors.rb +235 -0
- data/lib/finmodeling/config.rb +0 -0
- data/lib/finmodeling/debt_cost_of_capital.rb +14 -0
- data/lib/finmodeling/equity_change_calculation.rb +43 -0
- data/lib/finmodeling/equity_change_item.rb +25 -0
- data/lib/finmodeling/equity_change_item_vectors.rb +156 -0
- data/lib/finmodeling/factory.rb +0 -0
- data/lib/finmodeling/fama_french_cost_of_equity.rb +119 -0
- data/lib/finmodeling/float_helpers.rb +14 -8
- data/lib/finmodeling/forecasted_reformulated_balance_sheet.rb +55 -0
- data/lib/finmodeling/forecasted_reformulated_income_statement.rb +110 -0
- data/lib/finmodeling/forecasts.rb +4 -4
- data/lib/finmodeling/has_string_classifer.rb +0 -0
- data/lib/finmodeling/income_statement_analyses.rb +23 -17
- data/lib/finmodeling/income_statement_calculation.rb +46 -43
- data/lib/finmodeling/income_statement_item.rb +1 -1
- data/lib/finmodeling/income_statement_item_vectors.rb +24 -13
- data/lib/finmodeling/invalid_filing_error.rb +4 -0
- data/lib/finmodeling/liabs_and_equity_calculation.rb +18 -8
- data/lib/finmodeling/liabs_and_equity_item.rb +1 -1
- data/lib/finmodeling/liabs_and_equity_item_vectors.rb +24 -24
- data/lib/finmodeling/linear_trend_forecasting_policy.rb +23 -0
- data/lib/finmodeling/net_income_calculation.rb +23 -10
- data/lib/finmodeling/net_income_summary_from_differences.rb +51 -0
- data/lib/finmodeling/paths.rb +0 -0
- data/lib/finmodeling/period_array.rb +8 -4
- data/lib/finmodeling/quarterly_report_filing.rb +9 -4
- data/lib/finmodeling/rate.rb +8 -0
- data/lib/finmodeling/ratio.rb +0 -0
- data/lib/finmodeling/reformulated_balance_sheet.rb +47 -88
- data/lib/finmodeling/reformulated_cash_flow_statement.rb +18 -41
- data/lib/finmodeling/reformulated_income_statement.rb +44 -206
- data/lib/finmodeling/reformulated_shareholder_equity_statement.rb +50 -0
- data/lib/finmodeling/reoi_valuation.rb +104 -0
- data/lib/finmodeling/shareholder_equity_statement_calculation.rb +34 -0
- data/lib/finmodeling/string_helpers.rb +18 -1
- data/lib/finmodeling/time_series_estimator.rb +25 -0
- data/lib/finmodeling/trailing_avg_forecasting_policy.rb +23 -0
- data/lib/finmodeling/version.rb +1 -1
- data/lib/finmodeling/weighted_avg_cost_of_capital.rb +35 -0
- data/lib/finmodeling/yahoo_finance_helpers.rb +20 -0
- data/lib/finmodeling.rb +33 -2
- data/spec/annual_report_filing_spec.rb +81 -45
- data/spec/assets_calculation_spec.rb +7 -4
- data/spec/assets_item_spec.rb +9 -14
- data/spec/balance_sheet_analyses_spec.rb +13 -13
- data/spec/balance_sheet_calculation_spec.rb +45 -51
- data/spec/calculation_summary_spec.rb +113 -21
- data/spec/can_classify_rows_spec.rb +0 -0
- data/spec/cash_change_calculation_spec.rb +1 -10
- data/spec/cash_change_item_spec.rb +10 -18
- data/spec/cash_flow_statement_calculation_spec.rb +10 -24
- data/spec/company_beta_spec.rb +53 -0
- data/spec/company_filing_calculation_spec.rb +39 -49
- data/spec/company_filing_spec.rb +0 -0
- data/spec/company_filings_spec.rb +75 -25
- data/spec/company_spec.rb +37 -47
- data/spec/comprehensive_income_statement_calculation_spec.rb +54 -0
- data/spec/comprehensive_income_statement_item_spec.rb +56 -0
- data/spec/debt_cost_of_capital_spec.rb +19 -0
- data/spec/equity_change_calculation_spec.rb +33 -0
- data/spec/equity_change_item_spec.rb +58 -0
- data/spec/factory_spec.rb +2 -2
- data/spec/forecasts_spec.rb +2 -2
- data/spec/income_statement_analyses_spec.rb +23 -21
- data/spec/income_statement_calculation_spec.rb +17 -49
- data/spec/income_statement_item_spec.rb +17 -29
- data/spec/liabs_and_equity_calculation_spec.rb +6 -3
- data/spec/liabs_and_equity_item_spec.rb +14 -22
- data/spec/linear_trend_forecasting_policy_spec.rb +37 -0
- data/spec/matchers/custom_matchers.rb +79 -0
- data/spec/mocks/calculation.rb +0 -0
- data/spec/mocks/income_statement_analyses.rb +0 -0
- data/spec/mocks/sec_query.rb +0 -0
- data/spec/net_income_calculation_spec.rb +16 -10
- data/spec/period_array.rb +0 -0
- data/spec/quarterly_report_filing_spec.rb +21 -38
- data/spec/rate_spec.rb +0 -0
- data/spec/ratio_spec.rb +0 -0
- data/spec/reformulated_balance_sheet_spec.rb +56 -33
- data/spec/reformulated_cash_flow_statement_spec.rb +18 -10
- data/spec/reformulated_income_statement_spec.rb +16 -15
- data/spec/reformulated_shareholder_equity_statement_spec.rb +43 -0
- data/spec/reoi_valuation_spec.rb +146 -0
- data/spec/shareholder_equity_statement_calculation_spec.rb +59 -0
- data/spec/spec_helper.rb +4 -1
- data/spec/string_helpers_spec.rb +15 -13
- data/spec/time_series_estimator_spec.rb +61 -0
- data/spec/trailing_avg_forecasting_policy_spec.rb +37 -0
- data/spec/weighted_avg_cost_of_capital_spec.rb +32 -0
- data/tools/create_equity_change_training_vectors.rb +49 -0
- data/tools/time_specs.sh +7 -0
- metadata +182 -36
- data/lib/finmodeling/constant_forecasting_policy.rb +0 -23
- data/lib/finmodeling/generic_forecasting_policy.rb +0 -19
- data/spec/constant_forecasting_policy_spec.rb +0 -37
- data/spec/generic_forecasting_policy_spec.rb +0 -33
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finmodeling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
12
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: fileutils
|
17
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ! '>='
|
@@ -22,10 +21,15 @@ dependencies:
|
|
22
21
|
version: '0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
26
30
|
- !ruby/object:Gem::Dependency
|
27
31
|
name: sec_query
|
28
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
29
33
|
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
@@ -33,10 +37,15 @@ dependencies:
|
|
33
37
|
version: '0'
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
37
46
|
- !ruby/object:Gem::Dependency
|
38
47
|
name: edgar
|
39
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
40
49
|
none: false
|
41
50
|
requirements:
|
42
51
|
- - ! '>='
|
@@ -44,32 +53,63 @@ dependencies:
|
|
44
53
|
version: '0'
|
45
54
|
type: :runtime
|
46
55
|
prerelease: false
|
47
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
48
62
|
- !ruby/object:Gem::Dependency
|
49
63
|
name: xbrlware-ruby19
|
50
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
51
65
|
none: false
|
52
66
|
requirements:
|
53
|
-
- - =
|
67
|
+
- - '='
|
54
68
|
- !ruby/object:Gem::Version
|
55
69
|
version: 1.1.2.19.2
|
56
70
|
type: :runtime
|
57
71
|
prerelease: false
|
58
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - '='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.1.2.19.2
|
59
78
|
- !ruby/object:Gem::Dependency
|
60
79
|
name: xbrlware-extras
|
61
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
62
81
|
none: false
|
63
82
|
requirements:
|
64
|
-
- - =
|
83
|
+
- - '='
|
65
84
|
- !ruby/object:Gem::Version
|
66
|
-
version: 1.1.2.19.
|
85
|
+
version: 1.1.2.19.3
|
67
86
|
type: :runtime
|
68
87
|
prerelease: false
|
69
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - '='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.1.2.19.3
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: nasdaq_query
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
70
110
|
- !ruby/object:Gem::Dependency
|
71
111
|
name: sec_query
|
72
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
73
113
|
none: false
|
74
114
|
requirements:
|
75
115
|
- - ! '>='
|
@@ -77,10 +117,15 @@ dependencies:
|
|
77
117
|
version: '0'
|
78
118
|
type: :runtime
|
79
119
|
prerelease: false
|
80
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
81
126
|
- !ruby/object:Gem::Dependency
|
82
127
|
name: naive_bayes
|
83
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
84
129
|
none: false
|
85
130
|
requirements:
|
86
131
|
- - ! '>='
|
@@ -88,10 +133,31 @@ dependencies:
|
|
88
133
|
version: '0'
|
89
134
|
type: :runtime
|
90
135
|
prerelease: false
|
91
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
92
142
|
- !ruby/object:Gem::Dependency
|
93
143
|
name: statsample
|
94
|
-
requirement:
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :runtime
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: yahoofinance
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
95
161
|
none: false
|
96
162
|
requirements:
|
97
163
|
- - ! '>='
|
@@ -99,21 +165,47 @@ dependencies:
|
|
99
165
|
version: '0'
|
100
166
|
type: :runtime
|
101
167
|
prerelease: false
|
102
|
-
version_requirements:
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: gsl
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ! '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :runtime
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
103
190
|
- !ruby/object:Gem::Dependency
|
104
191
|
name: rspec
|
105
|
-
requirement:
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
106
193
|
none: false
|
107
194
|
requirements:
|
108
|
-
- - =
|
195
|
+
- - '='
|
109
196
|
- !ruby/object:Gem::Version
|
110
197
|
version: '2.5'
|
111
198
|
type: :development
|
112
199
|
prerelease: false
|
113
|
-
version_requirements:
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - '='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '2.5'
|
114
206
|
- !ruby/object:Gem::Dependency
|
115
207
|
name: rake
|
116
|
-
requirement:
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
117
209
|
none: false
|
118
210
|
requirements:
|
119
211
|
- - ! '>='
|
@@ -121,7 +213,12 @@ dependencies:
|
|
121
213
|
version: '0'
|
122
214
|
type: :development
|
123
215
|
prerelease: false
|
124
|
-
version_requirements:
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ! '>='
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0'
|
125
222
|
description: A gem for manipulating XBRL financial filings
|
126
223
|
email:
|
127
224
|
- jim.lindstrom@gmail.com
|
@@ -134,7 +231,8 @@ files:
|
|
134
231
|
- README.md
|
135
232
|
- Rakefile
|
136
233
|
- TODO.txt
|
137
|
-
- examples/
|
234
|
+
- examples/dump_latest_10k.rb
|
235
|
+
- examples/list_disclosures.rb
|
138
236
|
- examples/lists/nasdaq-mid-to-mega-tech-symbols.txt
|
139
237
|
- examples/show_report.rb
|
140
238
|
- examples/show_reports.rb
|
@@ -150,31 +248,47 @@ files:
|
|
150
248
|
- lib/finmodeling/calculation_summary.rb
|
151
249
|
- lib/finmodeling/can_cache_classifications.rb
|
152
250
|
- lib/finmodeling/can_cache_summaries.rb
|
251
|
+
- lib/finmodeling/can_choose_successive_periods.rb
|
153
252
|
- lib/finmodeling/can_classify_rows.rb
|
253
|
+
- lib/finmodeling/capm.rb
|
154
254
|
- lib/finmodeling/cash_change_calculation.rb
|
155
255
|
- lib/finmodeling/cash_change_item.rb
|
156
256
|
- lib/finmodeling/cash_change_item_vectors.rb
|
257
|
+
- lib/finmodeling/cash_change_summary_from_differences.rb
|
258
|
+
- lib/finmodeling/cash_flow_statement_analyses.rb
|
157
259
|
- lib/finmodeling/cash_flow_statement_calculation.rb
|
158
260
|
- lib/finmodeling/classifiers.rb
|
159
261
|
- lib/finmodeling/company.rb
|
160
262
|
- lib/finmodeling/company_filing.rb
|
161
263
|
- lib/finmodeling/company_filing_calculation.rb
|
162
264
|
- lib/finmodeling/company_filings.rb
|
265
|
+
- lib/finmodeling/comprehensive_income_calculation.rb
|
266
|
+
- lib/finmodeling/comprehensive_income_statement_calculation.rb
|
267
|
+
- lib/finmodeling/comprehensive_income_statement_item.rb
|
268
|
+
- lib/finmodeling/comprehensive_income_statement_item_vectors.rb
|
163
269
|
- lib/finmodeling/config.rb
|
164
|
-
- lib/finmodeling/
|
270
|
+
- lib/finmodeling/debt_cost_of_capital.rb
|
271
|
+
- lib/finmodeling/equity_change_calculation.rb
|
272
|
+
- lib/finmodeling/equity_change_item.rb
|
273
|
+
- lib/finmodeling/equity_change_item_vectors.rb
|
165
274
|
- lib/finmodeling/factory.rb
|
275
|
+
- lib/finmodeling/fama_french_cost_of_equity.rb
|
166
276
|
- lib/finmodeling/float_helpers.rb
|
277
|
+
- lib/finmodeling/forecasted_reformulated_balance_sheet.rb
|
278
|
+
- lib/finmodeling/forecasted_reformulated_income_statement.rb
|
167
279
|
- lib/finmodeling/forecasts.rb
|
168
|
-
- lib/finmodeling/generic_forecasting_policy.rb
|
169
280
|
- lib/finmodeling/has_string_classifer.rb
|
170
281
|
- lib/finmodeling/income_statement_analyses.rb
|
171
282
|
- lib/finmodeling/income_statement_calculation.rb
|
172
283
|
- lib/finmodeling/income_statement_item.rb
|
173
284
|
- lib/finmodeling/income_statement_item_vectors.rb
|
285
|
+
- lib/finmodeling/invalid_filing_error.rb
|
174
286
|
- lib/finmodeling/liabs_and_equity_calculation.rb
|
175
287
|
- lib/finmodeling/liabs_and_equity_item.rb
|
176
288
|
- lib/finmodeling/liabs_and_equity_item_vectors.rb
|
289
|
+
- lib/finmodeling/linear_trend_forecasting_policy.rb
|
177
290
|
- lib/finmodeling/net_income_calculation.rb
|
291
|
+
- lib/finmodeling/net_income_summary_from_differences.rb
|
178
292
|
- lib/finmodeling/paths.rb
|
179
293
|
- lib/finmodeling/period_array.rb
|
180
294
|
- lib/finmodeling/quarterly_report_filing.rb
|
@@ -183,8 +297,15 @@ files:
|
|
183
297
|
- lib/finmodeling/reformulated_balance_sheet.rb
|
184
298
|
- lib/finmodeling/reformulated_cash_flow_statement.rb
|
185
299
|
- lib/finmodeling/reformulated_income_statement.rb
|
300
|
+
- lib/finmodeling/reformulated_shareholder_equity_statement.rb
|
301
|
+
- lib/finmodeling/reoi_valuation.rb
|
302
|
+
- lib/finmodeling/shareholder_equity_statement_calculation.rb
|
186
303
|
- lib/finmodeling/string_helpers.rb
|
304
|
+
- lib/finmodeling/time_series_estimator.rb
|
305
|
+
- lib/finmodeling/trailing_avg_forecasting_policy.rb
|
187
306
|
- lib/finmodeling/version.rb
|
307
|
+
- lib/finmodeling/weighted_avg_cost_of_capital.rb
|
308
|
+
- lib/finmodeling/yahoo_finance_helpers.rb
|
188
309
|
- spec/annual_report_filing_spec.rb
|
189
310
|
- spec/assets_calculation_spec.rb
|
190
311
|
- spec/assets_item_spec.rb
|
@@ -195,19 +316,25 @@ files:
|
|
195
316
|
- spec/cash_change_calculation_spec.rb
|
196
317
|
- spec/cash_change_item_spec.rb
|
197
318
|
- spec/cash_flow_statement_calculation_spec.rb
|
319
|
+
- spec/company_beta_spec.rb
|
198
320
|
- spec/company_filing_calculation_spec.rb
|
199
321
|
- spec/company_filing_spec.rb
|
200
322
|
- spec/company_filings_spec.rb
|
201
323
|
- spec/company_spec.rb
|
202
|
-
- spec/
|
324
|
+
- spec/comprehensive_income_statement_calculation_spec.rb
|
325
|
+
- spec/comprehensive_income_statement_item_spec.rb
|
326
|
+
- spec/debt_cost_of_capital_spec.rb
|
327
|
+
- spec/equity_change_calculation_spec.rb
|
328
|
+
- spec/equity_change_item_spec.rb
|
203
329
|
- spec/factory_spec.rb
|
204
330
|
- spec/forecasts_spec.rb
|
205
|
-
- spec/generic_forecasting_policy_spec.rb
|
206
331
|
- spec/income_statement_analyses_spec.rb
|
207
332
|
- spec/income_statement_calculation_spec.rb
|
208
333
|
- spec/income_statement_item_spec.rb
|
209
334
|
- spec/liabs_and_equity_calculation_spec.rb
|
210
335
|
- spec/liabs_and_equity_item_spec.rb
|
336
|
+
- spec/linear_trend_forecasting_policy_spec.rb
|
337
|
+
- spec/matchers/custom_matchers.rb
|
211
338
|
- spec/mocks/calculation.rb
|
212
339
|
- spec/mocks/income_statement_analyses.rb
|
213
340
|
- spec/mocks/sec_query.rb
|
@@ -219,13 +346,20 @@ files:
|
|
219
346
|
- spec/reformulated_balance_sheet_spec.rb
|
220
347
|
- spec/reformulated_cash_flow_statement_spec.rb
|
221
348
|
- spec/reformulated_income_statement_spec.rb
|
349
|
+
- spec/reformulated_shareholder_equity_statement_spec.rb
|
350
|
+
- spec/reoi_valuation_spec.rb
|
351
|
+
- spec/shareholder_equity_statement_calculation_spec.rb
|
222
352
|
- spec/spec_helper.rb
|
223
353
|
- spec/string_helpers_spec.rb
|
354
|
+
- spec/time_series_estimator_spec.rb
|
355
|
+
- spec/trailing_avg_forecasting_policy_spec.rb
|
356
|
+
- spec/weighted_avg_cost_of_capital_spec.rb
|
224
357
|
- tools/create_balance_sheet_training_vectors.rb
|
225
358
|
- tools/create_cash_change_training_vectors.rb
|
226
359
|
- tools/create_credit_debit_training_vectors.rb
|
360
|
+
- tools/create_equity_change_training_vectors.rb
|
227
361
|
- tools/create_income_statement_training_vectors.rb
|
228
|
-
|
362
|
+
- tools/time_specs.sh
|
229
363
|
homepage: https://github.com/jimlindstrom/FinModeling
|
230
364
|
licenses: []
|
231
365
|
post_install_message:
|
@@ -246,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
380
|
version: '0'
|
247
381
|
requirements: []
|
248
382
|
rubyforge_project:
|
249
|
-
rubygems_version: 1.
|
383
|
+
rubygems_version: 1.8.24
|
250
384
|
signing_key:
|
251
385
|
specification_version: 3
|
252
386
|
summary: A gem for manipulating XBRL financial filings
|
@@ -261,19 +395,25 @@ test_files:
|
|
261
395
|
- spec/cash_change_calculation_spec.rb
|
262
396
|
- spec/cash_change_item_spec.rb
|
263
397
|
- spec/cash_flow_statement_calculation_spec.rb
|
398
|
+
- spec/company_beta_spec.rb
|
264
399
|
- spec/company_filing_calculation_spec.rb
|
265
400
|
- spec/company_filing_spec.rb
|
266
401
|
- spec/company_filings_spec.rb
|
267
402
|
- spec/company_spec.rb
|
268
|
-
- spec/
|
403
|
+
- spec/comprehensive_income_statement_calculation_spec.rb
|
404
|
+
- spec/comprehensive_income_statement_item_spec.rb
|
405
|
+
- spec/debt_cost_of_capital_spec.rb
|
406
|
+
- spec/equity_change_calculation_spec.rb
|
407
|
+
- spec/equity_change_item_spec.rb
|
269
408
|
- spec/factory_spec.rb
|
270
409
|
- spec/forecasts_spec.rb
|
271
|
-
- spec/generic_forecasting_policy_spec.rb
|
272
410
|
- spec/income_statement_analyses_spec.rb
|
273
411
|
- spec/income_statement_calculation_spec.rb
|
274
412
|
- spec/income_statement_item_spec.rb
|
275
413
|
- spec/liabs_and_equity_calculation_spec.rb
|
276
414
|
- spec/liabs_and_equity_item_spec.rb
|
415
|
+
- spec/linear_trend_forecasting_policy_spec.rb
|
416
|
+
- spec/matchers/custom_matchers.rb
|
277
417
|
- spec/mocks/calculation.rb
|
278
418
|
- spec/mocks/income_statement_analyses.rb
|
279
419
|
- spec/mocks/sec_query.rb
|
@@ -285,5 +425,11 @@ test_files:
|
|
285
425
|
- spec/reformulated_balance_sheet_spec.rb
|
286
426
|
- spec/reformulated_cash_flow_statement_spec.rb
|
287
427
|
- spec/reformulated_income_statement_spec.rb
|
428
|
+
- spec/reformulated_shareholder_equity_statement_spec.rb
|
429
|
+
- spec/reoi_valuation_spec.rb
|
430
|
+
- spec/shareholder_equity_statement_calculation_spec.rb
|
288
431
|
- spec/spec_helper.rb
|
289
432
|
- spec/string_helpers_spec.rb
|
433
|
+
- spec/time_series_estimator_spec.rb
|
434
|
+
- spec/trailing_avg_forecasting_policy_spec.rb
|
435
|
+
- spec/weighted_avg_cost_of_capital_spec.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module FinModeling
|
2
|
-
class ConstantForecastingPolicy
|
3
|
-
def initialize(args)
|
4
|
-
@vals = args
|
5
|
-
end
|
6
|
-
|
7
|
-
def revenue_growth
|
8
|
-
@vals[:revenue_growth]
|
9
|
-
end
|
10
|
-
|
11
|
-
def sales_pm
|
12
|
-
@vals[:sales_pm]
|
13
|
-
end
|
14
|
-
|
15
|
-
def fi_over_nfa
|
16
|
-
@vals[:fi_over_nfa]
|
17
|
-
end
|
18
|
-
|
19
|
-
def sales_over_noa
|
20
|
-
@vals[:sales_over_noa]
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# constant_forecasting_policy_spec.rb
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe FinModeling::ConstantForecastingPolicy do
|
6
|
-
before (:all) do
|
7
|
-
@vals = { :revenue_growth => 0.04,
|
8
|
-
:sales_pm => 0.20,
|
9
|
-
:fi_over_nfa => 0.01,
|
10
|
-
:sales_over_noa => 2.00 }
|
11
|
-
@policy = FinModeling::ConstantForecastingPolicy.new(@vals)
|
12
|
-
end
|
13
|
-
|
14
|
-
describe ".revenue_growth" do
|
15
|
-
subject { @policy.revenue_growth }
|
16
|
-
it { should be_an_instance_of Float }
|
17
|
-
it { should be_within(0.01).of(@vals[:revenue_growth]) }
|
18
|
-
end
|
19
|
-
|
20
|
-
describe ".sales_pm" do
|
21
|
-
subject { @policy.sales_pm }
|
22
|
-
it { should be_an_instance_of Float }
|
23
|
-
it { should be_within(0.01).of(@vals[:sales_pm]) }
|
24
|
-
end
|
25
|
-
|
26
|
-
describe ".fi_over_nfa" do
|
27
|
-
subject { @policy.fi_over_nfa }
|
28
|
-
it { should be_an_instance_of Float }
|
29
|
-
it { should be_within(0.01).of(@vals[:fi_over_nfa]) }
|
30
|
-
end
|
31
|
-
|
32
|
-
describe ".sales_over_noa" do
|
33
|
-
subject { @policy.sales_over_noa }
|
34
|
-
it { should be_an_instance_of Float }
|
35
|
-
it { should be_within(0.01).of(@vals[:sales_over_noa]) }
|
36
|
-
end
|
37
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# generic_forecasting_policy_spec.rb
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe FinModeling::GenericForecastingPolicy do
|
6
|
-
before (:all) do
|
7
|
-
@policy = FinModeling::GenericForecastingPolicy.new
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".revenue_growth" do
|
11
|
-
subject { @policy.revenue_growth }
|
12
|
-
it { should be_an_instance_of Float }
|
13
|
-
it { should be_within(0.01).of(0.04) } # FIXME: Make this not hard-coded
|
14
|
-
end
|
15
|
-
|
16
|
-
describe ".sales_pm" do
|
17
|
-
subject { @policy.sales_pm }
|
18
|
-
it { should be_an_instance_of Float }
|
19
|
-
it { should be_within(0.01).of(0.20) } # FIXME: Make this not hard-coded
|
20
|
-
end
|
21
|
-
|
22
|
-
describe ".fi_over_nfa" do
|
23
|
-
subject { @policy.fi_over_nfa }
|
24
|
-
it { should be_an_instance_of Float }
|
25
|
-
it { should be_within(0.01).of(0.01) } # FIXME: Make this not hard-coded
|
26
|
-
end
|
27
|
-
|
28
|
-
describe ".sales_over_noa" do
|
29
|
-
subject { @policy.sales_over_noa }
|
30
|
-
it { should be_an_instance_of Float }
|
31
|
-
it { should be_within(0.01).of(2.00) } # FIXME: Make this not hard-coded
|
32
|
-
end
|
33
|
-
end
|