SAS Hacker's Hub

Where your Curiosity Leads to Innovation
BookmarkSubscribeRSS Feed
bkooman
SAS Employee

Munehisa Homma was a rice merchant from Sakata, Japan who traded in the Dojima Rice market in Osaka during the Tokugawa Shogunate (18th century). He is sometimes considered to be the father of the candlestick chart, a form of technical analysis used in stock markets. He earned the nickname “the god of the markets” while accumulating a rumored net worth of $100 billion in today’s US currency. 

Homma discovered that the price of rice was not only dictated by supply and demand, but also by the emotions of traders. Greed, fear, anxiety, and excitement can all contribute to market psychology. Market psychology is used to explain market movement that may not be explained by other metrics. 

 

As previously stated, Homma is considered the father of the candlestick chart. A candlestick chart, or Japanese candlestick chart displays price movements over time. A candlestick contains the important information for one trading period (open, high, low, and close values). The trading period can be one day, 15 minutes, one hour, or any trading period as long as each candlestick represents the same time period. The candlestick chart identifies repeating patterns and trends. 

bkooman_0-1663627207212.png

 

SAS Event Stream Processing (ESP) is very powerful when it comes to detecting patterns of interest in real time. However, before any patterns can be detected the ESP model must create groups of values for each trading period (e.g., 60 minutes) and then find the open, high, low, and close values for each group (candlestick). This creates a continuously updating virtual candlestick chart. 

 

ESP then analyses the virtual candlestick chart looking for specific patterns and alerts the user when a known pattern is detected. This allows the user to respond quickly. The patterns used in this project include Engulfing Bearish, Bullish Engulfing, Three Inside Up, and Three Black Crows. Each pattern includes its own forecast for short term price movement of the market. 

 

This project is a great way to learn about creating groups, aggregating values by group, and detecting patterns using ESP. You can download the project from GitHub and execute the project yourself. Be sure to check it out. 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Celebrate the 2024 SAS Hackathon

Watch the 2024 SAS Hackathon Awards Ceremony and experience the excitement all over again!

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 650 views
  • 0 likes
  • 1 in conversation