Code Monkey home page Code Monkey logo

Comments (8)

penberg avatar penberg commented on August 15, 2024

@jvirtanen IIRC, the NYSE OpenBook format supports configurable fractional part. Perhaps worth taking a look?

from parity.

jvirtanen avatar jvirtanen commented on August 15, 2024

@penberg Thanks! I'll have a look at that.

from parity.

jvirtanen avatar jvirtanen commented on August 15, 2024

As a first step, the TAQ file format gets configurable fractional part for both prices and sizes in #74.

from parity.

jvirtanen avatar jvirtanen commented on August 15, 2024

Genesis needs configurable fractional part for both prices and sizes.

Here is my current road map for implementing this feature:

  • The trading system will operate on the minimum price and size increment.

  • The network protocols will operate on the minimum price and size increment.

  • The FIX gateway, terminal client, stock ticker, and trade reporter will get new configuration settings to specify the fractional part for both prices and sizes:

    instruments {
      AAPL {
        price-fraction-digits = 2
        size-fraction-digits  = 0
      }
      ETH-BTC {
        price-fraction-digits = 8
        size-fraction-digits  = 8
      }
    }
    
  • The terminal client, stock ticker, and trade reporter will get new configuration settings to specify the integer part for both prices and sizes for pretty printing:

    price-integer-digits = 8
    size-integer-digits  = 8
    
  • The network protocols will start using 64-bit unsigned integers for price and size.

from parity.

jheusser avatar jheusser commented on August 15, 2024

Not sure this entirely belongs here, but worth considering how to represent null or max/min prices. For example in SBE you can define null values as part of a composite type such as

<composite name="PRICENULL" description="Price NULL">
  <type name="mantissa" description="mantissa" presence="optional" nullValue="9223372036854775807" primitiveType="int64"/>
  <type name="exponent" description="exponent" presence="constant" primitiveType="int8">-7</type>
</composite>

This is e.g. useful when an orderbook gets cleared end of day, or on startup an orderbook is only partially populated but still distributes the data. Like that a consumer can distinguish valid from invalid prices.

from parity.

jvirtanen avatar jvirtanen commented on August 15, 2024

@jheusser That's a good point. Currently there's no concept of a null price, and tools, such as the stock ticker, rely on zero quantity to indicate missing data.

from parity.

jvirtanen avatar jvirtanen commented on August 15, 2024

See #91.

from parity.

jvirtanen avatar jvirtanen commented on August 15, 2024

Closed by #91.

from parity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.