Mathematics in Economics and Finance Course: Finance Fundamentals of trading Lecture notes, 2014 Rado Pezdir 1 1 Rado.pezdir@gmail.com This lecture notes are to be used in classroom only and should be your starting point before you begin trading on +500. Lecture notes should not be treated as trading manual. 1
Introduction There are three basic approaches to analyze financial markets: fundamental analysis which focuses on business analysis, technical analysis which focuses on the historical data and quantitative analysis which uses highly technical mathematical models. Here we investigate fundamental and technical analysis. Fundamental analysis Core of the fundamental analysis is analysis of business indicators. Fundamental analysis holds that business aspects are the most important information one have when assessing the value of financial instruments or when predicting future price movements. For example movement of the price of a stock of a certain company is reflecting business performance of the company. Fundamental analysis consist of three approaches: economic analysis (macro analysis), industry analysis and company analysis. P/E ratio P/E ratio is price to earnings per share ratio. Indicator shows the relative difference between stock price which indicates supply and demand for stock on financial markets and earnings per share which show business performance of company. Stocks with higher P/E ratio usually indicate stocks with expected higher growth of earnings. Interpretation of P/E ratios is related to the values of the indicator: P/E = 0 10: either stock is undervalued or growth of earning has declined P/E = 11 17: fair value of the stock P/E = 18 25: the stock is either overvalued of earnings have been increasing P/E = 25 + : stock price is most probably in speculative bubble Whether the stock is overvalued or earnings are increasing could be further interpreted by analyzing company reports and balance sheets. In order to understand the movement of P/E ratio historical analysis of market data is employed. In the graph below we show the P/E for Standard and Poor index: 2
Using historical data one could understand whether stock is under - or over performing. Dividend yield Dividend yield is a ratio between the dividend paid by companies and the stock price. The assumption is that successful business performance should translate in higher dividends, meaning that the bigger the dividend yield, the more interesting stock. The formula for dividend yield is: dividend yield = D P Dividend yield should be analyzed in historical context. Below is the graph that shows historical movement of the dividend yield for the dividend yield and could be used in interpretation of the indicator. Everything above the red line (historical average) should be considered as a good investment. 3
P/S ratio P/S ratio is price of stock divided by company's revenue per share. Values of P/S bellow 1 are interpreted as good investment as investor is paying less for the unit of sallies. P/B ratio P/B ratio is market price of stock divided by book price of stock. Book price of stock is an accounting concept using value of the stock from balance sheets. Values for P/B ratios vary across the industries so one should be careful when using P/B as an investing indicator. Generally low values indicate that the stock is undervalued or the company is doing badly. As always when fundamental analysis is employed the final interpretation of indicator has to come from the company reports and balance sheets. ROE and ROA ROA (return on assets) and ROE (return on equity) are typical business indicators however they are also used when accessing the stock value. Both ROA and ROE values vary across the industries. Generally higher values for ROA and ROE indicate better investments. We get the values for ROA and ROE as: ROA = ROE = net income total assets net income equity capital There are numerous webpages offering date on various indicators. For example: https://screener.finance.yahoo.com/stocks.html For values for fundamental indicators for Slovenian stocks see: http://www.ljse.si/ 4
Technical analysis Technical analysis assumes that in order to understand and predict future movement of stock prices one does not have to analyze data on corporate performance. It suffices to use historical data to analyze and make predictions since all relevant information is already included in the stock prices. In other words movements of stock prices reflect all relevant information on business performance and market sentiments. The main problem of technical analysis lies in the efficient market hypothesis which says that stock prices behave unpredictable. Candlestick charts This approach assumes that there are repeating patterns in financial markets which we can use to make investing decisions. This approach is fairly old but still very much in use; however I would not advise you to use an analysis which lacks solid methodological fundaments. Basic idea behind candlestick is interpretation of price movements. Let s take a simple example from stockcharts.com and discuss the possible strategies. White candlestick indicates positive price movement or increase in stock price, while black candlestick indicates negative price movement. Long white candlestick indicates bullish markets with trend of stock prices rising. Given that information investor should buy such stock. On the other hand long black candlestick would imply bearish market or stock price dropping, implying investor should sell the stock. The length of candlesticks implies how big the difference between opening and closing prices were during one trading day. Larger difference between open and close would translate in bigger candlesticks. 5
Another indicator in candlestick analysis is shadow. Shadows are providing information on the structure of the trading sessions. For example: Long upper shadow with black candlestick would imply that buyers dominated during the trading session but at the end of the trading day sellers pushed the price of stock down. Long shadow implies that sellers dominated the trading session however at the end sellers pushed the price upwards. Dojis appears when opening and close prices are close. Again black box indicates sell and white box buy: 6
Example of Doji trading strategies First pattern indicates ending of the bullish trend implying investor should consider selling. The second pattern indicates end of selling period and beginning of buying, investor should consider buying a stock. There are numerous patterns translated into candlestick strategies. The difficulty with this approach is that there are not clear definitions of why some candle sequences are forming a pattern and how consistent and reliable pattern is. This being said candlestick chart are not advised. ADX/DMI ADX (average directional movement indicator) and DMI (directional movement indicator) are both trend indicators. Investor's strategies using DMI indicator depends on the sign of DI and relation between +DI and -DI: +DI -DI long (or buy) -DI +DI short (or sell) And for ADX: if ADX line breaks value 20 three times sequentially investor should enter long position. Note: Please check for example: http://stockcharts.com/school/doku.php?id=chart_school, we are not going to get too technical in this paper instead we will just describe algorithms based on technical analysis. Technical aspect of analysis will be left for your seminar work. 7
The chart below gives graphical details on trading using ADX: Moving averages (MA) Moving averages are probably one of the most important indicators. Moving averages are calculated using different time periods, usually 10, 15, 20, 50 or 100 days. Depending on investor s idea of how much history matters. There are two ways to use moving differences in technical analysis: either by using simple moving averages (SMA) or exponential moving averages (EMA). The difference is that EMA puts more emphasis on recent data. The simplest strategy would be: P MA long P < MA - short The other strategy would be to calculate two MA's using different length of periods and then compare them. Say we calculated EMA using data for periods of 50 and 200 days, then we say that EMA(50) is short term trend and EMA(200) long term trend, the strategy would be: EMA(50) EMA(200) long EMA(200) EMA(50) - short 8
Graphically we are shorting and longing: Moving average convergence/divergence oscillator - MACD MACD series is difference between short period (also fast) EMA and long period (slow) EMA and it is a metrics of trend. MACD oscillates around zero line which is also known as centerline. Positive MACD indicates that fast EMA is above slow EMA and that uptrend is present, while negative MACD indicates the opposite. The strategy would be: MACD 0 long position MACD < 0 short position Generally traders use MACD(12, 26, 9), that is 12 days of history for fast EMA, 26 days for slow EMA and 9 days for MACD EMA, also called signal line. 9
Standard deviation Standard deviation is a measure of volatility. We know from statistics that larger the value of standard deviation the bigger the volatility. The interpretation of this indicator is straightforward. Let s give an example: if the price of stock X is 100 Euros and if the standard deviation is from 2 to 15 that means that the price of stock X can change in a range between 2 and 15 euros. In order to show how standard deviation works on financial markets let use the example given in stockcharts.com: Standard deviation is calculated using 21 days. The last value for the period is 0,88. If the distribution is normal then in 68% of cases during the 21 day period a price should not change for less than 0,88 euro. 95% of the 21 observations should give us a price change no less than 1,76 euro (standard deviation of 0,88 times 2) and in 99,7% of the 21 observations the price change would give a price change of 2,64 euro. As we know from statistics only values for 1, 2 or 3 standard deviations matters. A fairly typical data range for standard deviation would be 21 days which is roughly one trading month (with 250 trading days being a trading year). 10
Bollinger bands A Bollinger band is an indicator of volatility and consists of moving averages standard deviations. Close Bollinger bands indicate period of low volatility while broad Bollinger bands indicate periods of increased volatility. Investors using Bollinger bands have different strategies but most common is taking long position when price trajectory touches lower band and short position when price trajectory touches lower band. However another common strategy would be long when price trajectory touches lower band and short when it touches moving average line (which is positioned in the middle of the bands) and vice versa. Bollinger bands are usually calculated using 20 days period and two standard deviations: Bollinger (20, 2). Relative strength index (RSI) Relative strength index is a measure of momentum. Besides trend and volatility momentum is another important concept in technical analysis. Momentum is the rate of rise or fall in price and it indicates the prices continuing to trend. RSI is usually calculated for 14 days and is measured on a scale from 0 to 100. Strategy is simple: if the value of RSI exceeds 70 then stock is overbought, investor should disinvest. If the value of RSI is below 30, stock is oversold; the investor should buy a stock. The RSI = 50 implies there is no trend. 11
12