Creating stock charts with technical indicators overlays in Python
Jupyter Notebook za analizu dionica korištenjem grafičkih tehničkih indikatora. Povijesni podaci o kretanju vrijednosti dionica kotiranih na Zagrebačkoj burzi dostupni su na web stranici: www.zse.hr
Primjer dionice: ADPL-R-A http://www.zse.hr/default.aspx?id=10006&dionica=ADPL-R-A
Top panel of this figure features a Relative strength indicator computed with 14 days window, RSI(14). Middle panel features daily OHLC (open, high, low, close) price data shown as candlesticks chart. In the candlesticks chart, if the close price is higher then the open price, then the candle is black. On the other hand, if the close price is lower than the open, the candle is red. Tails (shadows) on the candles represent highest and lowest price values for the day. Three different Exponential moving average indicators are overlaid on top of the candlesticks, a short one of 20 days EMA(20), medium one of 50 days eMA(50) and a long one of 200 days EMA(200). Also shown here is the Bollinger band, computed for 20 days window BB(20), which indicates the volatility of the stock. On the bottom of this middle panel, a daily trading volume is also displayed using a mountain graph. Bottom panel of the figure shows a MACD indicator MACD(12,26,9), featuring MACD line, Signal line and a MACD Histogram; see, e.g., ChartSchool for more info on this technical indicator.
This figure features all of the elements of the previous one and in addition provides a Volume-by-Price indicator for the time window indicated on the x-axis. Volume-by-Price calculations do not extend beyond the historical data shown on the chart. For more information on this particular indicator consult, e.g., ChartSchool. This figure uses light style instead of the dark.
This figure implements many of the features from the first figure, but instead of the RSI (14) indicator features (in the top panel) a Slow Stochastic Oscillator. Also, in the bottom panel, instead of the MACD indicator this figure features a Percentage Volume Oscillator PVO(12,26,9), which is simmilar to the MACD but works on the volume instead of the price. In addition to the graphical elements from the first figure (which have been already explained), this figure also provides analysis of the simple daily log returns for the stock. This additional analysis is given in the three panels of the right column of the main figure. Top panel of the right column features a Q-Q plot for the test of normality of the simple daily log returns for the stock (in percent). In the middle panel of the right column, a histogram of the daily simple log returns (from the historical data for the time window indicated on the x-axis of the left panels) is given, with indicated VaR (value-at-risk) level in red. The computed daily VaR and CVaR values at the 95% confidence level for the time window indicated at the x-axis of the left panes is displayed as well. In the bottom panel of the right column, a violin plot of the daily simple log returns is provided, which integrates a box plot and a KDE estimation of the distribution. In the box plot, it can be seen a median return value, first and third quartile, along with the whiskers defined from the interquartile range of the distribution.
This figure, in the main panel, features the Ichimoku Cloud, also known as Ichimoku Kinko Hyo, which is a very versatile indicator that defines support and resistance, identifies trend direction, gauges momentum and provides trading signals; see, e.g., ChartSchool for more information. In the candlesticks chart, if the close price is higher then the open price, then the candle is black. On the other hand, if the close price is lower than the open, the candle is red. On the bottom of this middle panel, a daily trading volume is also displayed using a mountain graph. In the top panel of this figure a Bollinger BandWidth is shown, which is a volatility indicator, along with the SMA (200) of the Bollinger BandWidth. In the bottom panel, a Percentage Price Oscillator PPO(12,26,9) is provided, which is very similar to the MACD indicator shown on the previous figures. This figure uses light style instead of the dark.
This figure features a comparative analysis of the cumulative (simple) returns of the stock and the market indicator CROBEX from the Zagreb Stock Exchange (www.zse.hr). The Bollinger Bands, as a volatility measure, are overlaid on top of the stock returns and CROBEX index for comparison. Additional feature of this figure is a Correlation coefficient analysis between the stock returns and the market index, along with the Percentage Price Oscilator PPO(12,26,9).