Skip to content

展期数据函数BUG #18

@hackerwei

Description

@hackerwei
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判断成主力合约

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions