
Show HN: Scatterstocks – visualize the impact of news on stock prices - catchmeifyoucan
https://scatterstocks.com/index.html?symbols=AAPL,GOOGL,DVMT,MSFT,AMZN&events=QXBwbGUgVW52ZWlscyBOZXcgaVBhZCBhbmQgTWFjQm9vayBBaXItMTAvMzAvMjAxOEAhQFN0b2NrcyBEaXZlIEFmdGVyIEFwcGxlIFN1cHBsaWVyIFNsYXNoZXMgT3V0bG9vay0xMS8xMi8yMDE4QCFAR29vZ2xlIFdvcmtlcnMgUmVqZWN0IFNpbGljb24gVmFsbGV5IEluZGl2aWR1YWxpc20gaW4gV2Fsa291dC0xMS8wNi8yMDE4QCFA
======
catchmeifyoucan
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.

~~~
zigzaggy
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.

------
octopod
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-...](https://medium.com/@492727ZED/datasets-with-context-
control-e867d600b0)

------
iSpiderman
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](https://arxiv.org/pdf/0909.1690v1.pdf)

------
s9w
"View Example" doesn't work

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

~~~
catchmeifyoucan
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.

~~~
neogodless
I'm using Firefox.

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

~~~
catchmeifyoucan
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...](https://github.com/rlingineni/Scatter-
Stocks/commit/394644bb64cf3b6629b86af81682c52d77d7d338)

------
catchmeifyoucan
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](https://scatterstocks.com/about.html)

------
verdverm
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)

------
djinnandtonic
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.

~~~
catchmeifyoucan
Ok, I'll get rid of the alert. Thanks :)

~~~
catchmeifyoucan
Done.

------
DougN7
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.

------
gitgud
Kind of like seeing what the effects of insider trading would be right?

------
malshe
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...](https://finance.yahoo.com/chart/^GSPC#eyJpbnRlcnZhbCI6ImRheSIsInBlcmlvZGljaXR5IjoxLCJjYW5kbGVXaWR0aCI6MzY1LCJ2b2x1bWVVbmRlcmxheSI6dHJ1ZSwiYWRqIjp0cnVlLCJjcm9zc2hhaXIiOnRydWUsImNoYXJ0VHlwZSI6ImxpbmUiLCJleHRlbmRlZCI6ZmFsc2UsIm1hcmtldFNlc3Npb25zIjp7fSwiYWdncmVnYXRpb25UeXBlIjoib2hsYyIsImNoYXJ0U2NhbGUiOiJsaW5lYXIiLCJwYW5lbHMiOnsiY2hhcnQiOnsicGVyY2VudCI6MSwiZGlzcGxheSI6Il5HU1BDIiwiY2hhcnROYW1lIjoiY2hhcnQiLCJ0b3AiOjB9fSwibGluZVdpZHRoIjoyLCJzdHJpcGVkQmFja2dyb3VkIjp0cnVlLCJldmVudHMiOnRydWUsImNvbG9yIjoiIzAwODFmMiIsImV2ZW50TWFwIjp7ImNvcnBvcmF0ZSI6eyJkaXZzIjp0cnVlLCJzcGxpdHMiOnRydWV9LCJzaWdEZXYiOnt9fSwicmFuZ2UiOnsiZHRMZWZ0IjoiMjAxOC0wMi0wNFQxODowMDowMC4wMDBaIiwiZHRSaWdodCI6IjIwMTgtMDItMDdUMTI6MDA6MDAuMDAwWiIsInBlcmlvZGljaXR5Ijp7ImludGVydmFsIjoiZGF5IiwicGVyaW9kIjoxfSwicGFkZGluZyI6MH0sImN1c3RvbVJhbmdlIjp7InN0YXJ0IjoxNTE3ODEwNDAwMDAwLCJlbmQiOjE1MTc5ODMyMDAwMDB9LCJzeW1ib2xzIjpbeyJzeW1ib2wiOiJeR1NQQyIsInN5bWJvbE9iamVjdCI6eyJzeW1ib2wiOiJeR1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