zoukankan      html  css  js  c++  java
  • [Machine Learning for Trading] {ud501} Lesson 7: 01-06 Histograms and scatter plots | Lesson 8: 01-07 Sharpe ratio and other portfolio statistics

    A closer look at daily returns

     Histogram of daily returns

     

    gaussian => kurtosis = 0

     How to plot a histogram

     

     Computing histogram statistics

     

     

     

    Select the option that best describes the relationship between XYZ and SPY.

    Note:

    • These are histograms of daily return values, i.e. X-axis is +/- change (%), and Y-axis is the number of occurrences.
    • We are considering two general properties indicated by the histogram for each stock: return and volatility (or risk).

     Plot two histograms together

     

     Scatterplots

     

    Fitting a line to data points 

     

     Slope does not equal correlation

     

     Correlation vs slope

     Scatterplots in python

     

     

    Real world use of kurtosis


    In early 2000s investment banks built bonds based on mortgages( morgage: 抵押) => assume these mortgages was normally distributed

    => on that basis, they were able to show that these bonds had low probability of fault => 2 mistakes

    => (1) return of each mortagage was independent 

    => (2) using gassian distrubution discribing the return

    (1) and (2) were proved to be wrong => precipitated the great recession of 2008

     






    Daily portfolio values

     Portfolio statistics

     Which portfolio is better?

    1. Both stocks have similar volatility, so ABC is better due greater returns.

    2. Here both stocks have similar returns, but XYZ has lower volatility (risk).

    3. In this case, we actually do not have a clear picture of which stock is better!

     Sharpe ratio =>  matrix return the risk

     

    risk free return => bank interest

     Form of the Sharpe ratio

     

     Computing Sharpe ratio

     

     But wait, there's more!

     

     

    Putting it all together 

     

  • 相关阅读:
    python sys.path.append
    python中的map()函数
    python中的map、filter、reduce函数
    上传文件2.0--drp203
    The import org.apache.commons.fileupload cannot be resolved
    让我会好好学习一阵子的东西
    【JSP】--Error错误页设置,声明式异常--188 drp
    【JSP】--重定向,转发--186 drp
    【JSP】--路径问题--如何去掉../,直接写绝对路径
    主备切换,双机热备,负载均衡,nginx
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10972290.html
Copyright © 2011-2022 走看看