Open-High-Low-Close
IT 위키
Open-High-Low-Close (OHLC) refers to the four key price points recorded for a financial instrument during a specific time period. These values are used in technical analysis to assess price movement and market trends.
Components[편집 | 원본 편집]
An OHLC data point consists of:
- Open (O) – The price at which the asset starts trading in a given time period.
- High (H) – The highest price reached during the time period.
- Low (L) – The lowest price reached during the time period.
- Close (C) – The price at which the asset finishes trading at the end of the time period.
Representation[편집 | 원본 편집]
OHLC data is commonly visualized using:
- OHLC Bars – A vertical line representing the high and low prices, with horizontal ticks indicating the open (left) and close (right).
- Candlestick Charts – A graphical representation where the body shows the range between open and close, and wicks (shadows) show the high and low.
Example Data[편집 | 원본 편집]
Date | Open | High | Low | Close |
---|---|---|---|---|
2024-06-01 | 100.5 | 105.0 | 98.7 | 103.2 |
2024-06-02 | 103.2 | 106.5 | 101.4 | 105.8 |
2024-06-03 | 105.8 | 107.2 | 103.9 | 104.5 |
Example Implementation[편집 | 원본 편집]
A simple way to plot OHLC data using Python:
import pandas as pd
import matplotlib.pyplot as plt
import mplfinance as mpf
# Sample OHLC data
data = pd.DataFrame({
"Open": [100.5, 103.2, 105.8],
"High": [105.0, 106.5, 107.2],
"Low": [98.7, 101.4, 103.9],
"Close": [103.2, 105.8, 104.5]
}, index=pd.to_datetime(["2024-06-01", "2024-06-02", "2024-06-03"]))
# Plot OHLC chart
mpf.plot(data, type='ohlc', style='charles', title="OHLC Chart")
plt.show()
Applications[편집 | 원본 편집]
- **Technical Analysis** – Used in candlestick patterns and trend analysis.
- **Algorithmic Trading** – Provides structured data for automated trading models.
- **Risk Management** – Helps assess volatility and price behavior.