Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

展期数据函数BUG #18

Open
hackerwei opened this issue May 7, 2019 · 1 comment
Open

展期数据函数BUG #18

hackerwei opened this issue May 7, 2019 · 1 comment

Comments

@hackerwei
Copy link

A = re.sub(r'\D', '', symbol1)
A1 = int(A[:-2]) ##年
A2 = int(A[-2:]) ## 月份
B = re.sub(r'\D', '', symbol2)
B1 = int(B[:-2])
B2 = int(B[-2:])
print(A1, A2, B1, B2)
c = (A1 - B1) * 12 + (A2 - B2)

上述代码,不适用于AP当前情况,会将AP001判断成主力合约

@albertandking
Copy link

Hello, thanks for this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants