Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Forex Trading Using Python

You're reading from  Getting Started with Forex Trading Using Python

Product type Book
Published in Mar 2023
Publisher Packt
ISBN-13 9781804616857
Pages 384 pages
Edition 1st Edition
Languages
Author (1):
Alex Krishtop Alex Krishtop
Profile icon Alex Krishtop

Table of Contents (21) Chapters

Preface Part 1: Introduction to FX Trading Strategy Development
Chapter 1: Developing Trading Strategies – Why They Are Different Chapter 2: Using Python for Trading Strategies Chapter 3: FX Market Overview from a Developer's Standpoint Part 2: General Architecture of a Trading Application and A Detailed Study of Its Components
Chapter 4: Trading Application: What’s Inside? Chapter 5: Retrieving and Handling Market Data with Python Chapter 6: Basics of Fundamental Analysis and Its Possible Use in FX Trading Chapter 7: Technical Analysis and Its Implementation in Python Chapter 8: Data Visualization in FX Trading with Python Part 3: Orders, Trading Strategies, and Their Performance
Chapter 9: Trading Strategies and Their Core Elements Chapter 10: Types of Orders and Their Simulation in Python Chapter 11: Backtesting and Theoretical Performance Part 4: Strategies, Performance Analysis, and Vistas
Chapter 12: Sample Strategy – Trend-Following Chapter 13: To Trade or Not to Trade – Performance Analysis Chapter 14: Where to Go Now? Index Other Books You May Enjoy

Basics of Fundamental Analysis and Its Possible Use in FX Trading

I am sure that almost anyone who has ever been curious about trading has heard about fundamental and technical analyses. As with many popular terms, there’s a good deal of misunderstanding with both.

Most likely, you know that there is an analyst profession and that this profession is in demand in the financial industry. You might have even considered this profession for yourself because you heard that modern analysts use advanced computer technologies and come from the world of data science. However, there is a crucial difference between the two concepts; thus, the mathematical and computer inventory used with each of them is radically different. Moreover, their use in actual trading algorithms is also quite different. Let’s have a deeper look into both and see how (and if) we can use them in our applications.

We will review the key principles of fundamental and technical analyses, learn how markets...

Fundamental analysis – intuitive but of little practical use

The idea of fundamental analysis is easily understandable: markets are known to react to various external information, so let’s study this reaction to help us to predict the market’s behavior. The external information in question depends on the market and can differ significantly.

Let’s start with probably the most evident factor that clearly affects the market prices: economic news.

Economic news

This is the most well-known type of fundamental data. In layperson’s terms, the better the economic situation, the greater the price of the asset. For example, if the nationwide economy shows growth, the most liquid stocks also grow. Yes, of course, there are exceptions, nuances, and so on, but overall, there is a positive correlation between the major macroeconomic indicators and the stock market’s growth.

But wait, why are we talking about stock markets while our main point of interest is forex (FX)?

With the FX market, economic indicators such as gross domestic product (GDP), jobless rate, core price index (CPI – the main inflation indicator), and others do not have any real long-term effect. Why? Because currencies have one feature that makes them completely different from any other asset class: they have interest rates.

To understand the concept of the interest rate, we should recall the mechanism that brings money into the economy....

Economic news from a fundamental analysis perspective

So, what would a fundamental analyst say in both cases? Let’s read one of the typical market reports:

“Today’s weekly Initial Jobless Claims came in at 234k above the expectations of 220K the 8:30 am release had little effect on the USD against its peers. We have Existing Home Sale figures for the month of April released at 10 am. Market participants will be interested in comments on yesterday’s FOMC minutes from Philadelphia Fed President Harker and Atlanta Fed President Bostic at a conference in Dallas today.” (By OFX, https://sitecore.prd.ofx.com/en-us/forex-news/daily-and-weekly-market-news/20180524/fomc-minutes-followed-up-by-fed-speakers-todays/.)

We can see here only a statement of a few known facts with a vague reference to market participants who will be interested in comments. So this analysis is useless for practical immediate trading: it does not give us any idea about possible...

Political events

Political events (such as presidential elections, wars, global treaties and declarations, and so on) also affect the markets, and the price behavior before and soon after such an event is somewhat similar to that of a reaction to regular economic news. This isn’t surprising because the mechanics behind the scenes is the same – everyone knows that this is a major event, no one wants to take excessive risk, liquidity providers withdraw liquidity from the books, and any new order, even small in size, can momentarily drive the price anywhere.

The difference between political and regular economic events is probably in the duration of the price movement after the event. Let’s consider a couple of examples.

US presidential elections, November 8, 2016

On this day, Donald Trump was elected the President of the US. His victory was not smooth: he was only the fifth president who lost the popular vote but was nevertheless elected. Therefore, if we...

Industry-specific information

Normally, fundamental information of this sort almost doesn’t affect the currency rates because the scope of its effect is too narrow. You can think about a currency as the largest market index, which includes all industries and all aspects of the economy of a particular country and compares them to those of another country in a currency pair. Most developed countries make every effort to keep their economies balanced and diversified. So, in case something happens, say, only in microelectronics, car manufacturing, agriculture, or healthcare – well, yes, it may affect the currency rates for a very limited time, but the effect will be so small, almost negligible, that normally, currency traders disregard fundamental information of this sort.

There are some notable exceptions though. There are countries whose economies are very tightly connected to only one or two industries. For these countries, fundamental factors that are specific to the...

Summary

We can see that fundamental factors do affect the prices of currencies, but we also can see key problems with using these factors in automated trading, such as the (a) releases of macroeconomic news mostly cause the unpredicted direction of price movements, and these movements frequently do not last long enough to trade, (b) political events cause longer price movements and are potentially tradable, but they are rare, and it’s easier to trade them manually than programmatically, (c) using industry-specific fundamental factors is potentially the most promising, but requires a thorough analysis of the respective industry and works only for specific currencies.

In any case, systematic traders (those who prefer entering and exiting positions basing their decisions on a set of rules rather than intuition or sentiment) have long searched for an alternative, quantitative way of analyzing market data as opposed to qualitative fundamental analysis. This quantitative analysis...

lock icon The rest of the chapter is locked
You have been reading a chapter from
Getting Started with Forex Trading Using Python
Published in: Mar 2023 Publisher: Packt ISBN-13: 9781804616857
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}