当前位置: 首页>>代码示例>>Python>>正文


Python Analyzer.scatter_daily_return方法代码示例

本文整理汇总了Python中analyzer.Analyzer.scatter_daily_return方法的典型用法代码示例。如果您正苦于以下问题:Python Analyzer.scatter_daily_return方法的具体用法?Python Analyzer.scatter_daily_return怎么用?Python Analyzer.scatter_daily_return使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在analyzer.Analyzer的用法示例。


在下文中一共展示了Analyzer.scatter_daily_return方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_report

# 需要导入模块: from analyzer import Analyzer [as 别名]
# 或者: from analyzer.Analyzer import scatter_daily_return [as 别名]
def get_report(symbols, start, end):
    header('Technical Report for Individual Stocks', 1)
    # initialize the analyzer
    # examine the performance since past one year from today
    analyzer = Analyzer(symbols, start, end)
    index = analyzer.index
    analyzer.plot_normalized()

    print 'The historical prices compared with HSI index. \n' \
          'All stock prices are normalized to 1 at the beginning of the time for easier comparison.\n'

    for symbol in symbols[1:]:
        header('{}'.format(symbol), 3)
        # 20-day moving average
        analyzer.show_bollinger(symbol, 20)
        print 'The Bollinger Bands for both stocks with 20-day moving average and 1 standard deviation.\n'

        analyzer.hist_daily_return(symbol)
        print 'Daily returns throughout the year plotted as histograms.\n'\
              'White dashed line denotes the mean and the red ones are standard deviations.\n'

        analyzer.hist_compare_return(index, symbol)
        print 'Daily returns of each stock against which of the HSI index.\n'

        analyzer.scatter_daily_return(symbol)
        print 'Beta, alpha and correlation of each stock.\n'
开发者ID:fandi-peng,项目名称:T,代码行数:28,代码来源:technical_report.py


注:本文中的analyzer.Analyzer.scatter_daily_return方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。