Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/366.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 函数DSR的错误-https://github.com/esvhd/pypbo_Python_Function - Fatal编程技术网

Python 函数DSR的错误-https://github.com/esvhd/pypbo

Python 函数DSR的错误-https://github.com/esvhd/pypbo,python,function,Python,Function,我正试图用上面的数据包计算一个单一收益序列的平减夏普比率。包裹位于。 下面是我的尝试 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.

我正试图用上面的数据包计算一个单一收益序列的平减夏普比率。包裹位于。 下面是我的尝试

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'
---------------------------------------------------------------------------
TypeError回溯(最近一次调用上次)
在里面
---->1 pbox=pbo.dsr(数据1,测试夏普=1.0,夏普标准=0.5,N=100,T=100,偏斜=3,峰度=1.0)
TypeError:dsr()为参数“test_sharpe”获取了多个值