我想计算抛物线SAR指标。我有通常的配方
Prior SAR: The SAR value for the previous period.
Extreme Point (EP): The highest high of the current uptrend.
Acceleration Factor (AF): Starting at .02, AF increases by .02 each time the extreme point
makes a new high. AF can reach a maximum of .20, no matter how long the uptrend extends.
Current Rising SAR = Prior SAR + Prior AF(Prior EP - Prior SAR)
,我打算对Falling SAR
使用类似的公式。我的问题是,我应该如何确定何时从Rising SAR
切换到Falling SAR
?另外,我怎么知道何时必须删除EP
值?我的猜测是,当我“看到上升趋势”时,我必须考虑Rising SAR
,而我的EP
应该是上升趋势开始以来的最大值。但是,如何确定上升趋势?
我计划使用Pandas在Python中执行计算。对我应该注意的任何评论表示赞赏!