Difference between revisions of "ANLY482 AY2017-18T2 Group06 Analysis Finding Finals"

From Analytics Practicum
Jump to navigation Jump to search
Line 56: Line 56:
 
<br/>
 
<br/>
 
<br>[[Image:BBWIDTH.png|left|300px|]] From the chart, BB width of the period from 8am to 1300hours is relatively low, below 0.002. From 1300, there are 4 occurrences of it exceeding 0.002. At 2300 hours, there is one huge spike from the chart exceeding 0.006 width and at 0000 hours. There is another huge spike observed in the chart followed by a decrease in volatility as time passes
 
<br>[[Image:BBWIDTH.png|left|300px|]] From the chart, BB width of the period from 8am to 1300hours is relatively low, below 0.002. From 1300, there are 4 occurrences of it exceeding 0.002. At 2300 hours, there is one huge spike from the chart exceeding 0.006 width and at 0000 hours. There is another huge spike observed in the chart followed by a decrease in volatility as time passes
 +
<br>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
===<div style="font-family:'Century Gothic';"> RSI Minute Data Analysis</div>===
 +
[[Image:BBQ1.png|left|300px|]]This plot shows the timestamps where the RSI is deemed as overbought or oversold. The red lines indicate an RSI upper limit of 80 and lower limit of 20 while the blue lines indicate RSI 70 and 30 respectively. Our focus is on the timings of overbought or oversold for potential entries. First point to note is that there are plenty of such occurrences in a minute tick data as the RSI is subjected to large spikes in price leading to false signals. Hence, we would use the values of 80-20.
 +
<BR>
 +
<br>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
<br/>
 +
===<div style="font-family:'Century Gothic';"> BB & RSI ANALYSIS</div>===
 +
[[Image:BBQ1.png|left|300px|]]The plot above shows the recommended buy or sell based on the 2 technical indicators. The red circle on the chart represents an overbought situation and the recommended action will be selling at the indicated price. The green circle represents an oversold situation and the recommended action will be buying at the indicated price. The table shows the detailed time when the action should be taken, the condition identified by both technical indicators, and the recommended buy or sell trading action.

Revision as of 00:19, 14 April 2018

 

DATA PREPARATION

We configured a total of 4 functions to access our client’s brokerage platform, OANDA. These functions can retrieve/send data directly from the brokerage on demand through a live connection. Considerations put into deciding on these functions include:

• Retrieval of historical data from a chosen time period, with the latest possible date being ‘now’.
• Ability to choose the granularity of the data retrieved, ranging from minutes, daily to weekly.
• The specific financial instrument, currency pair, which we want to retrieve data on.
• Submission and modification of orders to the brokerage upon decision at the coding end for a buy/sell trading action.

The resulting functions to achieve all of the following considerations are below:

1. ActualPriceV20: Returns the current bid/ask price of the chosen currency pair
2. AccountInfoV20: Returns account information (balance, profit & loss)
3. AccountPositionsV20: Returns all open trade positions in chosen trading account
4. HisPricesV20: Returns the currency pair’s information according to parameters

TECHNICAL ANALYSIS: BOLLINGER BANDS & RELATIVESTRENGTHINDEX

For the currency pair of USD/JPY, we will be using BBs & RSI to predict currency price movements and deliver a trading action based on their analysis.

The BBs consist of two lines, 2 standard deviation from the center line which is a 20-day simple moving average of the prices. The widening and contraction of the bands directly relates to the increase and decrease of volatility respectively as standard deviation is a measure of volatility. One of the pattern analysis seen by many traders, including our clients, on BBs is a pattern when prices moves significantly closer to the bands, indicating an overbought or oversold situation in the market. This would be a situation where traders might consider selling in an overbought situation and buying in an oversold market.

Bbformula.png

The Relative Strength Index (RSI) is a momentum indicator which compares the magnitude of the recent gain and loss over a specific period of time, to measure speed and change in price movements. The primary use of RSI is for identifying an overbought or oversold market.

RSIformula.png


BBs and RSI function from the TTR package were used with mins data from 3rd January 2017 to 4th January 2017. The day will be split into 4 quarters in order to better visualize the data for the Bollinger bands. Basic descriptive analysis are in each individual quarters. Thereafter, the Bollinger band width of the chart will be plotted to analyses the day, followed by the relative strength index section.

BBs Minute Data Analysis

BBQ1.png

From 0800hours till 0930 hours, the market is more volatile from the +8gmt market opening hours. Forex traders tend to be active during market opening hours causing more volatility as they have information from the US market, affecting the prices of the currency. Hence, traders could take advantage of the situation. Volatility also decreases past 1030hours after the market stabilizes.










BBQ2.png

At 1500, there is a very strong uptrend which caused the price to spike from approximately 117.3 to approximately 118.2 at 1800hours.Whenever such strong uptrend or downtrend occurs, the price will touch the upper or lower bounds of the BBs respectively. Also, it can be noted that the bands expanded upon the strong uptrend occurring. Nearing the 1800hours at the approximate price of 118.1, the trend eventually reflects less volatility and the bandwidth decreases and eventually climbs to 118.3 at 2000hours.






BBQ3.png

The US market opens at 2000hours, a time usually marked with the highest trading volumes. The bands have a bigger bandwidth in this period compared to the previous 2 as seen from the difference in the Y axis across the charts. 2300hours marks the sharpest bullish trend in the day which reflects an approximate 0.6 increase in price in less than an hour. After 2300hours, the bandwidth eventually expanded to almost 1.0 in the next few minutes, signifying a period of extreme volatility. Thereafter, in the next hour after the peak, there was a reversal in the direction of the price. This is followed by a price drop to 117.6 at 0200hours the next day.






BBQ4.png

At 0200 hours, there was a minor drop of price from 117.5 to 117.3 with a reversal in the direction of the price followed by an increase to an approximate value of 117.6 for the rest of the day. However, the main takeaway is the difficulty in analysis with this chart alone. Hence, a plot for the BBs width will be done to analyze the volatility for the day.









BBWIDTH.png

From the chart, BB width of the period from 8am to 1300hours is relatively low, below 0.002. From 1300, there are 4 occurrences of it exceeding 0.002. At 2300 hours, there is one huge spike from the chart exceeding 0.006 width and at 0000 hours. There is another huge spike observed in the chart followed by a decrease in volatility as time passes









RSI Minute Data Analysis

BBQ1.png

This plot shows the timestamps where the RSI is deemed as overbought or oversold. The red lines indicate an RSI upper limit of 80 and lower limit of 20 while the blue lines indicate RSI 70 and 30 respectively. Our focus is on the timings of overbought or oversold for potential entries. First point to note is that there are plenty of such occurrences in a minute tick data as the RSI is subjected to large spikes in price leading to false signals. Hence, we would use the values of 80-20.









BB & RSI ANALYSIS

BBQ1.png

The plot above shows the recommended buy or sell based on the 2 technical indicators. The red circle on the chart represents an overbought situation and the recommended action will be selling at the indicated price. The green circle represents an oversold situation and the recommended action will be buying at the indicated price. The table shows the detailed time when the action should be taken, the condition identified by both technical indicators, and the recommended buy or sell trading action.