一只股票每日预期收益为0.1%,每日波动率为0.5%,求100日后的预期综合收益。

changes=pd.DataFrame(np.random.normal(loc=0.1,scale=0.25,size=(100,10)))
#10条数据,每条100行,均值为0.1,标准差0.25
print(changes.head())
returns=changes.cumsum(0)
print(returns.head())
returns.plot()
plt.show()

模拟出的随机股票收益率

模拟股票预期收益案例源代码

随机股票收益率之和

模拟股票预期收益案例源代码

随机股票模拟收益率之和的可视化图片

模拟股票预期收益案例源代码


 
                    
            
                

相关文章:

  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2023-03-14
  • 2021-09-27
  • 2021-04-16
猜你喜欢
  • 2021-07-26
  • 2022-02-17
  • 2021-07-18
  • 2021-08-13
  • 2021-05-07
  • 2021-12-04
  • 2021-05-06
相关资源
相似解决方案