PINE LIBRARY

MathFinancialAbsoluteRiskMeasures

Library "MathFinancialAbsoluteRiskMeasures"
Financial Absolute Risk Measures.

gain_stdev(sample) Standard deviation of gains in a data sample.
Parameters:
  • sample: float array, data sample.

Returns: float.

loss_stdev(sample) Standard deviation of losses in a data sample.
Parameters:
  • sample: float array, data sample.

Returns: float.

downside_stdev(sample, minimal_acceptable_return) Downside standard deviation in a data sample.
Parameters:
  • sample: float array, data sample.
  • minimal_acceptable_return: float, minimum gain value.

Returns: float.

semi_stdev(sample) Standard deviation of less than average returns in a data sample.
Parameters:
  • sample: float array, data sample.

Returns: float.

gain_loss_ratio(sample) ratio of average gains of average losses in a data sample.
Parameters:
  • sample: float array, data sample.

Returns: float.

compound_risk_score(source, length) Compound Risk Score
Parameters:
  • source: float, input data, default=close.
  • length: int, period of observation, default=12)

Returns: float.
financialsMATHstatistics

Pine脚本库

本着真正的TradingView精神,作者将此Pine代码发布为开源脚本库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私下或在其它开源出版物中使用此脚本库,但在出版物中重复使用此代码受网站规则约束。

免责声明