python - 函数 DSR 错误 - https://github.com/esvhd/pypbo
问题描述
我正在尝试使用上述程序包计算单个回报系列的收缩锐率。该软件包位于https://github.com/esvhd/pypbo。下面是我的尝试。
import pypbo as pbo
import pypbo.perf as perf
import yfinance as yf
import numpy as np
data = yf.download("SPY ", start="2017-01-01", end="2017-04-30")
data1=data["Close"].pct_change().dropna()
pbox = pbo.dsr(data1,test_sharpe=1.0, sharpe_std=0.5, N=100,T=100, skew=3, kurtosis=1.0)
我收到错误
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-8dc1d936eccd> in <module>
----> 1 pbox = pbo.dsr(data1,test_sharpe=1.0, sharpe_std=0.5, N=100,T=100, skew=3, kurtosis=1.0)
TypeError: dsr() got multiple values for argument 'test_sharpe'
解决方案
推荐阅读
- kotlin - 如何避免 kotlin Exposed 上的 N+1 查询问题。(当通过 DAO 的 Reference.id.value 字段获取值时)
- firebase - 使用像 Socket.io 这样的 Firebase?
- python - from_tensor_slices 返回一个空对象
- java - 无法连接到远程 apache ignite 节点
- ruby-on-rails - 由于 ArgumentError,ruby net-scp 文件夹复制递归失败:未知指令:“0664 13508
- python - 使用测试事件运行 aws lambda 上传文件(python)
- java - kafka-elasticsearch-consumer 单元测试问题
- javascript - p5.js 使用 setInterval、array.push()、for 循环创建动画时出现问题
- php - 如何让 Wordpress 编辑器访问 Google 插件的 Site Kit?
- json - Bash 脚本 / JSON - 从 {"Key":"Duration","Value":"N"} 中提取数值