发布

  • 9882 bd7be31ede

    Fixes inability to parse negative strike prices in SecurityIdentifier (#4953)

    frostbyte_neo 发布于 2020-11-30 18:45:36 +00:00 | 2699 次提交 在此版本后已推送到 master

    • Fixes inability to parse negative strike prices in SecurityIdentifier

      • Adds new tests ensuring backwards compat and no throwing w/ negative
        strike prices
    • Changes strategy used to support negative strike prices

      • We add support for negative strike prices at the cost of
        reducing the maximum allowed precision for the strike price.
        We encode a negative sign into the 20th bit of the strike price
        and set our bounds for precision to a max (exclusive) of 475712.
        This in turn is then used to form a negative strike when rebuilding
        the SID.

      • Adds tests covering changes

    • Address review: adds additional tests and refactors code

    • Address self-review: remove unused import in SymbolTests

    • Address review: adds additional test cases for OptionStyle and OptionRight

      • These tests are to ensure that backwards compatibility is maintained
    • Addresses review: Adds option chain <-> master SID hash test

      • Refactors previous tests to reduce on code duplication
    • Reduce test duplication

    Co-authored-by: Martin Molinero martin.molinero1@gmail.com

    下载附件