News for hackers. Stuff that matters.

Show HN: Scatterstocks – visualize the impact of news on stock prices

https://scatterstocks.com/index.html?symbols=AAPL,GOOGL,DVMT,MSFT,AMZN&events=QXBwbGUgVW52ZWlscyBOZXcgaVBhZCBhbmQgTWFjQm9vayBBaXItMTAvMzAvMjAxOEAhQFN0b2NrcyBEaXZlIEFmdGVyIEFwcGxlIFN1cHBsaWVyIFNsYXNoZXMgT3V0bG9vay0xMS8xMi8yMDE4QCFAR29vZ2xlIFdvcmtlcnMgUmVqZWN0IFNpbGljb24gVmFsbGV5IEluZGl2aWR1YWxpc20gaW4gV2Fsa291dC0xMS8wNi8yMDE4QCFA

( 22 comments | 77 points | on HN )
Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @01:41AM (#18525725)
Hey HN,

Creator here. Wanted to share my Scatterstocks project that I have worked on. It was inspired from a graph I had read in a Bloomberg article. It showed the differences in stock prices from various industries as soon as Amazon announced it was entering the market. (eg. Whole Foods, Health Care, Automotive). However, I wanted to see the same graph but for every company and any news event beyond Amazon.

The graph is powered using d3.js. The client-side uses a mix of Mustache templating and jQuery. I know, in the modern day and age of large frameworks, why jQuery? I actually wanted to learn it for a change.

Data is pulled from alphavantage and the NYT headlines API. I hope the "bombshell" graph is useful, and possibly something to periodically checkout to see how different stocks have done. It's hard to say there's always a strong correlation, but it does exist for certain events. Feature requests, PRs and feedback are all welcome.

Re:Show HN: Scatterstocks – visualize the impact of news on ... by zigzaggy on Sunday November 25, 2018 @02:28AM (#18525822)
Great idea! This is going on tomorrow’s to do list. I’ll come back with comments soon.

I’ve got a couple of friends who are gonna love this too. Thanks for showing this.

Re:Show HN: Scatterstocks – visualize the impact of news on ... by octopod on Sunday November 25, 2018 @02:36AM (#18525838)
Would be interesting to combine it with approaches like these 'Predicting Future Correlations with Contextually Controlled Datasets' https://medium.com/@492727ZED/datasets-with-context-control-...
Re:Show HN: Scatterstocks – visualize the impact of news on ... by iSpiderman on Sunday November 25, 2018 @11:37AM (#18527514)
That's very nice.

About ten years ago I developed the 'Scale of Market Quakes' for FX data and wrote a paper [1] about it (it's terribly written!), which was then released as a web service (www.olsenscale.com, not available anymore) and journalists etc could sign up for.

The idea was to measure the turbulences released in the market by e.g. quantitative easing by the FED. Was a great project and I learnt a lot.

[1] https://arxiv.org/pdf/0909.1690v1.pdf

Re:Show HN: Scatterstocks – visualize the impact of news on ... by s9w on Sunday November 25, 2018 @02:42AM (#18525850)
"View Example" doesn't work

edit: oh chrome works? Is this chrome only? Huh

Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @03:19AM (#18525956)
Sorry, I guess I haven't tested on other browsers too much. Which one are you using. I use primarily Safari and Chrome, and it should work on both.
Re:Show HN: Scatterstocks – visualize the impact of news on ... by neogodless on Sunday November 25, 2018 @07:57AM (#18526683)
I'm using Firefox.

ReferenceError: can't access lexical declaration `NEWS_ITEM_TEMPLATE' before initialization init-templates.js:15:32

Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @04:16PM (#18529099)
I think I see the problem. Thanks for the log output. Firefox does js right. Let me know if it works :)

Here's my change btw:

https://github.com/rlingineni/Scatter-Stocks/commit/394644bb...

Re:Show HN: Scatterstocks – visualize the impact of news on ... by kgc on Sunday November 25, 2018 @03:41AM (#18526015)
Seems to not work:

Making request for all Stock Data graph.js:42 Recieved Stock Data graph.js:75 TypeError: Cannot read property '2. Symbol' of undefined at generateGraph (graph.js:44)

Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @04:09AM (#18526093)
Ran out of Alphavantage API Calls for the stock prices for the day :(

Updated the token to a new one to see if I could get around it. Hopefully, they don't hate me.

Re:Show HN: Scatterstocks – visualize the impact of news on ... by malshe on Sunday November 25, 2018 @11:06AM (#18527385)
Firefox doesn't work for me either. Chrome is OK. I am using Windows 7.
Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @04:20PM (#18529123)
Should work now, thanks!
Re:Show HN: Scatterstocks – visualize the impact of news on ... by s9w on Sunday November 25, 2018 @03:33AM (#18525991)
Firefox
Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @04:21PM (#18529128)
Updated, it should work now.
Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @04:08AM (#18526088)
Sorry if the graph didn't render for you. Unfortunately, this is what a no-caching strategy looks like.

{ "Note": "Thank you for using Alpha Vantage! Our standard API call frequency is 5 calls per minute and 500 calls per day. }

Here's the about page that has a video demo at the end if it didn't work for you and a link to the original graph:

https://scatterstocks.com/about.html

Re:Show HN: Scatterstocks – visualize the impact of news on ... by verdverm on Sunday November 25, 2018 @11:09AM (#18527401)
I remember a Bloomberg developer talk where they showed the price change as the news hit various outlets. Small move when it hit the BB terminal, a little more when Reuters, big movement when the major media outlets. Made me want to get the BB terminal, if it weren't for the price! (in theory, it would pay for itself)
Re:Show HN: Scatterstocks – visualize the impact of news on ... by djinnandtonic on Sunday November 25, 2018 @12:53PM (#18527871)
Please have a better experience for mobile users; an alert popup and refresh cycle is pretty bad. Rendering the mobile unfriendly parts with a message (even if it breaks your experience) is much better.
Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @01:28PM (#18528063)
Ok, I'll get rid of the alert. Thanks :)
Re:Show HN: Scatterstocks – visualize the impact of news on ... by catchmeifyoucan on Sunday November 25, 2018 @01:30PM (#18528076)
Done.
Re:Show HN: Scatterstocks – visualize the impact of news on ... by DougN7 on Sunday November 25, 2018 @07:22AM (#18526577)
I’ve wanted to so something similar, adding tracking of the authors to see who is able to have an impact, or who is always wrong.
Re:Show HN: Scatterstocks – visualize the impact of news on ... by gitgud on Sunday November 25, 2018 @07:26AM (#18526585)
Kind of like seeing what the effects of insider trading would be right?
Re:Show HN: Scatterstocks – visualize the impact of news on ... by malshe on Sunday November 25, 2018 @11:53AM (#18527593)
This looks great! If it's OK, I would like to make a small suggestion for improvement. It will really help if you can add a reference to a broad stock market indicator (e.g., S&P 500). Without that it is a bit difficult to see whether the impact is due to the event or some other confounding event that affected all the stocks.

I checked the story about Apple's Homepod article in NYT on Feb 6, 2018 and the plot shows that stock prices of Amazon, Google, Microsoft, etc. went up by 4-5% in 24 hours! But when I look at the number from Yahoo Finance, it seems that everything went up and Apple went up more than these companies. The next day all of them went down and then by Feb 9th there was a huge crash. Check out the graph for 5-7 Feb: https://finance.yahoo.com/chart/^GSPC#eyJpbnRlcnZhbCI6ImRheS...