stock_index 0.6.0 → 0.7.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/README.md +10 -4
- data/bsym/JP.csv +3652 -0
- data/bsym/US.csv +127 -128
- data/cache/XJPX.pstore +0 -0
- data/cache/XNAS.pstore +0 -0
- data/cache/{data.pstore → XNYS.pstore} +0 -0
- data/cache/test.pstore +0 -0
- data/lib/stock_index/bsym_search.rb +3 -2
- data/lib/stock_index/component.rb +48 -15
- data/lib/stock_index/indices.rb +2 -1
- data/lib/stock_index/scrapers/nikkei_scraper.rb +35 -0
- data/lib/stock_index/stock_index.rb +2 -0
- data/lib/stock_index/version.rb +1 -1
- data/lib/stock_index.rb +2 -1
- data/spec/fixtures/html/dji.html +250 -0
- data/spec/fixtures/html/edgar.html +19 -0
- data/spec/fixtures/html/gspc.html +5032 -0
- data/spec/fixtures/html/n225.html +1912 -0
- data/spec/fixtures/html/n225_wikipedia.html +336 -0
- data/spec/fixtures/html/ndx.html +106 -0
- data/spec/fixtures/yaml/DJI.yaml +31 -0
- data/spec/fixtures/yaml/GSPC.yaml +503 -0
- data/spec/fixtures/yaml/N225.yaml +226 -0
- data/spec/fixtures/yaml/NDX.yaml +105 -0
- data/spec/helper.rb +49 -4
- data/spec/stock_index/bsym_search_spec.rb +3 -3
- data/spec/stock_index/component_spec.rb +21 -0
- data/spec/stock_index/stock_index_spec.rb +11 -4
- data/stock_index.gemspec +1 -0
- metadata +45 -9
- data/spec/fixtures/DJI.yaml +0 -181
- data/spec/fixtures/GSPC.yaml +0 -3013
- data/spec/fixtures/NDX.yaml +0 -625
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea7cdebb23698a7ec5e20a66d284253a749cffd4
|
4
|
+
data.tar.gz: 06ea3b4fdb14814fcd07990228ebed82d158890c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83037a12503d07e92596dbdf15845ac37afaa34940c7561736fe0ccf79b7fe3c22728d7829396ffd6bfca8ac19617cb3ae39d2e9deb1ba644b085ac8ac5c9a3b
|
7
|
+
data.tar.gz: bb008502a9f97be8c20b0f63722b1142a7d9f296a37d59936aff201f1dd7edce6083c87555fa0366fa5c6d9b9199786eac2316174dcc1a70f89de28faa48b083
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -25,8 +25,8 @@ There is no a standard for indices symbols, so this gem uses Yahoo Finance symbo
|
|
25
25
|
| ------ | ---------- | -------------- |
|
26
26
|
| ^DJI | DOW JONES INDUSTRIAL AVERAGE | http://en.wikipedia.org/wiki/Dow_Jones_Industrial_Average |
|
27
27
|
| ^GSPC | S&P 500 | http://en.wikipedia.org/wiki/List_of_S%26P_500_companies |
|
28
|
-
| ^NDX | NASDAQ 100 | http://en.wikipedia.org/wiki/NASDAQ-100 |
|
29
|
-
| ^N225 | NIKKEI 225 | http://indexes.nikkei.co.jp/en/nkave/index/component?idx=nk225 |
|
28
|
+
| ^NDX | NASDAQ 100 | https://indexes.nasdaqomx.com/Index/Weighting/NDX<br/>http://en.wikipedia.org/wiki/NASDAQ-100 |
|
29
|
+
| ^N225 | NIKKEI 225 | http://indexes.nikkei.co.jp/en/nkave/index/component?idx=nk225<br/>http://en.wikipedia.org/wiki/Nikkei_225 |
|
30
30
|
| ^STOXX50E | EURO STOXX 50 | http://www.stoxx.com/indices/index_information.html?symbol=SX5E |
|
31
31
|
| ^FTSE | FTSE 100 | http://www.londonstockexchange.com/exchange/prices-and-markets/stocks/indices/summary/summary-indices-constituents.html?index=UKX |
|
32
32
|
|
@@ -43,7 +43,7 @@ This method returns an array of components. Each component is a Hash with this f
|
|
43
43
|
:symbol => 'MMM',
|
44
44
|
:name => '3M CO',
|
45
45
|
:wikipedia => 'http://en.wikipedia.org/wiki/3M',
|
46
|
-
:cik => '
|
46
|
+
:cik => '0000066740',
|
47
47
|
:bbgid => 'BBG000BP52R2'
|
48
48
|
}
|
49
49
|
```
|
@@ -54,7 +54,7 @@ This method returns an array of components. Each component is a Hash with this f
|
|
54
54
|
| symbol | Component symbol |
|
55
55
|
| name | Component name according to [Bloomberg Open Symbology](http://bsym.bloomberg.com/sym/) |
|
56
56
|
| wikipedia | Link to the wikipedia page of the component |
|
57
|
-
| cik | Component CIK (Central Index Key) assigned to the company by the SEC |
|
57
|
+
| cik | Component CIK (Central Index Key) assigned to the company by the SEC. Only for US components. |
|
58
58
|
| bbgid | BBGID (Bloomberg Security Identifier) according to [Bloomberg Open Symbology](http://bsym.bloomberg.com/sym/)|
|
59
59
|
|
60
60
|
The name and cik are obtained querying the [EDGAR database](http://www.sec.gov/edgar/searchedgar/companysearch.html).
|
@@ -71,6 +71,12 @@ The name, cik, and bbgid are cached using [PStore](http://ruby-doc.org/stdlib-1.
|
|
71
71
|
4. Push to the branch (`git push origin my-new-feature`)
|
72
72
|
5. Create new Pull Request
|
73
73
|
|
74
|
+
## Code Status
|
75
|
+
|
76
|
+
[](https://rubygems.org/gems/stock_index)
|
77
|
+
[](https://travis-ci.org/javiervidal/stock_index)
|
78
|
+
[](https://coveralls.io/r/javiervidal/stock_index?branch=master)
|
79
|
+
|
74
80
|
## Copyright
|
75
81
|
|
76
82
|
Copyright (c) 2014 – ∞ Javier Vidal
|