backtesting.py-0.3.3版本修复问题列表

id: 02

0.3.3 版本修复问题列表

1. 环境信息

➜ conda list --export
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
backtesting=0.3.3=pypi_0
bokeh=3.6.2=pypi_0
bzip2=1.0.8=h6c40b1e_6
ca-certificates=2024.11.26=hecd8cb5_0
contourpy=1.3.1=pypi_0
expat=2.6.3=h6d0c2b6_0
jinja2=3.1.4=pypi_0
libcxx=14.0.6=h9765a3e_0
libffi=3.4.4=hecd8cb5_1
libmpdec=4.0.0=h46256e1_0
markupsafe=3.0.2=pypi_0
ncurses=6.4=hcec6c5f_0
numpy=2.2.0=pypi_0
openssl=3.0.15=h46256e1_0
packaging=24.2=pypi_0
pandas=2.2.3=pypi_0
pillow=11.0.0=pypi_0
pip=24.2=py312hecd8cb5_0
python=3.12.8=hcd54a6c_0
python-dateutil=2.9.0.post0=pypi_0
pytz=2024.2=pypi_0
pyyaml=6.0.2=pypi_0
readline=8.2=hca72f7f_0
setuptools=75.1.0=py312hecd8cb5_0
six=1.17.0=pypi_0
sqlite=3.45.3=h6c40b1e_0
tk=8.6.14=h4d00af3_0
tornado=6.4.2=pypi_0
tzdata=2024.2=pypi_0
wheel=0.44.0=py312hecd8cb5_0
xyzservices=2024.9.0=pypi_0
xz=5.4.6=h6c40b1e_1
zlib=1.2.13=h4b97444_1

2. 修复问题

  1. backtesting/_plotting.py:250:ValueError: failed to validate DatetimeTickFormatter(id=‘p1046’, …).days: expected a value of type str, got [‘%d %b’, ‘%a %d’] of type list
# /Users/xx/opt/anaconda3/envs/backtesting_test/lib/python3.12/site-packages/backtesting/_plotting.py:250
# formatter=DatetimeTickFormatter(days=['%d %b', '%a %d'],
#                                months=['%m/%Y', "%b'%y"]),
formatter=DatetimeTickFormatter(days='%d %b',
                              months='%b %Y'),
  1. backtesting/_plotting.py:458: FutureWarning: ‘M’ is deprecated and will be removed in a future version, please use ‘ME’ instead.
    .resample(resample_rule, label=‘left’)
# /Users/xxx/opt/anaconda3/envs/backtesting_test/lib/python3.12/site-packages/backtesting/_plotting.py:445
dict(day='ME',  # 修改这里:从 'M' 改为 'ME'
  1. backtesting/test/init.py:8: FutureWarning: The argument ‘infer_datetime_format’ is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.
    return pd.read_csv(join(dirname(file), filename),
# /Users/xxx/opt/anaconda3/envs/backtesting_test/lib/python3.12/site-packages/backtesting/test/__init__.py:8
return pd.read_csv(
    join(dirname(__file__), filename),
    index_col=0,
    parse_dates=True
)

作者: quantgalaxy@outlook.com   
blog: https://blog.youkuaiyun.com/quant_galaxy   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

novowindx

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值