Code Monkey home page Code Monkey logo

finmodeling's Introduction

Build Status

Overview

FinModeling is an equity valuation framework. It can retrieve and parse XBRL-based filings from SEC Edgar. As of March 2013, it can successfully parse the last 2-5 years of quarterly and annual filings from 52% of the Nasdaq 100 companies. (The remainder fail due to a long-tail distribution of filing formatting peculiarities for which I haven't yet written special-case code to handle.)

Please take a moment to give me your feedback on the gem so that I can make it even better.

Features

  • Pulls annual (10-k) and quarterly (10-q) financial reports from SEC Edgar
  • Uses Naive Bayes Classifiers to classify financial statement items
    • trained on medium-to-large NASDAQ tech companies
  • Reformulates GAAP statements to better highlight enterprise value
  • Generates forecasts based on analysis of historical performance
  • Calculates cost of capital using either CAPM or Fama/French cost of equity, and WACC
  • Performs residual operating income-based valuation.

Example 1: Valuing Oracle's Common Equity, Based on 4 Quarters of History and 2 Quarters of Forecasts

$ ./examples/show_reports.rb --num-forecasts 2 --do-valuation orcl 2012-02-01
Forecasting 2 periods
Doing valuation
company name: ORACLE CORP

	                      2012-02-29    2012-05-31    2012-08-31    2012-11-30   2013-02-28E   2013-05-28E
	NOA ($MM)               29,250.0      32,172.0      29,172.0      31,703.0      31,072.0      33,307.0
	NFA ($MM)               14,016.0      11,915.0      14,564.0      11,707.0      14,672.0      15,375.0
	Minority Interest          393.0         399.0         407.0         427.0           0.0           0.0
	 ($MM)
	CSE ($MM)               42,873.0      43,688.0      43,329.0      42,983.0      45,743.0      48,682.0
	Composition Ratio         2.0869        2.7001        2.0030        2.7080        2.1177        2.1663
	NOA Growth                              0.4590       -0.3218        0.3961       -0.0783        0.3296
	CSE Growth                              0.0775       -0.0322       -0.0316        0.2871        0.2909


	                      2012-02-29    2012-05-31    2012-08-31    2012-11-30   2013-02-28E   2013-05-28E
	Revenue ($MM)            9,039.0      10,916.0       8,181.0       9,094.0       9,748.0      10,450.0
	Core OI ($MM)            2,674.0       3,636.0       2,076.0       2,712.0       2,870.0       3,076.0
	OI ($MM)                 2,608.0       3,590.0       2,149.0       2,705.0
	FI ($MM)                  -110.0        -138.0        -115.0        -124.0        -110.0        -137.0
	NI ($MM)                 2,498.0       3,452.0       2,034.0       2,581.0       2,760.0       2,939.0
	Gross Margin              0.6008        0.6238        0.5941        0.6077
	Sales PM                  0.2958        0.3330        0.2537        0.2981        0.2943        0.2943
	Operating PM              0.2885        0.3288        0.2626        0.2974
	FI / Sales               -0.0121       -0.0126       -0.0140       -0.0136       -0.0112       -0.0131
	NI / Sales                0.2763        0.3162        0.2486        0.2838        0.2831        0.2812
	Sales / NOA                             1.4806        1.0199        1.2642        1.2610        1.3949
	FI / NFA                               -0.0390       -0.0387       -0.0345       -0.0383       -0.0388
	Revenue Growth                          1.1139       -0.6815        0.5286        0.3254        0.3296
	Core OI Growth                          2.3835       -0.8918        1.9216        0.2582        0.3296
	OI Growth                               2.5532       -0.8693        1.5169
	ReOI ($MM)                             2,879.0       1,367.0       2,004.0       2,116.0       2,346.0


	                      Unknown...    2012-05-31    2012-08-31    2012-11-30
	C ($MM)                                4,057.0       5,431.0         677.0
	I ($MM)                              -10,966.0      -7,304.0     -11,021.0
	d ($MM)                                9,358.0       4,662.0      13,363.0
	F ($MM)                               -2,449.0      -2,789.0      -3,019.0
	FCF ($MM)                             -6,909.0      -1,873.0     -10,344.0
	NI / C                                  0.8508        0.3745        3.8124

Cost of Capital
	                      2013-03-10
	Market Value of        169,100.0
	 Equity ($MM)
	Market Value of         23,663.0
	 Debt ($MM)
	Cost of Equity (%)          7.30
	Cost of Debt (%)            3.20
	Weighted Avg Cost           6.79
	 of Capital (%)

ReOI Valuation
	                      2012-11-30    2013-02-28   2013-05-28E
	ReOI ($MM)                             2,352.0       2,574.0
	PV(ReOI) ($MM)                         2,356.0
	CV ($MM)                              37,886.0
	PV(CV) ($MM)                          37,954.0
	Book Value of           42,983.0
	 Common Equity
	 ($MM)
	Enterprise Value        83,293.0
	 ($MM)
	NFA ($MM)               11,707.0
	Value of Common         95,000.0
	 Equity ($MM)
	# Shares (MM)            4,735.0
	Value / Share ($)          20.06

Example 2: More Detailed Analysis of Apple's Financials Since 2012-02-01

$ ./examples/show_reports.rb --balance-detail --income-detail --show-regressions aapl 2012-02-01
Balance sheet detail is enabled
Net income detail is enabled
Showing regressions
company name: APPLE INC

	                      2012-03-31    2012-06-30    2012-09-29    2012-12-29
	A ($MM)                150,934.0     162,896.0     176,064.0     196,088.0
	L ($MM)                 48,436.0      51,150.0      57,854.0      68,742.0
	NOA ($MM)               -9,931.0      -7,784.0      -5,624.0     -12,661.0
	OA ($MM)                38,505.0      43,366.0      52,230.0      56,081.0
	OL ($MM)                48,436.0      51,150.0      57,854.0      68,742.0
	NFA ($MM)              112,429.0     119,530.0     123,834.0     140,007.0
	FA ($MM)               112,429.0     119,530.0     123,834.0     140,007.0
	FL ($MM)                     0.0           0.0           0.0           0.0
	Minority Interest            0.0           0.0           0.0           0.0
	 ($MM)
	CSE ($MM)              102,498.0     111,746.0     118,210.0     127,346.0
	Composition Ratio        -0.0883       -0.0651       -0.0454       -0.0904
	NOA Δ ($MM)                            2,147.0       2,160.0      -7,037.0
	CSE Δ ($MM)                            9,248.0       6,464.0       9,136.0
	NOA Growth                             -0.6235       -0.7284       24.9157
	CSE Growth                              0.4140        0.2530        0.3479

		NOA growth: a:-4.9150, b:12.7696, r:0.8642, var:145.5436

	                      2012-03-31    2012-06-30    2012-09-29    2012-12-29
	Revenue ($MM)           39,186.0      35,023.0      35,966.0      54,512.0
	COGS ($MM)             -20,622.0     -20,029.0     -21,565.0     -33,452.0
	GM ($MM)                18,564.0      14,994.0      14,401.0      21,060.0
	OE ($MM)                -3,180.0      -3,421.0      -3,457.0      -3,850.0
	OISBT ($MM)             15,384.0      11,573.0      10,944.0      17,210.0
	Core OI ($MM)           11,526.0       8,637.0       8,256.0      12,778.0
	OI ($MM)                11,526.0       8,637.0       8,256.0      12,778.0
	FI ($MM)                    96.0         187.0         -33.0         300.0
	NI ($MM)                11,622.0       8,824.0       8,223.0      13,078.0
	Gross Margin              0.4737        0.4281        0.4004        0.3863
	Sales PM                  0.2941        0.2466        0.2295        0.2344
	Operating PM              0.2941        0.2466        0.2295        0.2344
	FI / Sales                0.0024        0.0053       -0.0009        0.0055
	NI / Sales                0.2965        0.2519        0.2286        0.2399
	Sales / NOA                           -14.3024      -18.5327      -39.3094
	FI / NFA                                0.0067       -0.0011        0.0098
	Revenue Growth                         -0.3626        0.1124        4.3013
	Core OI Growth                         -0.6856       -0.1653        4.7648
	OI Growth                              -0.6856       -0.1653        4.7648
	ReOI ($MM)                             8,876.0       8,443.0      12,913.0

		operating pm: a:0.2806, b:-0.0196, r:-0.8581, var:0.0006
		sales / noa: a:-11.5447, b:-12.5035, r:-0.9341, var:119.4351
		revenue growth: a:-0.9816, b:2.3320, r:0.9085, var:4.3917
		fi / nfa: a:0.0036, b:0.0015, r:0.2729, var:2.1244e-05

	                      Unknown...    2012-06-30    2012-09-29    2012-12-29
	C ($MM)                               10,189.0       9,136.0      23,426.0
	I ($MM)                               -2,971.0      -3,493.0      -2,791.0
	d ($MM)                               -7,163.0      -6,109.0     -18,631.0
	F ($MM)                                  -55.0         466.0      -2,004.0
	FCF ($MM)                              7,218.0       5,643.0      20,635.0
	NI / C                                  0.8660        0.9000        0.5582

Example 3: Raw Numbers From Nike's Last 10-Q, Including Disclosures

$ ./examples/show_report.rb --show-disclosures NKE 10-q 0
Showing disclosures
company name: NIKE INC
url:          http://www.sec.gov/Archives/edgar/data/320187/000119312513008172/0001193125-13-008172-index.htm
Balance Sheet (2012-11-30)
Assets (us-gaap_Assets_1)
	[fa] Cash And Cash Equivalents At Carrying Value                 2,291,000,000.0
	[fa] Available For Sale Securities Current                       1,234,000,000.0
	[oa] Accounts Receivable Net Current                             3,188,000,000.0
	[oa] Inventory Finished Goods Net Of Reserves                    3,318,000,000.0
	[fa] Deferred Tax Assets Net Current                               327,000,000.0
	[oa] Prepaid Expense And Other Assets Current                      733,000,000.0
	[oa] Assets Of Disposal Group Including Discontinued               344,000,000.0
	 Operation Current
	[oa] Property Plant And Equipment Gross                          5,310,000,000.0
	[oa] Accumulated Depreciation Depletion And Amortization        -3,052,000,000.0
	 Property Plant And Equipment
	[oa] Intangible Assets Net Excluding Goodwill                      374,000,000.0
	[oa] Goodwill                                                      131,000,000.0
	[fa] Deferred Income Taxes And Other Assets Noncurrent             973,000,000.0
	Total                                                           15,171,000,000.0

Liabilities And Stockholders Equity (us-gaap_LiabilitiesAndStockholdersEquity_1)
	[fl] Long Term Debt Current                                         58,000,000.0
	[fl] Short Term Borrowings                                         100,000,000.0
	[ol] Accounts Payable Current                                    1,519,000,000.0
	[ol] Accrued Liabilities Current                                 1,879,000,000.0
	[fl] Accrued Income Taxes Current                                   45,000,000.0
	[ol] Liabilities Of Disposal Group Including Discontinued          198,000,000.0
	 Operation Current
	[fl] Long Term Debt Noncurrent                                     170,000,000.0
	[fl] Deferred Income Taxes And Other Liabilities Noncurrent      1,188,000,000.0
	[ol] Commitments And Contingencies                                           0.0
	[fl] Temporary Equity Carrying Amount Attributable To Parent                 0.0
	[cse] Stockholders Equity                                       10,014,000,000.0
	Total                                                           15,171,000,000.0

Net Operational Assets
	OA                                                              10,346,000,000.0
	OL                                                              -3,596,000,000.0
	Total                                                            6,750,000,000.0

Net Financial Assets
	FA                                                               4,825,000,000.0
	FL                                                              -1,561,000,000.0
	Total                                                            3,264,000,000.0

Common Shareholders' Equity
	NOA                                                              6,750,000,000.0
	NFA                                                              3,264,000,000.0
	MI                                                                          -0.0
	Total                                                           10,014,000,000.0

Income Statement (2012-09-01 to 2012-11-30)
Net Income Loss (us-gaap_NetIncomeLoss_3)
	[or] Sales Revenue Net                                           5,955,000,000.0
	[cogs] Cost Of Goods Sold                                       -3,425,000,000.0
	[oe] Marketing And Advertising Expense                            -613,000,000.0
	[oe] General And Administrative Expense                         -1,223,000,000.0
	[fibt] Interest Income Expense Nonoperating Net                      1,000,000.0
	[fibt] Other Nonoperating Income Expense                            17,000,000.0
	[tax] Income Tax Expense Benefit                                  -191,000,000.0
	[fiat] Income Loss From Discontinued Operations Net Of Tax        -137,000,000.0
	Total                                                              384,000,000.0

Gross Revenue
	Operating Revenues (OR)                                          5,955,000,000.0
	Cost of Goods Sold (COGS)                                       -3,425,000,000.0
	Total                                                            2,530,000,000.0

Operating Income from sales, before tax (OISBT)
	Gross Margin (GM)                                                2,530,000,000.0
	Operating Expense (OE)                                          -1,836,000,000.0
	Total                                                              694,000,000.0

Operating Income from sales, after tax (OISAT)
	Operating income from sales (before tax)                           694,000,000.0
	Reported taxes                                                    -191,000,000.0
	Taxes on net financing income                                        6,300,000.0
	Taxes on other operating income                                              0.0
	Total                                                              509,300,000.0

Operating income, after tax (OI)
	Operating income after sales, after tax (OISAT)                    509,300,000.0
	Other operating income, before tax (OIBT)                                    0.0
	Tax on other operating income                                               -0.0
	Other operating income, after tax (OOIAT)                                    0.0
	Total                                                              509,300,000.0

Net financing income, after tax (NFI)
	Financing income, before tax (FIBT)                                 18,000,000.0
	Tax effect (FIBT_TAX_EFFECT)                                        -6,300,000.0
	Financing income, after tax (FIAT)                                -137,000,000.0
	Total                                                             -125,300,000.0

Comprehensive income (CI)
	Operating income, after tax (OI)                                   509,300,000.0
	Net financing income, after tax (NFI)                             -125,300,000.0
	Total                                                              384,000,000.0

WARNING: cash flow statement period is nil!
WARNING: reformulated cash flow statement period is nil!
Disclosures
Disclosure Identifiable Intangible Asset Balances (http://www.nikeinc.com/taxonomy/role/DisclosureIdentifiableIntangibleAssetBalances)
	Finite Lived Intangible Assets Gross                               169,000,000.0
	Finite Lived Intangible Assets Accumulated Amortization             78,000,000.0
	Indefinite Lived Trademarks                                        283,000,000.0
	Total                                                              530,000,000.0

Disclosure Accrued Liabilities (http://www.nikeinc.com/taxonomy/role/DisclosureAccruedLiabilities)
	Accrued Compensation And Benefits Excluding Taxes Current          502,000,000.0
	Accrued Taxes Other Than Income Taxes Current                      238,000,000.0
	Accrued Endorsement Liabilities Current                            212,000,000.0
	Dividends Payable Current                                          188,000,000.0
	Accrued Marketing Costs Current                                    137,000,000.0
	Accrued Import And Logistics Costs Current                         124,000,000.0
	Derivative Liabilities Current                                      83,000,000.0
	Other Accrued Liabilities Current                                  395,000,000.0
	Total                                                            1,879,000,000.0

Disclosure Financial Assets And Liabilities Measured At Fair Value On Recurring Basis (http://www.nikeinc.com/taxonomy/role/DisclosureFinancialAssetsAndLiabilitiesMeasuredAtFairValueOnRecurringBasis)
	Derivative Fair Value Of Derivative Asset                          129,000,000.0
	Total                                                              129,000,000.0

Disclosure Reconciliation From Basic Earnings Per Share To Diluted Earnings Per Share (http://www.nikeinc.com/taxonomy/role/DisclosureReconciliationFromBasicEarningsPerShareToDilutedEarningsPerShare)
	Income Loss From Continuing Operations Per Basic Share                      0.58
	Income Loss From Discontinued Operations Net Of Tax Per                    -0.15
	 Basic Share
	Income Loss From Continuing Operations Per Diluted Share                    0.57
	Income Loss From Discontinued Operations Net Of Tax Per                    -0.15
	 Diluted Share
	Weighted Average Number Of Shares Outstanding Basic                897,000,000.0
	Incremental Common Shares Attributable To Share Based               16,100,000.0
	 Payment Arrangements
	Total                                                             913,100,000.85

Disclosure Components Of Assets And Liabilities Classified As Held For Sale (http://www.nikeinc.com/taxonomy/role/DisclosureComponentsOfAssetsAndLiabilitiesClassifiedAsHeldForSale)
	Disposal Group Including Discontinued Operation Accounts           129,000,000.0
	 Notes And Loans Receivable Net
	Disposal Group Including Discontinued Operation Inventory          130,000,000.0
	Disposal Group Including Discontinued Operation Deferred            32,000,000.0
	 Income Taxes And Other Assets
	Disposal Group Including Discontinued Operation Property            53,000,000.0
	 Plant And Equipment Net
	Disposal Group Including Discontinued Operation Intangible                   0.0
	 Assets Net
	Disposal Group Including Discontinued Operation Accounts            39,000,000.0
	 Payable
	Disposal Group Including Discontinued Operation Accrued            127,000,000.0
	 Liabilities
	Disposal Group Including Discontinued Operation Deferred            32,000,000.0
	 Income Taxes Payable And Other Liabilities
	Total                                                              542,000,000.0

Disclosure Information By Operating Segments (http://www.nikeinc.com/taxonomy/role/DisclosureInformationByOperatingSegments)
	Earnings Before Interest And Taxes                                 711,000,000.0
	Interest Income Expense Nonoperating Net                             1,000,000.0
	Total                                                              712,000,000.0

Installation

OSX Mountain Lion
  • Install Homebrew

  • Install ImageMagick

      brew install imagemagick
    
  • Edit gsl formula

      brew edit gsl
    
  • Edit the file by changing:

      url 'http://ftpmirror.gnu.org/gsl/gsl-1.16.tar.gz'
      mirror 'http://ftp.gnu.org/gnu/gsl/gsl-1.16.tar.gz'
      sha1 '210af9366485f149140973700d90dc93a4b6213e'
    

    to:

      url 'http://ftpmirror.gnu.org/gsl/gsl-1.15.tar.gz'
      mirror 'http://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz'
      sha1 'd914f84b39a5274b0a589d9b83a66f44cd17ca8e'
    
  • Install GSL

      brew install gsl
    
  • Install FinModeling

      gem install finmodeling
    
  • Reset Homebrew

      cd /usr/local/Cellar
      git reset --hard
    
Ubuntu 13.04
  • Install ImageMagick

      apt-get install imagemagick
    
  • Install MagickWand Development

      apt-get install libmagickwand-dev
    
  • Install GSL

      apt-get install libgsl0-dev
    
  • Install FinModeling

      gem install finmodeling
    

Contributing

I welcome pull requests from other users of this gem. I'm also curious just to hear how people are finding it useful (or not). My own wish list (in messy form) is in TODO.txt.

finmodeling's People

Contributors

ghg avatar jimlindstrom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

finmodeling's Issues

example 1 exception

I'm having trouble running the examples out of the box. I installed with 'gem install finmodeling'.

$ ruby show_reports.rb --num-forecasts 2 --do-valuation orcl 2012-02-01
Forecasting 2 periods
Doing valuation
company name: ORACLE CORP
show_reports.rb:133:in rescue in block in <main>': uninitialized constant FinModeling::InvalidFilingError (NameError) from show_reports.rb:129:inblock in

'
from show_reports.rb:128:in each' from show_reports.rb:128:in'

error report

kuma:~ kuma$ brew install gsl
Warning: gsl-1.15 already installed
kuma:~ kuma$ brew uninstall gsl
Uninstalling /usr/local/Cellar/gsl/1.15...
kuma:~ kuma$ brew install gsl
==> Downloading https://homebrew.bintray.com/bottles/gsl-1.15.mavericks.bottle.1

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "gsl"
Download failed: https://homebrew.bintray.com/bottles/gsl-1.15.mavericks.bottle.1.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading http://ftpmirror.gnu.org/gsl/gsl-1.15.tar.gz
Already downloaded: /Library/Caches/Homebrew/gsl-1.15.tar.gz
==> ./configure --prefix=/usr/local/Cellar/gsl/1.15
==> make
==> make install

Why Bayes?

"Uses Naive Bayes Classifiers to classify financial statement items"

I can not figure out, why do we need a classifier here. Could you explain this feature in more details, please?

Red Build

4 specs failing. (2 if you don't clear out ~/.finmodeling.)

No XBRL filing error

Sometimes I get an error saying
has no instance files. No XBRL filing?

Is there a way to parse out the data of this type? Apple has 230 10-Q records but I can only get 11 records with the script.

Hi I meet this problem when I want to install gel

kuma:~ kuma$ brew install gsl
Error: undefined method url' for #<BottleSpecification:0x007f9de2a10d38> Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Formula/gsl.rb:6:inblock in class:Gsl'
/usr/local/Library/Homebrew/software_spec.rb:70:in instance_eval' /usr/local/Library/Homebrew/software_spec.rb:70:inbottle'
/usr/local/Library/Homebrew/formula.rb:879:in bottle' /usr/local/Library/Formula/gsl.rb:5:inclass:Gsl'
/usr/local/Library/Formula/gsl.rb:3:in load_file' /usr/local/Library/Homebrew/formulary.rb:92:inmodule_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in load_file' /usr/local/Library/Homebrew/formulary.rb:82:inklass'
/usr/local/Library/Homebrew/formulary.rb:71:in get_formula' /usr/local/Library/Homebrew/formulary.rb:200:infactory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in block in formulae' /usr/local/Library/Homebrew/extend/ARGV.rb:16:inmap'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in formulae' /usr/local/Library/Homebrew/cmd/install.rb:41:ininstall'
/usr/local/Library/brew.rb:135:in `

'
kuma:~ kuma$

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

rake aborted! marshal data too short

Hi, after i installed the gem, i got the 'marshal data too short' error when i ran any rake tasks.
The message below

rake aborted!
marshal data too short
/home/cl/.rvm/gems/ruby-2.0.0-p353@sasac_wan/gems/activesupport-4.0.2/lib/active_support/core_ext/marshal.rb:6:in load' /home/cl/.rvm/gems/ruby-2.0.0-p353@sasac_wan/gems/activesupport-4.0.2/lib/active_support/core_ext/marshal.rb:6:inload_with_autoloading'
/home/cl/.rvm/gems/ruby-2.0.0-p353@sasac_wan/gems/naive_bayes-0.0.3/lib/naive_bayes.rb:26:in load' /home/cl/.rvm/gems/ruby-2.0.0-p353@sasac_wan/gems/finmodeling-0.2.1/lib/finmodeling/has_string_classifer.rb:22:inblock in _load_vectors_and_train'
/home/cl/.rvm/gems/ruby-2.0.0-p353@sasac_wan/gems/finmodeling-0.2.1/lib/finmodeling/has_string_classifer.rb:18:in `each'

The code at naive_bayes.rb:26 is Marshal.load(data), the date is a string read from /home/cl/.finmodeling/classifiers/ai_oa.db
but this file is empty.
What can i do to fix the problem?(version:0.2.1 ubuntu14.04 ruby2.0.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.