Definition: Trend-following momentum indicator using two EMAs.
Formula:
How to use
JoinQuant API (single date)
# Get MACD of Ping An Bank on a specific date
from jqlib.technical_analysis import MACD
security = '000001.XSHE'
DIF, DEA, MACD_hist = MACD(
security_list=security,
check_date='2022-09-01',
SHORT=12, LONG=26, MID=9
)
print(DIF, DEA, MACD_hist)
Notes
check_date
(not date
)..XSHE
(SZ), .XSHG
(SH).Definition: Volume-based oscillator measuring how “easily” price moves.
How to use
JoinQuant API (multiple symbols)
from jqlib.technical_analysis import EMV
security_list = ['000001.XSHE', '000002.XSHE', '601211.XSHG']
EMV_val, MAEMV_val = EMV(
security_list=security_list,
check_date='2022-09-01',
N=14, M=9
)
print(EMV_val)
print(MAEMV_val)
Notes
EMV
returns the raw EMV and its moving average (MAEMV).Definition: Momentum oscillator combining 3 timeframes to reduce false signals.
How to use
70 often considered overbought; < 30 oversold
JoinQuant API (single symbol)
from jqlib.technical_analysis import UOS
security = ['000001.XSHE'] # list is accepted
uos_val, mauos_val = UOS(
security_list=security,
check_date='2022-09-01',
N1=7, N2=14, N3=28, M=6
)
print(uos_val)
print(mauos_val)
Notes
YYYY-MM-DD
.date=
instead of check_date=
.’
vs '
).jqlib.technical_analysis
.