Click here to Login








Word Occurrence in News Titles - Quantitative Trading Analysis

by The trader, 4704 days ago
Share |








"GetField" is a function that gets a word among a list of words given an index provided as parameter to the function.
The function is mainly used in quantitative trading to optimize News driven trading systems and it works as follows:


// Basic Quantitative System Example

Optimize("i", 0, 7, 1);
a = GetField("buy;sell;up;down;increase;decrease;good;bad", i);
buy = ContainsWords("yahoo_news", "title", a);

This example uses a custom function "ContainsWords" (News parser function).
When optimizing a trading system, the variable "i" will vary from 0 to 7 (There are eight words to analyze). Each time, the "GetField" function returns a different value to variable "a".
If i=0 then "a" will be equal to "buy"
If i=1 then "a" will be equal to "sell"
This function gets a list of words separated by semicolons and then uses the index parameter to return the appropriate word.

The last buy rule consists of analyzing each stock news data and then returning a signal if the word assigned to the variable "a" is found.
In summary, the above strategy buys a stock each time a news title contains a specific word (buy,sell,up,down...)

This is it for the basic example. More advanced quantitative research and analysis can be performed using the "GetField" and "ContainsWords" functions. For example, you can instruct your trading system to generate signals when a combination of words is found.

A quick code sample:

Optimize("i1", 0, 7, 1);
Optimize("i2", 0, 7, 1);
a1 = GetField("buy;sell;up;down;increase;decrease;good;bad", i1);
a2 = GetField("buy;sell;up;down;increase;decrease;good;bad", i2);
buy = ContainsWords("yahoo_news", "title", a1) and ContainsWords("yahoo_news", "title", a2);

Both examples I presented here use news data from Yahoo. This data can be downloaded using the following trading item: Yahoo News.
Other news downloaders, such as Google news (Historical Stock Market News), StockTwits... can also be used.


Share This ->
Share |


You have to log in to bookmark this object
What is this?
Additional Information




Type: Trading Indicator

Object ID: 981


Country:
All

Market: All

Style:
Technical Analysis

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis



Random Blog Posts

Select the best ETFs combination to maximize your return and reduce your investment risk

How to turn any ordinary trading strategy into a very profitable one

Charting & Scripts - Manage stock charts using the global script

Trading System: Buy Stocks based on their Sharpe Ratio Rank

Creating and managing notes for your stocks

How to Quickly Create Fundamental Scans

Download Trading Data using the Post-Script

Download Trading Data using the Pre-Script

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.