stock_index 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/spec/fixtures/DJI.yaml
DELETED
@@ -1,181 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- :market: XNYS
|
3
|
-
:symbol: MMM
|
4
|
-
:name: 3M CO
|
5
|
-
:wikipedia: http://en.wikipedia.org/wiki/3M
|
6
|
-
:cik: '0000066740'
|
7
|
-
:bbgid: BBG000BP52R2
|
8
|
-
- :market: XNYS
|
9
|
-
:symbol: AXP
|
10
|
-
:name: AMERICAN EXPRESS CO
|
11
|
-
:wikipedia: http://en.wikipedia.org/wiki/American_Express_Co
|
12
|
-
:cik: 0000004962
|
13
|
-
:bbgid: BBG000BCQZS4
|
14
|
-
- :market: XNYS
|
15
|
-
:symbol: T
|
16
|
-
:name: AT&T INC
|
17
|
-
:wikipedia: http://en.wikipedia.org/wiki/AT%26T_Inc
|
18
|
-
:cik: '0000732717'
|
19
|
-
:bbgid: BBG000BSJK37
|
20
|
-
- :market: XNYS
|
21
|
-
:symbol: BA
|
22
|
-
:name: BOEING CO/THE
|
23
|
-
:wikipedia: http://en.wikipedia.org/wiki/Boeing_Company
|
24
|
-
:cik: 0000012927
|
25
|
-
:bbgid: BBG000BCSST7
|
26
|
-
- :market: XNYS
|
27
|
-
:symbol: CAT
|
28
|
-
:name: CATERPILLAR INC
|
29
|
-
:wikipedia: http://en.wikipedia.org/wiki/Caterpillar_Inc.
|
30
|
-
:cik: 0000018230
|
31
|
-
:bbgid: BBG000BF0K17
|
32
|
-
- :market: XNYS
|
33
|
-
:symbol: CVX
|
34
|
-
:name: CHEVRON CORP
|
35
|
-
:wikipedia: http://en.wikipedia.org/wiki/Chevron_Corp.
|
36
|
-
:cik: 0000093410
|
37
|
-
:bbgid: BBG000K4ND22
|
38
|
-
- :market: XNAS
|
39
|
-
:symbol: CSCO
|
40
|
-
:name: CISCO SYSTEMS INC
|
41
|
-
:wikipedia: http://en.wikipedia.org/wiki/Cisco_Systems
|
42
|
-
:cik: 0000858877
|
43
|
-
:bbgid: BBG000C3J3C9
|
44
|
-
- :market: XNYS
|
45
|
-
:symbol: KO
|
46
|
-
:name: COCA-COLA CO/THE
|
47
|
-
:wikipedia: http://en.wikipedia.org/wiki/The_Coca_Cola_Company
|
48
|
-
:cik: '0000021344'
|
49
|
-
:bbgid: BBG000BMX289
|
50
|
-
- :market: XNYS
|
51
|
-
:symbol: DD
|
52
|
-
:name: DU PONT (E.I.) DE NEMOURS
|
53
|
-
:wikipedia: http://en.wikipedia.org/wiki/Du_Pont_(E.I.)
|
54
|
-
:cik: '0000030554'
|
55
|
-
:bbgid: BBG000BH13K9
|
56
|
-
- :market: XNYS
|
57
|
-
:symbol: XOM
|
58
|
-
:name: EXXON MOBIL CORP
|
59
|
-
:wikipedia: http://en.wikipedia.org/wiki/Exxon_Mobil_Corp.
|
60
|
-
:cik: 0000034088
|
61
|
-
:bbgid: BBG000GZQ728
|
62
|
-
- :market: XNYS
|
63
|
-
:symbol: GE
|
64
|
-
:name: GENERAL ELECTRIC CO
|
65
|
-
:wikipedia: http://en.wikipedia.org/wiki/General_Electric
|
66
|
-
:cik: '0000040545'
|
67
|
-
:bbgid: BBG000BK6MB5
|
68
|
-
- :market: XNYS
|
69
|
-
:symbol: GS
|
70
|
-
:name: GOLDMAN SACHS GROUP INC
|
71
|
-
:wikipedia: http://en.wikipedia.org/wiki/Goldman_Sachs_Group
|
72
|
-
:cik: 0000886982
|
73
|
-
:bbgid: BBG000C6CFJ5
|
74
|
-
- :market: XNYS
|
75
|
-
:symbol: HD
|
76
|
-
:name: HOME DEPOT INC
|
77
|
-
:wikipedia: http://en.wikipedia.org/wiki/Home_Depot
|
78
|
-
:cik: 0000354950
|
79
|
-
:bbgid: BBG000BKZB36
|
80
|
-
- :market: XNAS
|
81
|
-
:symbol: INTC
|
82
|
-
:name: INTEL CORP
|
83
|
-
:wikipedia: http://en.wikipedia.org/wiki/Intel_Corp.
|
84
|
-
:cik: 0000050863
|
85
|
-
:bbgid: BBG000C0G1D1
|
86
|
-
- :market: XNYS
|
87
|
-
:symbol: IBM
|
88
|
-
:name: INTL BUSINESS MACHINES CORP
|
89
|
-
:wikipedia: http://en.wikipedia.org/wiki/International_Bus._Machines
|
90
|
-
:cik: '0000051143'
|
91
|
-
:bbgid: BBG000BLNNH6
|
92
|
-
- :market: XNYS
|
93
|
-
:symbol: JNJ
|
94
|
-
:name: JOHNSON & JOHNSON
|
95
|
-
:wikipedia: http://en.wikipedia.org/wiki/Johnson_%26_Johnson
|
96
|
-
:cik: '0000200406'
|
97
|
-
:bbgid: BBG000BMHYD1
|
98
|
-
- :market: XNYS
|
99
|
-
:symbol: JPM
|
100
|
-
:name: JPMORGAN CHASE & CO
|
101
|
-
:wikipedia: http://en.wikipedia.org/wiki/JPMorgan_Chase_%26_Co.
|
102
|
-
:cik: 0000019617
|
103
|
-
:bbgid: BBG000DMBXR2
|
104
|
-
- :market: XNYS
|
105
|
-
:symbol: MCD
|
106
|
-
:name: MCDONALD'S CORP
|
107
|
-
:wikipedia: http://en.wikipedia.org/wiki/McDonald%27s_Corp.
|
108
|
-
:cik: 0000063908
|
109
|
-
:bbgid: BBG000BNSZP1
|
110
|
-
- :market: XNYS
|
111
|
-
:symbol: MRK
|
112
|
-
:name: MERCK & CO. INC.
|
113
|
-
:wikipedia: http://en.wikipedia.org/wiki/Merck_%26_Co.
|
114
|
-
:cik: 0000310158
|
115
|
-
:bbgid: BBG000BPD168
|
116
|
-
- :market: XNAS
|
117
|
-
:symbol: MSFT
|
118
|
-
:name: MICROSOFT CORP
|
119
|
-
:wikipedia: http://en.wikipedia.org/wiki/Microsoft_Corp.
|
120
|
-
:cik: 0000789019
|
121
|
-
:bbgid: BBG000BPH459
|
122
|
-
- :market: XNYS
|
123
|
-
:symbol: NKE
|
124
|
-
:name: NIKE INC -CL B
|
125
|
-
:wikipedia: http://en.wikipedia.org/wiki/NIKE_Inc.
|
126
|
-
:cik: 0000320187
|
127
|
-
:bbgid: BBG000C5HS04
|
128
|
-
- :market: XNYS
|
129
|
-
:symbol: PFE
|
130
|
-
:name: PFIZER INC
|
131
|
-
:wikipedia: http://en.wikipedia.org/wiki/Pfizer_Inc.
|
132
|
-
:cik: 0000078003
|
133
|
-
:bbgid: BBG000BR2B91
|
134
|
-
- :market: XNYS
|
135
|
-
:symbol: PG
|
136
|
-
:name: PROCTER & GAMBLE CO/THE
|
137
|
-
:wikipedia: http://en.wikipedia.org/wiki/Procter_%26_Gamble
|
138
|
-
:cik: 0000080424
|
139
|
-
:bbgid: BBG000BR2TH3
|
140
|
-
- :market: XNYS
|
141
|
-
:symbol: TRV
|
142
|
-
:name: TRAVELERS COS INC/THE
|
143
|
-
:wikipedia: http://en.wikipedia.org/wiki/The_Travelers_Companies_Inc.
|
144
|
-
:cik: 0000086312
|
145
|
-
:bbgid: BBG000BJ81C1
|
146
|
-
- :market: XNYS
|
147
|
-
:symbol: UNH
|
148
|
-
:name: UNITEDHEALTH GROUP INC
|
149
|
-
:wikipedia: http://en.wikipedia.org/wiki/United_Health_Group_Inc.
|
150
|
-
:cik: '0000731766'
|
151
|
-
:bbgid: BBG000CH5208
|
152
|
-
- :market: XNYS
|
153
|
-
:symbol: UTX
|
154
|
-
:name: UNITED TECHNOLOGIES CORP
|
155
|
-
:wikipedia: http://en.wikipedia.org/wiki/United_Technologies
|
156
|
-
:cik: 0000101829
|
157
|
-
:bbgid: BBG000BW8S60
|
158
|
-
- :market: XNYS
|
159
|
-
:symbol: VZ
|
160
|
-
:name: VERIZON COMMUNICATIONS INC
|
161
|
-
:wikipedia: http://en.wikipedia.org/wiki/Verizon_Communications
|
162
|
-
:cik: '0000732712'
|
163
|
-
:bbgid: BBG000HS77T5
|
164
|
-
- :market: XNYS
|
165
|
-
:symbol: V
|
166
|
-
:name: VISA INC-CLASS A SHARES
|
167
|
-
:wikipedia: http://en.wikipedia.org/wiki/Visa_Inc.
|
168
|
-
:cik: '0001403161'
|
169
|
-
:bbgid: BBG000PSKYX7
|
170
|
-
- :market: XNYS
|
171
|
-
:symbol: WMT
|
172
|
-
:name: WAL-MART STORES INC
|
173
|
-
:wikipedia: http://en.wikipedia.org/wiki/Wal-Mart_Stores
|
174
|
-
:cik: 0000104169
|
175
|
-
:bbgid: BBG000BWXBC2
|
176
|
-
- :market: XNYS
|
177
|
-
:symbol: DIS
|
178
|
-
:name: WALT DISNEY CO/THE
|
179
|
-
:wikipedia: http://en.wikipedia.org/wiki/The_Walt_Disney_Company
|
180
|
-
:cik: 0001001039
|
181
|
-
:bbgid: BBG000BH4R78
|