Transcript Document

Trading in the Foreign Exchange Markets using an
Automated Japanese Candlestick Model
ABSTRACT
Technical Analysis is the study of historical
price trends in order to predict future price
movements. Traders use various forms of
Technical Analysis to improve their trading
profitability. Japanese Candlestick Charting,
one discipline of Technical Analysis, has a
long history of use in Foreign Exchange
markets. Traditionally, traders would study
price movements in the form of candlestick
charts to visually search for well-known
patterns that lead to buy or sell signals.
However, this method is tedious and
inefficient, as traders manually comb
through charts to find indicators and make
trading decisions.
The model created in this project converts
the visual signals perceived by traders from
candlestick charts into computer logic,
effectively automating the technique. Price
data is imported for any currency pair, and
the model outputs when to buy and sell
based on the automated candlestick
indicators. This model contains a master
indicator, which is refined to only include
candle patterns that are historically
profitable. The master indicator also takes
into account other technical indicators that
are used for confirmation. After testing over
seven currency pairs and three decades of
data, the model has shown an ability to
increase trading profits on average.
AUTHORS:
Simran Bhatia SSE ‘09
Andrew Ruben SSE ‘09
Aman Thapar SSE ‘09
ADVISOR:
Dr. Iraj Zandi
DEMO TIMES:
Thursday, April 23rd , 2009
11:00 AM, 11:30 AM, 3:00 PM and 03:30
PM
GROUP #7
Department of
Electrical and Systems
Engineering
SYSTEM FLOWCHART
AUTOMATED INDICATOR RECOGNITION
In order to determine which currencies to trade, the system starts by analyzing
the fundamental strength of 7 major currencies relative to the US Dollar. Once the
currency pair is chosen, the system inputs the relevant price data. The data is
inputted through the Automated Indicator Recognition Process to see if
sequences in the data match up with well known Candlestick Indicators. This
gives a preliminary indication of whether to buy or sell the currency at a given
time. This signal is confirmed with the output of three other well known technical
indicators. By confirming with indicators independent of the Candlesticks, the
model is able to make more robust trading decisions. In order to match real-world
trading conditions, the model implements transaction costs and risk controls.
In this component of the system, illustrated in Figure 4,
the model automatically identifies candlestick indicators.
The system inputs real-world price data and performs
calculations on the price bars. Based on ratios between
prices, the model classifies individual candles and then
sequences of multiple candles. If the data matches a
particular indicator, our system flags a trading signal.
This outputs a preliminary decision on whether to buy or Figure 3 – Three White
sell a currency at this time.
Soldiers Formation
Figure 4 – Indicator Recognition Flowchart
Figure 1 – System Flowchart
TRADING SYSTEM
JAPANESE CANDLESTICKS
The Automated Candlestick Indicator is combined with other Technical
Indicators in order to give a final buy or sell signal. A confirmed Three White
Soldiers pattern occurred and is shown below. When the decision to trade
occurs, the model outputs a ‘buy’ signal and implements transaction costs.
The position is exited based on rules for controlling profit and loss fluctuations.
A candlestick is a way of visually encapsulating the price movements of a
security within a given time period. For each period, a security has an opening
price and a closing price, as well as a high price and low price. These four
elements are drawn into a candlestick as shown in Figure 2. When the open is
higher than the close, the price decreased over the period and the body of the
candlestick is black. When the close is higher than the open, the price increased
and the body is white.
Series of candlesticks can be used to identify
reoccurring price trends. There are known and
published candlestick patterns which traders use
to generate buy and sell signals. An example
candlestick pattern that generates a ‘buy’ signal
is shown in Figure 3. This specific formation is
known as the ‘Three White Soldiers’. In this
formation, there are three long white days,
signifying a string of higher price moves. This
suggests the market is strong, and represents a
time to buy the underlying security. This is one of
thirty indicators tested in the model.
Figure 2 – Japanese Candlesticks
Figure 5 – Real World Trade Example