-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Natural Language Processing with Flair
By :
The trading strategy consists of three main logically independent components:
The first component, news acquisition, is a very domain-specific piece of code. The data source used largely depends on the types of companies we're interested in trading. There's no universal source of news that will work well for all stock. Therefore, we plan to move the news acquisition part out of our strategy and design it so that the news text is merely provided as input to our bot.
Our trading strategy components will often access the same mutual variables such as the name of the company we are interested in. Therefore, it makes sense to use an object-oriented design and implement our strategy as part of a Python class. We will call our trading strategy class FlairTrader. The class's constructor method will receive the company name (the name of the...