楼主: zwaterjg
1801 0

[时间序列问题] Stata中非线性平滑方法的各个smoother有什么含义?如果要做股票收益率的平滑,选取什 [推广有奖]

  • 2关注
  • 0粉丝

本科生

81%

还不是VIP/贵宾

-

威望
0
论坛币
79 个
通用积分
1.0001
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
3080 点
帖子
53
精华
0
在线时间
117 小时
注册时间
2015-10-9
最后登录
2021-11-12

50论坛币

这是帮助文件

Title


   [TS] tssmooth nl -- Nonlinear filter



Syntax


       tssmooth nl [type] newvar = exp [if] [in], smoother(smoother[, twice ])[replace]


   where smoother is specified as Sm[Sm[...]] and Sm is one of


       {1|2|3|4|5|6|7|8|9}[R]

       3[R]S[S|R][S|R]...

       E

       H


   The numbers specified in smoother represent the span of a running mediansmoother.  For example, a number 3specifies that each value be replaced by the median of the point and the twoadjacent data values.  The letter Hindicates that a Hanning

   linear smoother, which is a span-3 smoother with binomial weights, beapplied.


   The letters E, S, and R are three refinements that can be combined withthe running median and Hanning smoothers. First, the end points of a smooth can be given special treatment.  This is specified by the E operator.  Second, smoothing by 3, the

   span-3 running median, tends to produce flat-topped hills andvalleys.  The splitting operator, S,"splits" these repeated values, applies the end-point operator tothem, and then "rejoins" the series. Third, it is sometimes useful to repeat an

   odd-span median smoother or the splitting operator until the smooth nolonger changes.  Following a digit or anS with an R specifies this type of repetition.


   Finally, the twice operator specifies that after smoothing, the smootherbe reapplied to the resulting rough, and any recovered signal be added back tothe original smooth.


   Letters may be specified in lowercase, if preferred.  Examples of smoother[, twice] include


       3RSSH    3RSSH,twice    4253H   4253H,twice    43RSR2H,twice

       3rssh    3rssh,twice    4253h   4253h,twice    43rsr2h,twice


   You must tsset your data before using tssmooth nl; see [TS] tsset.

   exp may contain time-series operators; see tsvarlist.



Menu


   Statistics > Time series > Smoothers/univariate forecasters >Nonlinear filter



Description


   tssmooth nl uses nonlinear smoothers to identify the underlying trend ina series.



Options


       +------+

   ----+ Main+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


   smooth(smoother[, twice]) is required; it specifies the nonlinearsmoother to be used.


   replace replaces newvar if it already exists.



Examples


   Setup

       . webuse sales2


   Perform nonlinear smoothing to sales using a median smoother of span 5

       . tssmooth nl nl1=sales, smoother(5)


   Perform nonlinear smoothing to sales by applying span-3 median smoothertwice, then applying the split operator to repeated values twice, and finallyapplying a Hanning smoother

       . tssmooth nl nl2=sales, smoother(3RSSH)


   Same as above, except after smoothing, reapply the smoother to theresulting rough, and add any recovered signal back to the original smooth

       . tssmooth nl nl3=sales, smoother(3RSSH, twice)



Stored results


   tssmooth nl stores the following in r():


   Scalars   

     r(N)           number ofobservations


   Macros   

     r(method)      nl

     r(smoother)    specified smoother

     r(timevar)     time variablespecified in tsset

     r(panelvar)    panel variablespecified in tsset



        3RSSH    3RSSH,twice    4253H    4253H,twice    43RSR2H,twice

        3rssh    3rssh,twice    4253h    4253h,twice    43rsr2h,twice

这几种smoother分别代表什么含义?如果我要做股票收益的平滑应该选择哪种最好?

之前尝试过用hwinters做非季节性平滑,但处理数据的时候发现有些收益率序列根本就不能用hwinters做非季节平滑,那么如果选择非线性的平滑方法,应该怎么做?


关键词:smooth Stata 股票收益率 Other 平滑方法 收益率 represent specified running example
您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-6-17 12:42