Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Scatterstocks – visualize the impact of news on stock prices (scatterstocks.com)
77 points by catchmeifyoucan on Nov 25, 2018 | hide | past | favorite | 22 comments



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.


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.


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


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


"View Example" doesn't work

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


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.


I'm using Firefox.

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


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


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)


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.


Firefox doesn't work for me either. Chrome is OK. I am using Windows 7.


Should work now, thanks!


Firefox


Updated, it should work now.


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


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)


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.


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


Done.


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.


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


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: