Toàn bộ chỉ báo kỹ thuật
Cập nhật lần cuối:
Thảo luậnMục lục
Khuyên dùng: Nên ưu tiên sử dụng Agent Guide để nạp môi trường cho AI Agent trên máy tính cục bộ. Tránh viết code thủ công hoặc dùng AI phiên bản web/Google Colab vì AI không có thông tin mới nhất về thư viện nên dễ viết sai cú pháp.
Tài liệu này cung cấp danh sách đầy đủ 60 chỉ báo kỹ thuật được tích hợp trong thư viện vnstock_ta, chia thành 5 danh mục chính: Trend, Momentum, Volatility, Volume, và Statistics.
Động cơ tính toán được cung cấp bởi pta_reload cho độ chính xác và hiệu suất cao.
Cách gọi chỉ báo
Tất cả các chỉ báo đều được truy cập thông qua lớp Indicator:
from vnstock_ta import Indicator
# Khởi tạo với DataFrame (yêu cầu các cột: open, high, low, close, volume)
ta = Indicator(data=df)Bạn có thể gọi chỉ báo qua thuộc tính danh mục tương ứng:
ta.trend.[method]()ta.momentum.[method]()ta.volatility.[method]()ta.volume.[method]()ta.statistics.[method]()
Chỉ báo xu hướng - Trend Indicators
sma - Simple Moving Average
Mô tả: Tính toán chỉ báo Simple Moving Average (Đường trung bình động đơn giản).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.sma(length=14)ema - Exponential Moving Average
Mô tả: Tính toán chỉ báo Exponential Moving Average (Đường trung bình động lũy thừa).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.ema(length=14)wma - Weighted Moving Average
Mô tả: Tính toán chỉ báo Weighted Moving Average (Đường trung bình động có trọng số).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.wma(length=10)hma - Hull Moving Average
Mô tả: Tính toán chỉ báo Hull Moving Average (Đường trung bình động Hull).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.hma(length=10)smma - Smoothed Moving Average
Mô tả: Tính toán chỉ báo Smoothed Moving Average (Đường trung bình động làm mượt).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.smma(length=7)alma - Arnaud Legoux Moving Average
Mô tả: Tính toán chỉ báo Arnaud Legoux Moving Average (Đường trung bình động Arnaud Legoux).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.alma(length=10, sigma=6.0, offset=0.85)vwma - Volume-Weighted Moving Average
Mô tả: Tính toán chỉ báo Volume-Weighted Moving Average (Đường trung bình động theo khối lượng).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.vwma(length=20)adx - Average Directional Index
Mô tả: Tính toán chỉ báo Average Directional Index (Chỉ số định hướng trung bình).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.adx(length=14)ichimoku - Ichimoku Cloud
Mô tả: Tính toán hệ thống chỉ báo Ichimoku Cloud.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.ichimoku(tenkan=9, kijun=26, senkou=52)psar - Parabolic SAR
Mô tả: Tính toán chỉ báo Parabolic SAR (Stop and Reverse).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.psar(af0=0.02, af=0.02, max_af=0.2)supertrend - Supertrend
Mô tả: Tính toán chỉ báo Supertrend để xác định xu hướng và các mức trailing stop loss.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.supertrend(length=10, multiplier=3.0)dm - Directional Movement
Mô tả: Tính toán chỉ báo chuyển động định hướng Directional Movement.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.dm(length=14)linreg - Linear Regression
Mô tả: Tính toán chỉ báo Hồi quy tuyến tính Linear Regression.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.linreg(length=14)aroon - Aroon Indicator
Mô tả: Tính toán chỉ báo xu hướng Aroon.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.trend.aroon(length=14)Chỉ báo động lượng - Momentum Indicators
rsi - Relative Strength Index
Mô tả: Tính toán chỉ số sức mạnh tương đối Relative Strength Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.rsi(length=14)stoch - Stochastic Oscillator
Mô tả: Tính toán chỉ báo dao động ngẫu nhiên Stochastic Oscillator.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.stoch(k=14, d=3, smooth_k=3)stochrsi - Stochastic RSI
Mô tả: Tính toán chỉ báo Stochastic RSI.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.stochrsi(length=14, rsi_length=14, k=3, d=3)roc - Rate of Change
Mô tả: Tính toán tỷ lệ thay đổi giá Rate of Change.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.roc(length=9)ao - Awesome Oscillator
Mô tả: Tính toán chỉ báo dao động tuyệt vời Awesome Oscillator.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.ao(fast=5, slow=34)cci - Commodity Channel Index
Mô tả: Tính toán chỉ số kênh hàng hóa Commodity Channel Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.cci(length=14, c=0.015)willr - Williams %R
Mô tả: Tính toán chỉ báo kỹ thuật Williams %R.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.willr(length=14)tsi - True Strength Index
Mô tả: Tính toán chỉ số sức mạnh thực sự True Strength Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.tsi(fast=13, slow=25, signal=13)cmo - Chande Momentum Oscillator
Mô tả: Tính toán chỉ báo dao động động lượng Chande Momentum Oscillator.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.cmo(length=9)uo - Ultimate Oscillator
Mô tả: Tính toán chỉ báo dao động tối thượng Ultimate Oscillator.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.uo(fast=7, medium=14, slow=28)fisher - Fisher Transform
Mô tả: Tính toán chỉ báo Phép biến đổi Fisher.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.fisher(length=9, signal=1)cg - Center of Gravity
Mô tả: Tính toán chỉ báo trọng tâm Center of Gravity.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.cg(length=10)kst - Know Sure Thing
Mô tả: Tính toán chỉ báo động lượng Know Sure Thing.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.kst(roc1=10, roc2=15, roc3=20, roc4=30)macd - Moving Average Convergence Divergence
Mô tả: Tính toán đường trung bình động hội tụ phân kỳ Moving Average Convergence Divergence.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.momentum.macd(fast=12, slow=26, signal=9)Chỉ báo biến động - Volatility Indicators
bbands - Bollinger Bands
Mô tả: Tính toán chỉ báo dải Bollinger Bands.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.bbands(length=14, std=2.0)kc - Keltner Channels
Mô tả: Tính toán chỉ báo kênh Keltner Channels.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.kc(length=20, scalar=2.0)atr - Average True Range
Mô tả: Tính toán khoảng dao động thực tế trung bình Average True Range.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.atr(length=14)stdev - Standard Deviation
Mô tả: Tính toán độ lệch chuẩn Standard Deviation.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.stdev(length=14)donchian - Donchian Channels
Mô tả: Tính toán chỉ báo kênh Donchian Channels.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.donchian(lower_length=20, upper_length=20)massi - Mass Index
Mô tả: Tính toán chỉ số Mass Index để dự đoán đảo chiều.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.massi(fast=9, slow=25)ui - Ulcer Index
Mô tả: Tính toán chỉ số giảm thiểu rủi ro Ulcer Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.ui(length=14)squeeze - Squeeze Momentum
Mô tả: Tính toán chỉ báo bóp nghẹt động lượng Squeeze Momentum (kết hợp Bollinger Bands và Keltner Channels).
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.squeeze(bb_length=20, bb_std=2.0, kc_length=20, kc_scalar=1.5)squeeze_pro - Squeeze Momentum Pro
Mô tả: Tính toán chỉ báo bóp nghẹt động lượng nâng cao Squeeze Momentum Pro.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.squeeze_pro(bb_length=20, bb_std=2.0, kc_length=20)true_range - True Range
Mô tả: Tính toán khoảng dao động thực tế True Range.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volatility.true_range()Chỉ báo khối lượng - Volume Indicators
obv - On-Balance Volume
Mô tả: Tính toán chỉ báo khối lượng cân bằng On-Balance Volume.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.obv()cmf - Chaikin Money Flow
Mô tả: Tính toán chỉ báo dòng tiền Chaikin Money Flow.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.cmf(length=20)ad - Accumulation/Distribution
Mô tả: Tính toán đường tích lũy/phân phối Accumulation/Distribution.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.ad()vp - Volume Profile
Mô tả: Tính toán chỉ báo hồ sơ khối lượng Volume Profile.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.vp(width=10)vwap - Volume Weighted Average Price
Mô tả: Tính toán giá trung bình gia quyền theo khối lượng Volume Weighted Average Price.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.vwap(anchor="D")pvo - Percentage Volume Oscillator
Mô tả: Tính toán chỉ báo dao động phần trăm khối lượng Percentage Volume Oscillator.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.pvo(fast=12, slow=26, signal=9)efi - Force Index
Mô tả: Tính toán chỉ báo lực Force Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.efi(length=13)eom - Ease of Movement
Mô tả: Tính toán chỉ báo di chuyển dễ dàng Ease of Movement.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.eom(length=14, divisor=100000000)nvi - Negative Volume Index
Mô tả: Tính toán chỉ số khối lượng tiêu cực Negative Volume Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.nvi(length=1)mfi - Money Flow Index
Mô tả: Tính toán chỉ số dòng tiền Money Flow Index.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.volume.mfi(length=14)Chỉ báo thống kê và cấu trúc - Statistics Indicators
pivots - Pivot Points
Mô tả: Tính toán các điểm xoay trục Pivot Points.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.pivots(method="traditional")mad - Mean Absolute Deviation
Mô tả: Tính toán độ lệch tuyệt đối trung bình Mean Absolute Deviation.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.mad(length=30)variance - Variance
Mô tả: Tính toán phương sai Variance của chuỗi dữ liệu.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.variance(length=30)hl2 - High-Low Average
Mô tả: Tính toán giá trung bình Cao - Thấp.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.hl2()hlc3 - High-Low-Close Average
Mô tả: Tính toán giá trung bình Cao - Thấp - Đóng cửa.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.hlc3()ohlc4 - Open-High-Low-Close Average
Mô tả: Tính toán giá trung bình Mở - Cao - Thấp - Đóng cửa.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.ohlc4()midprice - Midprice
Mô tả: Tính toán chỉ báo giá trung bình Midprice.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.midprice(length=14)decreasing - Decreasing Series
Mô tả: Xác định chuỗi giá trị giảm dần.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.decreasing(length=1)increasing - Increasing Series
Mô tả: Xác định chuỗi giá trị tăng dần.
Cách gọi:
# Trả về pd.Series hoặc pd.DataFrame
result = ta.statistics.increasing(length=1)
Thảo luận