Open
Conversation
…o refraction-ray-master
| @@ -0,0 +1,46 @@ | |||
| import logging | |||
| df = df.reset_index(drop=True) | ||
| df = df[df["date"] <= yesterdayobj()] | ||
| #df = df[df["date"] <= yesterdayobj()] | ||
| df = df[df["date"] <= today_obj()] |
Owner
There was a problem hiding this comment.
info 文件里的改动我建议在 PR 里去掉,因为为了开发方便,依赖于”数据只更新到昨天”逻辑的地方非常多,不确定只单独将这一个地方改到可以更新当日数据会不会出其他潜在 issue
| lastrow = tmpprice.iloc[iid] | ||
| newhigh = tmpprice.loc[tmpprice.loc[:,'drawdown']>=-0.0001,:] | ||
| beginrow = newhigh.loc[newhigh['date']<=lastrow['date'],:].iloc[-1] | ||
| return beginrow['date'],lastrow['date'],lastrow['drawdown'] |
Owner
There was a problem hiding this comment.
这个计算的是单日回撤而不是一个时间段的最大回撤?drawdown 列的定义是 L222,计算的是相较前一日的回撤百分比或0(当日新高)。那返回的某一列的 drawdown 值似乎对应了单日回撤?
| code=code, tomorrow=int(tomorrow_ts() * 1000), count=count, type_=type_ | ||
| ), | ||
| cookies={"xq_a_token": get_token()}, | ||
| cookies={"xq_a_token": get_token()[0],"u":get_token()[1]}, |
Owner
There was a problem hiding this comment.
该文件中还涉及雪球实时数据和 bar 数据函数的爬取,是否也应该更新 cookies 添加 “u”
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改了max_drawdown算法,加快计算速度。
修改了雪球API接口参数