HACKER Q&A
📣 blickentwapft

How can I do plain language stock market history queries?


I want to know things like “what are the 50 tech stocks that gained most in the last x weeks?”

Does anyone know anything in the web that does that?


  👤 sovreign Accepted Answer ✓
The "Text to SQL" parser bundled with Allen NLP may be a good starting place (https://demo.allennlp.org/atis-parser). The devil is in the details when you have to make assumptions on what the user wanted though. For instance, does "What was the worst week for tech stocks?" mean by market cap, largest relative losses, etc. If you can constrain the problem you may be able to get away with just named entity recognition.

👤 StratusBen
I use http://iexcloud.io/ for this...you'll have to code around it a bit but you can get the information you want.

👤 sesuximo
not web per se, but MS Excel has really powerful tools for stock prices. I haven't fully explored it, but I think you may have to manually specify the set of stocks you care about. But you can get prices over any dates etc.