Candlesticks | OHLC Data | Python for Beginners | Quantra Free Course

Опубликовано: 11 Июнь 2026
на канале: Quantra
2,097
38

A quant fund manager + A HFT prop desk founder + A quant teacher = a session worth watching
On 9 April, we hosted Kelvin Foo, Dr Gaurav Raizada, and Vivek Krishnamoorthy for a workshop on Algorithmic Trading & Options Risk Management.
Watch the recording:
www.quantinsti.com/articles/algorithmic-trading-python-ai-options-risk-management-webinar/
.
. A quant fund manager + A HFT prop desk founder + A quant teacher = a session worth watching
On 9 April, we hosted Kelvin Foo, Dr Gaurav Raizada, and Vivek Krishnamoorthy for a workshop on Algorithmic Trading & Options Risk Management.
Watch the recording:
www.quantinsti.com/articles/algorithmic-trading-python-ai-options-risk-management-webinar/
.
. This video is from a free course on https://quantra.quantinsti.com/course...

In the previous few units, we have learnt how to plot 2D and 3D time series data. We have also discussed various trends and patterns in technical analysis.
In this unit, we will talk about candlesticks. It is imperative that we mention Candlesticks in the section on Data Visualization, as candlesticks are arguably the most beautiful and widely used representation of OHLC data.

Candlesticks have been in use since the 17th century, by Japanese traders to trade rice. A typical candlestick gives us information about 4 things - The opening & closing prices of a day and the day’s High and Low. This area between the Opening Price and Closing Price is called the ‘body’. The Day’s Highs and Lows are represented by a ‘tail or a wick’.
If the opening price is less than the closing price, then the day is represented by a green candlestick. On the other hand if the opening price is greater than the closing price, then the day is represented by a red candlestick.
When both these prices are equal, then a Doji is created which offers trading opportunities to speculators. When we plot a candlestick chart for many days, the stock’s price is on the y axis and the time or period is on the ‘x’ axis. This is how a typical candlestick chart looks like. Analysts try to predict market trends using candlestick patterns.

For instance, this pattern in a candlestick chart is called the ‘Hanging Man’. Hanging man is a bearish candlestick pattern which forms at the end of an uptrend. It is a green candlestick, which indicates there is a significant sell-off in that stock for the particular day, but the buyers are just able to push this stock back up, so that it closes near or just above the opening price.
However, this indicates that the bulls are facing stiff resistance, so the stock price may fall in the near future. Hanging man indicates a trend reversal in an uptrend.
Here you can have a look at a few patterns in our candlestick chart. However, just like any other technical analysis, candlestick pattern prediction is subjective and not full-proof. Have a look at this, where the markets have risen even after the appearance of a hanging man.

Further, we will even learn how to plot this candlestick pattern using Python in the upcoming IPython Notebook. We will use the ‘candlestick_ohlc’ module from ‘matplotlib.finance’ package to plot the candlesticks. Further, just to make things more interesting, we will use the ‘bokeh’ library in Python to plot an interactive graph. An interactive plot is one, where we can adjust the view of the graph, according to our wish.
You can pan, box zoom, wheel zoom, reset and save the screenshot of the graph. This is done by using the ‘figure’ module from ‘bokeh.plotting’ package. More of this, in the upcoming IPython notebook. But, before we move on to another unit, there is just one question that needs to be answered, why are the candlesticks plots important to understand?
Until now, we have understood how to plot line graphs. One major drawback of line graphs is that there is a loss of information when you plot them i.e if you plot only the closing price against time as the intraday volatility given by the high low parameters would have been lost. But in candlestick there is absolutely no loss in information, since the entire OHLC time series information is plotted in the graph. We will end this video lecture here.
So, stay tuned and keep Learning!

Quantra is an online education portal that specializes in Algorithmic and Quantitative trading. Quantra offers various bite-sized, self-paced and interactive courses that are perfect for busy professionals, seeking implementable knowledge in this domain.

Find more info on - https://quantra.quantinsti.com/
Like us on Facebook:   / goquantra  
Follow us on Twitter:   / goquantra