finviz 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +157 -3
- data/bin/console +2 -6
- data/lib/finviz/quotes_fetcher.rb +3 -1
- data/lib/finviz/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 502c9e1ace1fd59f808968ba26d2ff82a74d03b3ca6579d0e65549c7c899fe1c
|
4
|
+
data.tar.gz: fc16bb8fe275c381ab3c5b76c084d05467fa2e5de416dcb02f2be68ba939653e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fc3232cd15163ad2394e3242477573c81914f9f99db9fbaba9a2caefbaf0b7b2234c4d9518ca1a1891c7fc75f7e73eb22fe7085f21ef19da967029f31e8f426
|
7
|
+
data.tar.gz: a2b1a12d9d9c2177b70d0c5e72facaa2b24a90ae95b684840b7fe0aa1632071f898f340702033e6e190b09d0f80cf1687ea36d1c0e03fa5e977a838d99c4d58b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -48,8 +48,162 @@ Each quote contain the Hash with ticker stats and link to the chart picture, see
|
|
48
48
|
example:
|
49
49
|
|
50
50
|
```ruby
|
51
|
-
Finviz.quotes tickers: %w[a c]
|
52
|
-
=> [#<OpenStruct ticker="A", chart="https://charts2.finviz.com/chart.ashx?t=C&ty=c&ta=1&p=d&s=l", stats={"Index"=>"S&P 500", "P/E"=>"50.35", "EPS (ttm)"=>"2.60", "Insider Own"=>"0.30%", "Shs Outstand"=>"306.00M", "Perf Week"=>"-2.05%", "Market Cap"=>"39.62B", "Forward P/E"=>"30.11", "EPS next Y"=>"11.78%", "Insider Trans"=>"-21.60%", "Shs Float"=>"303.84M", "Perf Month"=>"-1.60%", "Income"=>"810.00M", "PEG"=>"4.66", "EPS next Q"=>"0.83", "Inst Own"=>"91.60%", "Short Float"=>"0.70%", "Perf Quarter"=>"2.48%", "Sales"=>"5.53B", "P/S"=>"7.16", "EPS this Y"=>"-31.60%", "Inst Trans"=>"0.76%", "Short Ratio"=>"1.
|
51
|
+
quotes = Finviz.quotes tickers: %w[a c]
|
52
|
+
=> [#<OpenStruct path="https://finviz.com/quote.ashx?t=A", ticker="A", chart="https://charts2.finviz.com/chart.ashx?t=C&ty=c&ta=1&p=d&s=l", stats={"Index"=>"S&P 500", "P/E"=>"50.35", "EPS (ttm)"=>"2.60", "Insider Own"=>"0.30%", "Shs Outstand"=>"306.00M", "Perf Week"=>"-2.05%", "Market Cap"=>"39.62B", "Forward P/E"=>"30.11", "EPS next Y"=>"11.78%", "Insider Trans"=>"-21.60%", "Shs Float"=>"303.84M", "Perf Month"=>"-1.60%", "Income"=>"810.00M", "PEG"=>"4.66", "EPS next Q"=>"0.83", "Inst Own"=>"91.60%", "Short Float"=>"0.70%", "Perf Quarter"=>"2.48%", "Sales"=>"5.53B", "P/S"=>"7.16", "EPS this Y"=>"-31.60%", "Inst Trans"=>"0.76%", "Short Ratio"=>"1.31", "Perf Half Y"=>"19.87%", "Book/sh"=>"15.70", "P/B"=>"8.35", "ROA"=>"8.50%", "Target Price"=>"140.23", "Perf Year"=>"60.64%", "Cash/sh"=>"4.40", "P/C"=>"29.81", "EPS next 5Y"=>"10.80%", "ROE"=>"16.70%", "52W Range"=>"80.46 - 137.83", "Perf YTD"=>"10.68%", "Dividend"=>"0.78", "P/FCF"=>"45.69", "EPS past 5Y"=>"12.00%", "ROI"=>"10.00%", "52W High"=>"-5.40%", "Beta"=>"1.01", "Dividend %"=>"0.59%", "Quick Ratio"=>"1.60", "Sales past 5Y"=>"5.70%", "Gross Margin"=>"53.30%", "52W Low"=>"62.05%", "ATR"=>"2.09", "Employees"=>"16400", "Current Ratio"=>"2.10", "Sales Q/Q"=>"14.10%", "Oper. Margin"=>"17.30%", "RSI (14)"=>"47.00", "Volatility"=>"1.56% 1.40%", "Optionable"=>"Yes", "Debt/Eq"=>"0.52", "EPS Q/Q"=>"48.10%", "Profit Margin"=>"14.60%", "Rel Volume"=>"0.31", "Prev Close"=>"131.15", "Shortable"=>"Yes", "LT Debt/Eq"=>"0.45", "Earnings"=>"May 25 AMC", "Payout"=>"27.40%", "Avg Volume"=>"1.63M", "Price"=>"130.38", "Recom"=>"1.90", "SMA20"=>"-2.12%", "SMA50"=>"1.38%", "SMA200"=>"13.08%", "Volume"=>"303,128", "Change"=>"-0.58%"}>,
|
53
|
+
#<OpenStruct path="https://finviz.com/quote.ashx?t=C", ticker="C", chart="https://charts2.finviz.com/chart.ashx?t=C&ty=c&ta=1&p=d&s=l", stats={"Index"=>"S&P 500", "P/E"=>"10.50", "EPS (ttm)"=>"7.29", "Insider Own"=>"0.20%", "Shs Outstand"=>"2.08B", "Perf Week"=>"1.97%", "Market Cap"=>"155.63B", "Forward P/E"=>"9.32", "EPS next Y"=>"-8.81%", "Insider Trans"=>"-1.30%", "Shs Float"=>"2.04B", "Perf Month"=>"5.54%", "Income"=>"15.26B", "PEG"=>"0.96", "EPS next Q"=>"2.00", "Inst Own"=>"78.80%", "Short Float"=>"1.20%", "Perf Quarter"=>"20.32%", "Sales"=>"53.48B", "P/S"=>"2.91", "EPS this Y"=>"-41.10%", "Inst Trans"=>"0.52%", "Short Ratio"=>"1.27", "Perf Half Y"=>"56.47%", "Book/sh"=>"87.55", "P/B"=>"0.87", "ROA"=>"0.70%", "Target Price"=>"85.23", "Perf Year"=>"82.03%", "Cash/sh"=>"486.62", "P/C"=>"0.16", "EPS next 5Y"=>"10.91%", "ROE"=>"8.60%", "52W Range"=>"40.49 - 76.84", "Perf YTD"=>"24.16%", "Dividend"=>"2.04", "P/FCF"=>"7.76", "EPS past 5Y"=>"-2.70%", "ROI"=>"6.80%", "52W High"=>"0.35%", "Beta"=>"1.90", "Dividend %"=>"2.66%", "Quick Ratio"=>"-", "Sales past 5Y"=>"-0.20%", "Gross Margin"=>"-", "52W Low"=>"90.44%", "ATR"=>"1.72", "Employees"=>"211000", "Current Ratio"=>"-", "Sales Q/Q"=>"-26.90%", "Oper. Margin"=>"64.00%", "RSI (14)"=>"67.10", "Volatility"=>"2.44% 2.21%", "Optionable"=>"Yes", "Debt/Eq"=>"2.70", "EPS Q/Q"=>"240.40%", "Profit Margin"=>"28.50%", "Rel Volume"=>"0.73", "Prev Close"=>"76.56", "Shortable"=>"Yes", "LT Debt/Eq"=>"1.35", "Earnings"=>"Apr 15 BMO", "Payout"=>"27.80%", "Avg Volume"=>"19.41M", "Price"=>"77.11", "Recom"=>"2.10", "SMA20"=>"5.58%", "SMA50"=>"5.98%", "SMA200"=>"31.27%", "Volume"=>"8,396,127", "Change"=>"0.72%"}>]
|
54
|
+
|
55
|
+
# The same in more human friendly view:
|
56
|
+
Pry::ColorPrinter.pp(quotes.map(&:to_h))
|
57
|
+
=> [{:path=>"https://finviz.com/quote.ashx?t=A",
|
58
|
+
:ticker=>"A",
|
59
|
+
:chart=>"https://charts2.finviz.com/chart.ashx?t=C&ty=c&ta=1&p=d&s=l",
|
60
|
+
:stats=>
|
61
|
+
{"Index"=>"S&P 500",
|
62
|
+
"P/E"=>"50.35",
|
63
|
+
"EPS (ttm)"=>"2.60",
|
64
|
+
"Insider Own"=>"0.30%",
|
65
|
+
"Shs Outstand"=>"306.00M",
|
66
|
+
"Perf Week"=>"-2.05%",
|
67
|
+
"Market Cap"=>"39.62B",
|
68
|
+
"Forward P/E"=>"30.11",
|
69
|
+
"EPS next Y"=>"11.78%",
|
70
|
+
"Insider Trans"=>"-21.60%",
|
71
|
+
"Shs Float"=>"303.84M",
|
72
|
+
"Perf Month"=>"-1.60%",
|
73
|
+
"Income"=>"810.00M",
|
74
|
+
"PEG"=>"4.66",
|
75
|
+
"EPS next Q"=>"0.83",
|
76
|
+
"Inst Own"=>"91.60%",
|
77
|
+
"Short Float"=>"0.70%",
|
78
|
+
"Perf Quarter"=>"2.48%",
|
79
|
+
"Sales"=>"5.53B",
|
80
|
+
"P/S"=>"7.16",
|
81
|
+
"EPS this Y"=>"-31.60%",
|
82
|
+
"Inst Trans"=>"0.76%",
|
83
|
+
"Short Ratio"=>"1.31",
|
84
|
+
"Perf Half Y"=>"19.87%",
|
85
|
+
"Book/sh"=>"15.70",
|
86
|
+
"P/B"=>"8.35",
|
87
|
+
"ROA"=>"8.50%",
|
88
|
+
"Target Price"=>"140.23",
|
89
|
+
"Perf Year"=>"60.64%",
|
90
|
+
"Cash/sh"=>"4.40",
|
91
|
+
"P/C"=>"29.81",
|
92
|
+
"EPS next 5Y"=>"10.80%",
|
93
|
+
"ROE"=>"16.70%",
|
94
|
+
"52W Range"=>"80.46 - 137.83",
|
95
|
+
"Perf YTD"=>"10.68%",
|
96
|
+
"Dividend"=>"0.78",
|
97
|
+
"P/FCF"=>"45.69",
|
98
|
+
"EPS past 5Y"=>"12.00%",
|
99
|
+
"ROI"=>"10.00%",
|
100
|
+
"52W High"=>"-5.40%",
|
101
|
+
"Beta"=>"1.01",
|
102
|
+
"Dividend %"=>"0.59%",
|
103
|
+
"Quick Ratio"=>"1.60",
|
104
|
+
"Sales past 5Y"=>"5.70%",
|
105
|
+
"Gross Margin"=>"53.30%",
|
106
|
+
"52W Low"=>"62.05%",
|
107
|
+
"ATR"=>"2.09",
|
108
|
+
"Employees"=>"16400",
|
109
|
+
"Current Ratio"=>"2.10",
|
110
|
+
"Sales Q/Q"=>"14.10%",
|
111
|
+
"Oper. Margin"=>"17.30%",
|
112
|
+
"RSI (14)"=>"47.00",
|
113
|
+
"Volatility"=>"1.56% 1.40%",
|
114
|
+
"Optionable"=>"Yes",
|
115
|
+
"Debt/Eq"=>"0.52",
|
116
|
+
"EPS Q/Q"=>"48.10%",
|
117
|
+
"Profit Margin"=>"14.60%",
|
118
|
+
"Rel Volume"=>"0.31",
|
119
|
+
"Prev Close"=>"131.15",
|
120
|
+
"Shortable"=>"Yes",
|
121
|
+
"LT Debt/Eq"=>"0.45",
|
122
|
+
"Earnings"=>"May 25 AMC",
|
123
|
+
"Payout"=>"27.40%",
|
124
|
+
"Avg Volume"=>"1.63M",
|
125
|
+
"Price"=>"130.38",
|
126
|
+
"Recom"=>"1.90",
|
127
|
+
"SMA20"=>"-2.12%",
|
128
|
+
"SMA50"=>"1.38%",
|
129
|
+
"SMA200"=>"13.08%",
|
130
|
+
"Volume"=>"303,128",
|
131
|
+
"Change"=>"-0.58%"}},
|
132
|
+
{:path=>"https://finviz.com/quote.ashx?t=C",
|
133
|
+
:ticker=>"C",
|
134
|
+
:chart=>"https://charts2.finviz.com/chart.ashx?t=C&ty=c&ta=1&p=d&s=l",
|
135
|
+
:stats=>
|
136
|
+
{"Index"=>"S&P 500",
|
137
|
+
"P/E"=>"10.50",
|
138
|
+
"EPS (ttm)"=>"7.29",
|
139
|
+
"Insider Own"=>"0.20%",
|
140
|
+
"Shs Outstand"=>"2.08B",
|
141
|
+
"Perf Week"=>"1.97%",
|
142
|
+
"Market Cap"=>"155.63B",
|
143
|
+
"Forward P/E"=>"9.32",
|
144
|
+
"EPS next Y"=>"-8.81%",
|
145
|
+
"Insider Trans"=>"-1.30%",
|
146
|
+
"Shs Float"=>"2.04B",
|
147
|
+
"Perf Month"=>"5.54%",
|
148
|
+
"Income"=>"15.26B",
|
149
|
+
"PEG"=>"0.96",
|
150
|
+
"EPS next Q"=>"2.00",
|
151
|
+
"Inst Own"=>"78.80%",
|
152
|
+
"Short Float"=>"1.20%",
|
153
|
+
"Perf Quarter"=>"20.32%",
|
154
|
+
"Sales"=>"53.48B",
|
155
|
+
"P/S"=>"2.91",
|
156
|
+
"EPS this Y"=>"-41.10%",
|
157
|
+
"Inst Trans"=>"0.52%",
|
158
|
+
"Short Ratio"=>"1.27",
|
159
|
+
"Perf Half Y"=>"56.47%",
|
160
|
+
"Book/sh"=>"87.55",
|
161
|
+
"P/B"=>"0.87",
|
162
|
+
"ROA"=>"0.70%",
|
163
|
+
"Target Price"=>"85.23",
|
164
|
+
"Perf Year"=>"82.03%",
|
165
|
+
"Cash/sh"=>"486.62",
|
166
|
+
"P/C"=>"0.16",
|
167
|
+
"EPS next 5Y"=>"10.91%",
|
168
|
+
"ROE"=>"8.60%",
|
169
|
+
"52W Range"=>"40.49 - 76.84",
|
170
|
+
"Perf YTD"=>"24.16%",
|
171
|
+
"Dividend"=>"2.04",
|
172
|
+
"P/FCF"=>"7.76",
|
173
|
+
"EPS past 5Y"=>"-2.70%",
|
174
|
+
"ROI"=>"6.80%",
|
175
|
+
"52W High"=>"0.35%",
|
176
|
+
"Beta"=>"1.90",
|
177
|
+
"Dividend %"=>"2.66%",
|
178
|
+
"Quick Ratio"=>"-",
|
179
|
+
"Sales past 5Y"=>"-0.20%",
|
180
|
+
"Gross Margin"=>"-",
|
181
|
+
"52W Low"=>"90.44%",
|
182
|
+
"ATR"=>"1.72",
|
183
|
+
"Employees"=>"211000",
|
184
|
+
"Current Ratio"=>"-",
|
185
|
+
"Sales Q/Q"=>"-26.90%",
|
186
|
+
"Oper. Margin"=>"64.00%",
|
187
|
+
"RSI (14)"=>"67.10",
|
188
|
+
"Volatility"=>"2.44% 2.21%",
|
189
|
+
"Optionable"=>"Yes",
|
190
|
+
"Debt/Eq"=>"2.70",
|
191
|
+
"EPS Q/Q"=>"240.40%",
|
192
|
+
"Profit Margin"=>"28.50%",
|
193
|
+
"Rel Volume"=>"0.73",
|
194
|
+
"Prev Close"=>"76.56",
|
195
|
+
"Shortable"=>"Yes",
|
196
|
+
"LT Debt/Eq"=>"1.35",
|
197
|
+
"Earnings"=>"Apr 15 BMO",
|
198
|
+
"Payout"=>"27.80%",
|
199
|
+
"Avg Volume"=>"19.41M",
|
200
|
+
"Price"=>"77.11",
|
201
|
+
"Recom"=>"2.10",
|
202
|
+
"SMA20"=>"5.58%",
|
203
|
+
"SMA50"=>"5.98%",
|
204
|
+
"SMA200"=>"31.27%",
|
205
|
+
"Volume"=>"8,396,127",
|
206
|
+
"Change"=>"0.72%"}}]
|
53
207
|
```
|
54
208
|
|
55
209
|
## Development
|
@@ -60,7 +214,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
60
214
|
|
61
215
|
## Contributing
|
62
216
|
|
63
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/kvokka/finviz. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/
|
217
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kvokka/finviz. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/kvokka/finviz/blob/master/CODE_OF_CONDUCT.md).
|
64
218
|
|
65
219
|
## License
|
66
220
|
|
data/bin/console
CHANGED
@@ -7,9 +7,5 @@ require "finviz"
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require "irb"
|
15
|
-
IRB.start(__FILE__)
|
10
|
+
require "pry"
|
11
|
+
Pry.start
|
@@ -40,7 +40,9 @@ module Finviz
|
|
40
40
|
@results ||= all_pages.map do |page|
|
41
41
|
page.html.css("#ticker").map do |xpath|
|
42
42
|
ticker = xpath.children.text
|
43
|
-
OpenStruct.new
|
43
|
+
OpenStruct.new path: "https://finviz.com/quote.ashx?t=#{ticker}",
|
44
|
+
ticker: ticker,
|
45
|
+
chart: "https://charts2.finviz.com/chart.ashx?t=#{ticker}&ty=c&ta=1&p=d&s=l"
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
data/lib/finviz/version.rb
CHANGED