首页 > 解决方案 > 函数 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'

标签: pythonfunction

解决方案


推荐阅读