STD

定义

public static IEnumerable<StdDevResult> GetStdDev<TQuote>( this IEnumerable<TQuote> quotes, int lookbackPeriods, int? smaPeriods = null) where TQuote : IQuote => quotes

描述

STD(Standard Deviation)标准差 是一个统计指标,用于衡量价格数据的离散程度和波动性。在技术分析中,它常用于衡量市场的波动率。

参数

参数名 类型 描述
lookbackPeriods Int 回顾周期

返回值

返回值 类型 描述
Date DateTime 日期
Mean double 平均值
ZScore double Z值
StdDev double 标准差数值

示例

 ///指标数据
 QuoteHistoryDay(10, (dic) =>
 {
     if (dic.Count > 0)
     {
         foreach (var item in dic.Keys)
         {
             ///获取指标结果
             var resp = dic[item].GetStdDev(14);
             Console.WriteLine(resp.ToJson());
         }
     }

 });