Timestamps and Floating Point Numbers in Financial Systems

Timestamps

Internal vs External Timestamps

  • You (in the US): We a message 9:45am, we didn’t get an acknowledgement, so we resent. But then we got two events later so looks like it was duplicated on your side.
  • Platform support (in Europe): We don’t see anything at that time, sir/madam.
  • You: Erm. Well this is the US, so maybe I’m looking at EST. Try 2:45pm.
  • Platform support: Nope.
  • You: Well, this server looks like it’s in us-west so maybe its the system timestamp. Try 5:45pm?
  • Platform support: Nope.

Internal Timestamps

Floating Numbers

  • Store the currency symbol with the number, and store as a string. This is painful as you have to have a global convention and every program will have to (at least under the covers) translate this.
  • Store the decimal (in float, double, decimal, etc) in one field, store the currency in another field.
  • Field 1=Base Currency (USD). Field 2 = [Other|Target|Far|whatever you like] Currency (CAD).
  • Singular field called currency USDCAD.
  • Settlement currency. For example you may have a USDCAD trade but it is cash settled in EUR.
  • Margin/Collateral/etc currency. If you’re trading a margined product, there may be an additional currency. E.g. you may be a Japanese institution trading USDCAD swaps with the collateral posted in JPY (yen).
  • Reporting currency. Perhaps your institution is based in Switzerland, and when aggregating numbers up across all products they want to see it as CHF.
  • settlement_currency=EUR, settlement_value=123
  • margin_currency=JPY, margin_value=123
  • and so on

Spent career at various financial institutions across continents and across the buy/sell side. Content/thoughts are my own, not my employers’

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Is Money Your Friend? 💰💰💰

Does Socially Responsible Investing Make Financial Sense?

Socially Responsible Investing

Get Organized and Streamline Your Bill Paying Sessions

MyBanker: Edgard Arty

My DRIP Update: 3 months in

There’s Only One Pool of Money

How to Optimize Your 401k for a Stock Market Crash

Liquidity providing in Uniswap v3 (2)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
David Doherty

David Doherty

Spent career at various financial institutions across continents and across the buy/sell side. Content/thoughts are my own, not my employers’

More from Medium

Autochartist by LegacyFX

XII. Response: On Scientific Debates

From Nested to Nomad to Nested: Know When it’s Time to Fly and Time to Chill

Streaming fatigue?

Smartphone displaying Netflix logo