A Forex News Trader called "Newspaper"

School is continuing as usual and I have been doing a lot of reading in portfolio optimization/management as part of my position in The Fund.   Recently, I've been coding on the side for an automated forex trader that trades off of economic indicator releases.  The other algorithmic pursuits I have been working on such as AREMA, etc hasn't been working well.  I spent a lot of time on debugging it but when it comes to backtesting, it is very difficult to churn a positive profit.  I haven't bothered with the machine learning aspect of it either but it might be revisited.

With that said, I will explain Newspaper, the name of the Forex news trader.  It's pretty much a cool system I developed without having to spend any money on streaming data or renting out a server.  The system is coded in PHP with an MQL extension to make all the trades.  The PHP system does all the info collection while the MQL reads its folder for a trade ticket every 10 tickets.  Furthermore, Newspaper is hosted on my computer on a local server run by XAMPP and is scheduled by Windows Task Scheduler to check for news releases every minute from DailyFX Calendar.  Below is a comprehensive structure:

Extra Extra!
Extra Extra!

The current strategy is to compare quantitative data released vs estimates.  This is in align with Chen, Roll and Ross (1986) in their paper which they model returns on the fact that the markets are efficient in which all prices are a weighted-sum of a wide spanning range of consensus for future estimates and will change as new information emerges and surprises occur.  Newspaper in the same sense tries to do that by trading off of surprises.  Currently it is built to look out information for JPY, USD and EUR with what is considered to be "High" Impact.  It will trade the relevant pairs when surprises emerge by opening a position at market and closing it two minutes later (more work will be needed on this later).

Another issue that arose when I was programming this is the release of multiple surprises for the same indicator at the same time.  I didn't want the trade ticket folder to have a Sell order AND a Buy order as I might lose on the spread.  Instead, I took a weighted approach using an associative array for each currency and for each positive/negative release, it will add and subtract 1 to the weighting.  If it's more than zero then a ticket is sent to buy and vice versa.  This implementation allows for more development in weighting of news releases as I develop this further.

For now, I still need to work on the efficacy of the system itself in capturing those big initial fluctuations in the currency at the time of news release.  On some days, the prices correct within two minutes, on others, it takes at-least an hour to fully adjust.  Furthermore, not much is known about the liquidity at the time of those releases and that will come as the system does more and more trades.  I will also be planning to add another component to the EA where it will update an external website with its trade stats for people to monitor and see how well the system does.

One thought on “A Forex News Trader called "Newspaper"

Leave a Reply

Your email address will not be published. Required fields are marked *