|
发表于 2017-7-15 10:07 PM
|
显示全部楼层
本帖最后由 盈透阿狗 于 2017-7-15 10:12 PM 编辑
littletiger 发表于 2017-7-14 03:32 PM
thank you for live update of momentum index. Can you please give us some background how do you defin ...
MACD and RSI are two principal momentum oscillators.
MACD is a trend-following momentum indicator that shows the relationship between two moving averages of prices.
MACD = fastEMA - slowEMA
where fast and slow exponential moving average (EMA) are calculated:
EMA_n = closePrice * f + (1-f) * EMA_{n-1}
with f = 2./(N+1.), N is number of equal interval where moving average is calculated.
Signal curve is a EMA of MACD.
What I plotted is so called histogram = MACD - signal.
Buy condition is histogram change sign from negative to positive, and
sell condition is when histogram change sign from positive to negative.
RSI is also a popular momentum oscillator.
The RSI compares the magnitude of a stock's recent gains to the magnitude of its recent losses and turns that information into a number that ranges from 0 to 100.
Over-sold and over-bought and are defined, they are corresponding to BUY and SELL actions.
RS = averageGain/averageLoss,
and
RSI = 100 - 100/(1+RS).
How low should consider as "Over-sold" and how high should consider as over-bought depends on period.
A long period makes RSI smoother, which raises over-sold level and drops over-bought level. I don't like RSI in my trading model. I just use it as an indicator roughly estimate the market.
|
|