Back Testing A Simple Trading Strategy

Was backtesting a simple trading strategy using R based on the following key parameters:

  1. Selected security : Maybank (Malaysia)
  2. Time period: 1 Jan 2011 – till 23 June 2017
  3. Single technical indicator test
  4. Test 1 – Price crossover based on 50D Simple Moving Average (buy signal: buy when closing price of Maybank crosses above SMA, and sell when prices closes below SMA)
  5. Test 2 – Price crossover based on 50D Simple Moving Average (with transaction costs at 1.0%)
  6. Test 3 – Price crossover based on 200D Simple Moving Average
  7. Test 4 – Price crossover based on 200D Simple Moving Average (with transaction costs at 1.0%)
  8. Test 5 – Buy & Hold Strategy

MBB linechart.png

Note: Blue line (50 Day SMA) and pink line (200 Day SMA)

The summary of results are shown below. It shows that the Buy & Hold strategy appears to be more superior than of the 50D and 200D SMA price crossover strategies.

results

Transaction costs exacerbated the mediocre results of the two simple trading strategies 50D and 200D SMA.

Performance Graph.png

Next experiment – need to fine-tune the trading strategy (including use of multiple technical indicators), in order to outperform the Buy & Hold strategy.

DISCLAIMER: THIS IS A PERSONAL BLOG AND SHALL NOT BE RELIED IN WHATSOEVER MANNER BY ANYONE. ALL ARTICLES CONTAINED IN THIS SITE ARE STRICTLY FOR INFORMATION AND ILLUSTRATIVE PURPOSES ONLY AND DOES NOT PURPORT TO SHOW ACTUAL RESULTS. IT IS NOT, AND SHOULD NOT BE REGARDED AS INVESTMENT ADVICE OR AS A RECOMMENDATION REGARDING ANY PARTICULAR SECURITY OR COURSE OF ACTION. SOURCES USED IN THIS SITE HAVE NOT BEEN INDEPENDENTLY VERIFIED FOR ACCURACY, COMPLETENESS AND TIMELINESS. YOU SHOULD SEEK INDEPENDENT AND PROFESSIONAL INVESTMENT ADVICE IN REGARD TO YOUR INVESTMENT DECISIONS. THE AUTHOR MAY HOLD POSITIONS IN THE SECURITIES MENTIONED IN THE ARTICLES

A Simple R Script

Rplot.png

#Ken Utau Technical Analysis Script 2017
#https://myinvestjourney.com/
#initialising library files
library(quantmod)
library(ggplot2)
library(TTR)
library(PerformanceAnalytics)
# Get data
getSymbols(“KLSE%3AMAYBANK”,src=”google”)
# Delimit data range
mbb <-window(`KLSE%3AMAYBANK`[‘2011-01-01::2017-06-30’])
barChart(mbb)
# Bollinger Band
addBBands(n=20,sd=2.25)
# Moving Averages Covergence/Divergence MACD(3,10,16)
addMACD(3,10,16)
#RSI 
addRSI(n=14)

DISCLAIMER: THIS IS A PERSONAL BLOG AND SHALL NOT BE RELIED IN WHATSOEVER MANNER BY ANYONE. ALL ARTICLES CONTAINED IN THIS SITE ARE STRICTLY FOR INFORMATION AND ILLUSTRATIVE PURPOSES ONLY AND DOES NOT PURPORT TO SHOW ACTUAL RESULTS. IT IS NOT, AND SHOULD NOT BE REGARDED AS INVESTMENT ADVICE OR AS A RECOMMENDATION REGARDING ANY PARTICULAR SECURITY OR COURSE OF ACTION. SOURCES USED IN THIS SITE HAVE NOT BEEN INDEPENDENTLY VERIFIED FOR ACCURACY, COMPLETENESS AND TIMELINESS. YOU SHOULD SEEK INDEPENDENT AND PROFESSIONAL INVESTMENT ADVICE IN REGARD TO YOUR INVESTMENT DECISIONS. THE AUTHOR MAY HOLD POSITIONS IN THE SECURITIES MENTIONED IN THE ARTICLES

In Need Of A Sanity Check

UEM Edgenta has fallen to its low again today on 22 June 2017:

Edgenta TA.png

Fundamentally, does this make sense?

Based on historical EPS of Edgenta and earnings capitalisation method (shown below), I personally don’t see how Edgenta can go so low in terms of share price. But may be my assumptions are wrong or could there be some new developments that the market is totally not aware. Only time will tell….

Making Sense of Edgenta.png

