30

Financial NLP: The Internet’s Financial Membrane

 4 years ago
source link: https://towardsdatascience.com/financial-nlp-the-internets-financial-membrane-4da9482781f9?gi=1bf7bce7ac75
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Get answers to financial questions from natural language…

Apr 21 ·3min read

Disclaimer: No investment advice. There is no guarantee of any data herein being accurate or correct; all data is purely educational. Please consult a licensed investment professional before making investing decisions.

yuMBJv3.gif

/answer from the Spawner API using our Python library

I’ve written a lot about Natural Language Processing. It’s been possibly the source of the most innovation in AI/ML for decades, with many of the most interesting use-cases. Recently, companies (projects?) like Hugging Face have brought together teams of NLP researchers and engineers to build and open-source incredible projects. I’m especially fond of huggingface/transformers.

This sort of open-sourced innovation has enabled a whole new class of applications across all sorts of different domains. It’s making Applied AI, especially in web apps and internet startups, incredibly accessible. At Spawner, we decided to use our massive store of Financial Big Data in tandem with NLP from projects like Hugging Face, spaCy, and others to build something cool around Natural Language Processing for Finance and trading.

We’ve made this part of the Spawner API free, covering select data for stocks from the S&P 500. You can use our Python library to access this endpoint directly.

What is it?

“Answer” is your natural language plug into financial data. The end goal is to be able to ask any question about equities and get back natural language answers. For now, you can ask all sorts of questions about income statements, balance sheets, and cash flows. We’re working on adding major economic indicators and news next! You’ll get back the raw data from the latest reported quarter’s earnings.

Install Library

This is a very early version of our Python library. While the core API is stable, the Python library has a long way to go. Expect answers and data to sometimes be unavailable or inaccurate. We give 0 guarantee of accuracy or liveness of data for our free parts of the API.

The data fueling the free version of the API is sourced from open datasets and corporate earnings/releases. It goes through significant ETL before being ready for the training and understanding portions of our NLP.

pip install spawner

Import answer from the Spawner Python Library

from spawner.nlp import answer

Start Asking Questions

You’ll get back a Pandas DataFrame containing an answer in natural language, all in the order of highest probability to answer your question…

answer('what is the p/e ratio of apple?') 
The p/e ratio of Apple is 20.45answer('how about the revenue of GE?') 
The total revenue (Q4) of General Electric Company (GE) is 23,360,000,000answer('where is the S&P 500 at now?') 
Here is the quote for SPY (S&P 500 ETF): 281.5

yuMBJv3.gif

/answer from the Spawner API using our Python library

What can YOU build?

For now, you can ask and explore all things income statements, balance sheets, and basic things like price and financial statistics. We’re constantly adding to our data and improving our algorithms. We’re imagining all sorts of web apps and plugins that can be built by plugging into the heart of finance with Natural Language Processing. And we’re partnering with developers who want to build cool stuff. You can join our Discord and help us build the financial membrane of the internet! And if you get a chance, check out Spawner — the future of finance is automated .


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK