aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--screener.js4
-rw-r--r--sp500_formatted_data.csv20
2 files changed, 12 insertions, 12 deletions
diff --git a/screener.js b/screener.js
index 12567c2..2cafce3 100644
--- a/screener.js
+++ b/screener.js
@@ -121,7 +121,7 @@ const formatDataFromHistories = (histories) => {
const csv_headers = ['Ticker', 'Name', '% Weight', 'Sector', 'RSI (14)', 'MACD (Histogram Value)', '1W', '1M', '3M', '6M'];
const csv_final = [csv_headers];
- const formattedData = histories.forEach(history => {
+ histories.forEach(history => {
// Tickern, name weight, sector from html pull
const { symbol, name, weight } = history;
@@ -153,7 +153,7 @@ const formatDataFromHistories = (histories) => {
const mappedValues = {
Ticker: symbol,
- Name: name,
+ Name: name.replace(',', ' '), // replace commas in name with spaces for CSV
'% Weight': weight,
'Sector': sector,
'RSI (14)': rsi,
diff --git a/sp500_formatted_data.csv b/sp500_formatted_data.csv
index 2ce0ebe..61c771b 100644
--- a/sp500_formatted_data.csv
+++ b/sp500_formatted_data.csv
@@ -8,7 +8,7 @@ AVGO,Broadcom,2.2,TODO,61.40513845515642,-1.7820492994659478,-0.652%,8.451%,31.8
GOOG,Alphabet Inc. (Class C),1.99,TODO,53.667585426192964,-0.16142305918085187,-2.690%,5.238%,5.410%,-8.504%
GOOGL,Alphabet Inc. (Class A),1.98,TODO,54.88082900011021,-0.13534831271414838,-2.272%,5.696%,6.462%,-8.004%
BRK.B,Berkshire Hathaway,1.94,TODO,36.33454927687396,-0.5326234266684224,-0.615%,-4.639%,-8.244%,8.632%
-TSLA,Tesla, Inc.,1.93,TODO,50.652757603807856,-2.831306280576814,-1.342%,-6.332%,36.312%,-26.828%
+TSLA,Tesla Inc.,1.93,TODO,50.652757603807856,-2.831306280576814,-1.342%,-6.332%,36.312%,-26.828%
JPM,JPMorgan Chase,1.42,TODO,67.11424045643108,-0.02232879734837745,2.167%,3.117%,14.623%,18.922%
WMT,Walmart,1.41,TODO,43.57188033409311,-0.5355332729602309,-0.741%,-2.771%,10.815%,1.646%
LLY,Lilly (Eli),1.31,TODO,52.507084761048496,5.468116676256454,-2.916%,5.090%,-6.829%,2.657%
@@ -117,7 +117,7 @@ HCA,HCA Healthcare,0.17,TODO,56.131540788709046,-1.8778295727878236,2.522%,-2.38
CTAS,Cintas,0.17,TODO,47.93627574337965,-1.1918503928343367,-0.586%,-1.099%,13.350%,7.843%
DUK,Duke Energy,0.17,TODO,41.25363021537048,-0.02458951694884548,-1.521%,-2.327%,-4.644%,8.340%
FI,Fiserv,0.17,TODO,37.61269835669743,1.0451407055949158,-3.992%,-2.719%,-27.246%,-20.024%
-NKE,Nike, Inc.,0.16,TODO,43.46303640086685,-0.35841171821578377,-5.704%,-4.875%,-17.186%,-22.614%
+NKE,Nike Inc.,0.16,TODO,43.46303640086685,-0.35841171821578377,-5.704%,-4.875%,-17.186%,-22.614%
EQIX,Equinix,0.16,TODO,52.140405119138215,-3.5123058150622484,-0.766%,1.251%,4.125%,-4.267%
MDLZ,Mondelez International,0.16,TODO,47.9027894152866,-0.049162649057875984,-0.896%,0.729%,3.753%,10.546%
MCO,Moody's Corporation,0.16,TODO,44.896182830587016,-2.6184223023794315,-2.695%,-3.384%,2.331%,0.089%
@@ -160,7 +160,7 @@ EOG,EOG Resources,0.13,TODO,66.5595465500246,1.3688509297420561,3.219%,9.948%,-0
USB,U.S. Bancorp,0.13,TODO,49.202686730477275,-0.252299749949427,-2.104%,-2.567%,1.549%,-9.116%
BK,BNY Mellon,0.12,TODO,64.42057540823569,-0.1415632418230115,2.278%,1.665%,9.139%,20.812%
NEM,Newmont,0.12,TODO,65.82016908438595,0.485133930330525,9.285%,11.396%,21.985%,54.782%
-WDAY,Workday, Inc.,0.12,TODO,35.62595409701777,-1.6438826838911875,-5.761%,-13.497%,-5.426%,-11.918%
+WDAY,Workday Inc.,0.12,TODO,35.62595409701777,-1.6438826838911875,-5.761%,-13.497%,-5.426%,-11.918%
ADSK,Autodesk,0.12,TODO,52.62478767408475,-1.1708197969920606,-0.532%,-0.220%,10.220%,0.806%
APD,Air Products,0.12,TODO,47.01859224740225,-0.3375772563291999,-2.420%,-0.105%,-5.988%,-6.749%
MNST,Monster Beverage,0.11,TODO,54.077254737822486,-0.20217644734423934,0.959%,0.318%,11.113%,22.604%
@@ -196,7 +196,7 @@ CTVA,Corteva,0.09,TODO,79.61811393517031,0.027141579863829923,2.844%,7.141%,19.8
PSX,Phillips 66,0.09,TODO,66.8180078276867,0.8566678132452861,3.200%,3.242%,-3.105%,11.586%
OKE,ONEOK,0.09,TODO,44.370336986309724,0.15098540644315706,-2.087%,-3.034%,-19.354%,-16.868%
GWW,W. W. Grainger,0.09,TODO,41.14591620193375,-6.944958699059337,-3.334%,-4.476%,7.088%,-4.459%
-NDAQ,Nasdaq, Inc.,0.09,TODO,67.01716385893114,-0.09337031030631793,-0.484%,5.548%,12.300%,11.488%
+NDAQ,Nasdaq Inc.,0.09,TODO,67.01716385893114,-0.09337031030631793,-0.484%,5.548%,12.300%,11.488%
TEL,TE Connectivity,0.09,TODO,58.1864311683637,-0.6246804665611858,-1.189%,0.546%,11.963%,13.123%
AIG,American International Group,0.09,TODO,50.249458929214924,-0.15188036575560826,-0.178%,0.202%,0.645%,20.357%
AMP,Ameriprise Financial,0.09,TODO,49.34458832925633,-1.973837624124382,-1.788%,-2.401%,2.707%,-3.340%
@@ -306,7 +306,7 @@ AWK,American Water Works,0.05,TODO,48.113566302208326,0.11858397823842215,0.348%
TSCO,Tractor Supply,0.05,TODO,56.526985123144144,0.23314259830680586,1.403%,0.833%,0.367%,-1.901%
CNC,Centene Corporation,0.05,TODO,40.31484841125297,0.07009363386844303,-0.217%,-10.991%,-7.497%,-7.295%
DTE,DTE Energy,0.05,TODO,39.78807192027784,-0.35350974849171785,-2.349%,-4.762%,-3.753%,12.142%
-ROL,Rollins, Inc.,0.05,TODO,42.986452970136966,-0.23824579714833877,-1.597%,-2.146%,8.514%,18.864%
+ROL,Rollins Inc.,0.05,TODO,42.986452970136966,-0.23824579714833877,-1.597%,-2.146%,8.514%,18.864%
IQV,IQVIA,0.05,TODO,54.912657115738895,1.283125265494117,-2.657%,6.664%,-16.091%,-19.040%
EL,Estée Lauder Companies (The),0.05,TODO,67.68733645832585,0.4892036793896106,6.957%,13.075%,9.850%,-0.320%
WBD,Warner Bros. Discovery,0.05,TODO,62.3873525611465,0.0611836087197859,0.571%,14.518%,-0.751%,-0.564%
@@ -360,7 +360,7 @@ WDC,Western Digital,0.04,TODO,80.10565025131697,0.0875906798384758,6.323%,16.907
NTAP,NetApp,0.04,TODO,56.672258308480465,-0.3694293038957497,0.117%,1.672%,11.564%,-13.174%
INVH,Invitation Homes,0.04,TODO,52.39913621423001,0.04528876145171622,1.291%,-1.661%,-0.852%,6.770%
CMS,CMS Energy,0.04,TODO,40.4576684301703,-0.011840339588605753,-1.729%,-4.432%,-6.649%,4.465%
-NVR,NVR, Inc.,0.04,TODO,42.6506349644023,-17.451226511366166,-4.343%,-3.151%,-4.230%,-15.060%
+NVR,NVR Inc.,0.04,TODO,42.6506349644023,-17.451226511366166,-4.343%,-3.151%,-4.230%,-15.060%
DLTR,Dollar Tree,0.04,TODO,61.21587547383724,0.11215862963534962,3.524%,7.625%,50.999%,40.797%
DOW,Dow Inc.,0.04,TODO,44.203259832838015,0.11059014205110991,-7.106%,-4.330%,-22.152%,-29.016%
TROW,T. Rowe Price,0.04,TODO,45.593804381069226,-0.4035860856273459,-3.113%,-5.098%,-0.967%,-18.337%
@@ -392,13 +392,13 @@ CFG,Citizens Financial Group,0.03,TODO,55.67520544353419,-0.06325858815351743,-0
LUV,Southwest Airlines,0.03,TODO,44.749606284834606,-0.3562993230273612,-6.957%,-4.123%,-8.755%,-4.034%
ZBH,Zimmer Biomet,0.03,TODO,39.88823095582713,0.07785056603689222,-3.916%,-5.034%,-18.993%,-14.462%
KEY,KeyCorp,0.03,TODO,52.309791309617694,-0.05184015539813572,-1.356%,-1.719%,-0.497%,-5.601%
-TPR,Tapestry, Inc.,0.03,TODO,62.42210223530979,0.18224406759888145,3.046%,2.084%,15.540%,35.696%
+TPR,Tapestry Inc.,0.03,TODO,62.42210223530979,0.18224406759888145,3.046%,2.084%,15.540%,35.696%
MAA,Mid-America Apartment Communities,0.03,TODO,36.043980725611355,-0.16904875258855334,-0.958%,-7.128%,-8.396%,-1.293%
TRMB,Trimble Inc.,0.03,TODO,55.489861811807685,-0.2992986802273878,-1.158%,-0.844%,1.443%,1.429%
PFG,Principal Financial Group,0.03,TODO,44.16130613840111,-0.1503726571212594,-0.680%,-5.662%,-9.699%,1.415%
PKG,Packaging Corporation of America,0.03,TODO,39.780769316994885,-1.0992904470066487,-3.613%,-3.792%,-5.553%,-18.755%
HRL,Hormel Foods,0.03,TODO,46.91649975223441,-0.09042574197515282,-2.489%,0.066%,1.617%,-5.455%
-FFIV,F5, Inc.,0.03,TODO,51.216466591627515,-1.2203716474146056,-2.189%,-0.146%,6.704%,13.683%
+FFIV,F5 Inc.,0.03,TODO,51.216466591627515,-1.2203716474146056,-2.189%,-0.146%,6.704%,13.683%
GPC,Genuine Parts Company,0.03,TODO,37.863459584505414,-1.1570199922093183,-3.593%,-7.147%,-1.549%,2.838%
CF,CF Industries,0.03,TODO,71.25699639363023,0.5922348228623386,5.323%,14.092%,30.408%,18.808%
FDS,FactSet,0.03,TODO,37.268158827766506,-2.407416355329259,0.392%,-9.597%,-1.367%,-10.149%
@@ -430,7 +430,7 @@ JBHT,J.B. Hunt,0.03,TODO,47.70713409010085,-0.21246800168321872,-1.341%,-4.144%,
COO,Cooper Companies (The),0.03,TODO,38.0039849318835,-0.04640519287495026,-2.254%,-14.344%,-13.161%,-24.440%
AVY,Avery Dennison,0.03,TODO,43.56754008839466,-0.7840986990034374,-1.928%,-5.457%,-1.762%,-6.915%
OMC,Omnicom Group,0.03,TODO,37.96375539854125,-0.1794754339860225,-5.293%,-8.766%,-13.967%,-20.889%
-UDR,UDR, Inc.,0.03,TODO,47.35867119622631,0.019566736229606488,-1.083%,-2.095%,-5.775%,-4.261%
+UDR,UDR Inc.,0.03,TODO,47.35867119622631,0.019566736229606488,-1.083%,-2.095%,-5.775%,-4.261%
INCY,Incyte,0.02,TODO,56.37357267791799,-0.05004722187470034,-0.842%,4.548%,12.694%,1.066%
IEX,IDEX Corporation,0.02,TODO,39.593608337122156,-0.9496484732489191,-4.444%,-7.028%,-4.735%,-17.302%
PAYC,Paycom,0.02,TODO,32.29392517258512,-4.033119285936392,-7.538%,-10.691%,8.072%,11.137%
@@ -451,7 +451,7 @@ DOC,Healthpeak Properties,0.02,TODO,40.92727000201002,0.01610532462059147,-2.627
ALLE,Allegion,0.02,TODO,44.192272878946504,-0.7178534177125816,-0.826%,-4.788%,7.109%,3.261%
BG,Bunge Global,0.02,TODO,68.08998698114611,1.139176345468969,13.356%,6.405%,15.686%,8.113%
MOS,Mosaic Company (The),0.02,TODO,65.47020469622512,-0.18803107009529052,5.166%,2.561%,28.400%,50.082%
-BXP,BXP, Inc.,0.02,TODO,57.9767037618438,-0.03473817383889566,-1.740%,6.080%,4.732%,-3.395%
+BXP,BXP Inc.,0.02,TODO,57.9767037618438,-0.03473817383889566,-1.740%,6.080%,4.732%,-3.395%
FOX,Fox Corporation (Class B),0.02,TODO,52.91164764726117,-0.1258812150734962,0.200%,-3.719%,1.660%,7.930%
RVTY,Revvity,0.02,TODO,51.76798664492248,0.47175068200960496,-1.728%,0.887%,-11.750%,-13.496%
AKAM,Akamai Technologies,0.02,TODO,52.81271952879557,0.29021357019574545,0.652%,1.561%,-3.495%,-16.383%