DISCLAIMER: THIS IS A PERSONAL BLOG AND SHALL NOT BE RELIED IN WHATSOEVER MANNER BY ANYONE. ALL ARTICLES CONTAINED IN THIS SITE ARE STRICTLY FOR INFORMATION AND ILLUSTRATIVE PURPOSES ONLY AND DOES NOT PURPORT TO SHOW ACTUAL RESULTS. IT IS NOT, AND SHOULD NOT BE REGARDED AS INVESTMENT ADVICE OR AS A RECOMMENDATION REGARDING ANY PARTICULAR SECURITY OR COURSE OF ACTION. SOURCES USED IN THIS SITE HAVE NOT BEEN INDEPENDENTLY VERIFIED FOR ACCURACY, COMPLETENESS AND TIMELINESS. YOU SHOULD SEEK INDEPENDENT AND PROFESSIONAL INVESTMENT ADVICE IN REGARD TO YOUR INVESTMENT DECISIONS. THE AUTHOR MAY HOLD POSITIONS IN THE SECURITIES MENTIONED IN THE ARTICLES

Waiting For Brent To Tank

Latest news: Oil is trading in bear market territory, with prices falling to their lowest level this year as rising supplies threaten to derail an effort by some of the world’s biggest producers to bring an end to a three-year glut. Renewed concerns about growing production from within the Opec cartel and a reinvigorated US shale industry took global crude benchmarks on Tuesday to the lowest level since mid-November with Brent crude sinking to $46 a barrel. Prices at one point during the session were down more than 20 per cent from levels at the start of 2017. A decline of more than 20 per cent from the most recent high is typically considered a bear market. Crude has now erased all its gains since late last year, when Opec and other producer countries, including Russia, agreed to cut output by 1.8m barrels a day for the first six months of 2017. A decision in May to extend the original six-month deal for a further nine months has not helped lift sentiment as a growing chorus of traders and analysts question the effectiveness of the supply curbs.

Price of Brent crude on Tuesday

Brent crude, the international benchmark, fell 89 cents, or almost 2 per cent, to settle at $46.02 a barrel, the weakest level since November 15. West Texas Intermediate, the US marker, dropped by 97 cents to a nine-month low of $43.23 a barrel, down by more than 20 per cent from a February peak.

Brent Graph.png

Two questions – (1) where is the bottom for brent? (2) what would you do when Brent tanks to the bottom? Continue reading “Waiting For Brent To Tank”

Monte Carlo Analysis: FBMKLCI

Out-of-money structured FBMKLCI put warrant (code: 06502L) shall be expiring on 31 July 2017. It has a strike price of 1,625.00 which is significantly below the current index price of FBMKLCI of 1,791.31 (16 June 2017).

H2L.png

What is the likely chance that this put warrant will be in-the-money upon its expiry?

Continue reading “Monte Carlo Analysis: FBMKLCI”

Being Opportunistic

Edgenta listed on the Main Board of Bursa Malaysia, is a member of UEM Group Berhad; one of Malaysia’s leading and well-diversified conglomerate making significant contributions as Malaysia’s preferred partner in nation building. Established since 1963, Faber following its sucessful restructuring exercise ans strategic initiatives has grown into a key player in the Facilities Management and Property Development sectors with its sights set on taking the Group to the next level of growth as a leader in Integrated Facilities Solutions provider covering ASEAN, India Sub-Continent, and Middle East.

Continue reading “Being Opportunistic”

How High Can It Go?

Whilst Malaysian-listed concrete manufacturer OKA Corporation Berhad continues its uptrend trajectory, one should be aware of potential signs for reversal:

  1. It has been trading “free bars” (i.e above the upper range of Keltner Channel);
  2. Declining volume vs rising price:
  3. Two overbought signals in RSI;
  4. Divergence in MACD – declining MACD line vs rising price

OKA_TA_Review_Jun 17 PNG.png

One should also consider the recent insider trades (whereby there were some disposals by the insiders):

InsiderTrades.png

DISCLAIMER: THIS IS A PERSONAL BLOG AND SHALL NOT BE RELIED IN WHATSOEVER MANNER BY ANYONE. ALL ARTICLES CONTAINED IN THIS SITE ARE STRICTLY FOR INFORMATION AND ILLUSTRATIVE PURPOSES ONLY AND DOES NOT PURPORT TO SHOW ACTUAL RESULTS. IT IS NOT, AND SHOULD NOT BE REGARDED AS INVESTMENT ADVICE OR AS A RECOMMENDATION REGARDING ANY PARTICULAR SECURITY OR COURSE OF ACTION. SOURCES USED IN THIS SITE HAVE NOT BEEN INDEPENDENTLY VERIFIED FOR ACCURACY, COMPLETENESS AND TIMELINESS. YOU SHOULD SEEK INDEPENDENT AND PROFESSIONAL INVESTMENT ADVICE IN REGARD TO YOUR INVESTMENT DECISIONS. THE AUTHOR MAY HOLD POSITIONS IN THE SECURITIES MENTIONED IN THE ARTICLES