[Machine Learning for Trading] {ud501} Lesson 7: 01-06 Histograms and scatter plots | Lesson 8: 01-0...

本文深入探讨了股市中股票回报和波动性的分析方法,通过直方图对比不同股票的表现,并介绍了如何利用散点图和夏普比率来评估投资组合的风险与收益。此外,还讨论了2008年金融危机中投资银行在房地产债券评估上的错误假设,强调了正确理解数据分布的重要性。

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 

 

 

转载于:https://www.cnblogs.com/ecoflex/p/10972290.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值