powered by
Print treasury quotes with 1/32nds of points.
quote32(price, sep = "(-|'|:)", warn = TRUE) q32(price, sep = "(-|'|:)", warn = TRUE)
numeric or character. See Details.
character: a regular expression
logical. Warn about rounding errors?
A numeric vector of class quote32.
quote32
The function is meant for pretty-printing of US treasury bond quotes; it provides no other functionality.
If price is numeric, it is interpreted as a quote in decimal notation and ‘translated’ into a price quoted in fractions of a point.
price
numeric
If price is character, it is interpreted as a quote in fractional notation.
character
q32 is a short-hand for quote32.
q32
CME Group (2015). Treasury Futures Price Rounding Conventions. http://www.cmegroup.com/education/treasury-futures-price-rounding-conventions.html
# NOT RUN { quote32(100 + 17/32 + 0.75/32) q32("100-172") q32("100-272") - q32("100-270") as.numeric(q32("100-272") - q32("100-270")) # }
Run the code above in your browser using DataLab