Are there any standards for the precision of stocks prices, amount of stocks etc.?
Are there any standards for the precision of stocks prices, amount of stocks etc.?
Loading saved threads...
me.at.coding · External communityPost link
External question — Quantitative Finance Stack Exchange
Author: me.at.coding
Original post: https://quant.stackexchange.com/questions/60542
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I am currently developing a software that needs to store stock prices and the amount of stocks (sold/purchased) of a given company. Now I am wondering which data types I need to use to store this data. The issue I have with that is that I don't know which numbers (how many decimals) can occur:
Is there any standard on the precision of stock prices, e.g. how many decimals can there be?
I know that there can be fractional shares due to stock splits, dividend reinvestments or just because your broker allows it. Same here: How many decimals can there be at maximum?
Is there any "broker / banking industry" standard on this?
Quote
Report
Pleb · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: Pleb
Original post: https://quant.stackexchange.com/a/60543
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Giving my 2 cents on your questions:
I believe the amount of decimal places is dependent on (the exchange and) the type of financial product. However, an
Investopedia article
writes:
In 2005, the Securities and Exchange Commission introduced Rule 612, also known as the Sub-Penny Rule. Rule 612 requires the minimum price increments for stocks over \$1.00 to be \$0.01 while stocks under \$1.00 can be quoted in increments of \$0.0001.
This rule can also be found
here
. Trying to answer your second question, I don't believe there is any industry standard, since
Fidelity
writes that
Fractional share quantities can be entered out to 3 decimal places (.001 as long as the value of the order is at least $0.01).
But
Robinhood
and
Interactive brokers
allow the purchase of fractional shares as small as 0.000001 and 0.0001, respectively, as long as you satisfy the minimum purchase amount. I don't know if this helps.
Quote
Report
JoshK · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: JoshK
Original post: https://quant.stackexchange.com/a/60548
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
For listed US equities you will need to use a float for quantity and price. Fractional shares will often result from corporate actions (aquisitions, splits, etc).
The sub-penny rule mentioned above is for display purposes. You can't put an order onto a regulated US exchange at anything other than a penny increment. But, you can trade at virtually any price. You will sometimes find that your orders execute at points between two pennies (eg: $17.0025) as you get a price improvement from an executing broker.
NASDAQ will only give you fills with 4 decimal points of precision but it's quite legitimate to have more than that. I don't recall seing more than 6 - but you should always allow room for the unexpected.
Quote
Report
Christo · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: Christo
Original post: https://quant.stackexchange.com/a/68375
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I also believe that there is no industry standard that encompasses all cases you will encounter. I can only share some experience with the issue.
My broker E*Trade is showing me number of shares with up to 5 decimal places and prices per share with up to four (true for both last price and cost per share).
Trades are sometimes reported with prices with three decimal places (even though the prices are above $1).
There is SEC Rule 612 (Minimum Pricing Increment) of Regulation NMS requiring prices for securities below USD 1.00 to be quoted with four decimal places and above USD 1.00 with two decimal places. I do not understand how that reconciles with what my broker does.
These are just rules for national exchanges in the US. There are other exchanges in the US and exchanges in many other countries.
There are cryptocurrencies quoted to 8 decimal places in terms of both price and quantity.
Accounting software and financial software sometimes has to deal with historical prices after stock splits. It often adjusts the historical prices by dividing them by the split factors thus making smaller and smaller past prices that need greater and greater precision for representing their prices if you don't want to lose precision.
Very often a broker allows reinvesting of the dividend, where they add fractional shares to your whole number of shares based on the amount paid and price at the time of converting the cash dividend to shares.
Given all this, it may be hard to predict exactly how and in what context your software will be used, and therefore it seems prudent to use at least 4 or 5 or 6 decimal places for prices.
On the other hand, if you allow too much of a precision, you may end up with smaller and smaller so-called odd lots. For example, when selling all stocks in multiple orders, you may end up having a lot with 0.000000001 shares due to rounding. So you may want to introduce deliberate rounding when a number of shares becomes very small in absolute sense.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Quantitative Finance Stack Exchange Author: Pleb Source score (net votes, not local likes): 5 Original post: https://quant.stackexchange.com/a/60543 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Giving my 2 cents on your questions: I believe the amount of decimal places is dependent on (the exchange and) the type of financial product. However, an Investopedia article writes: In 2005, the Securities and Exchange Commission introduced Rule 612, also known as the Sub-Penny Rule. Rule 612 requires the minimum price increments for stocks over \$1.00 to be \$0.01 while stocks under \$1.00 can be quoted in increments of \$0.0001. This rule can also be found here . Trying to answer your second question, I don't believe there is any industry standard, since Fidelity writes that Fractional share quantities can be entered out to 3 decimal places (.001 as long as the value of the order is at least $0.01). But Robinhood and Interactive brokers allow the purchase of fractional shares as small as 0.000001 and 0.0001, respectively, as long as you satisfy the minimum purchase amount. I don't know if this helps.
Checking account access…