liveBook · Manning

Currency

Currency is a system and unit of money used to express monetary value, facilitate exchange, and denominate financial amounts.

How 2 Manning books explain it

Learn Go with Pocket-Sized Projects

A currency is a monetary system whose units and denomination rules determine how amounts are represented and valued.

How it is used
Identifies source and target monetary units and sets valid amount and conversion-output precision.
How deep it goes
Defines a private-field Go value object, implements code parsing and precision cases, and checks amounts; stops short of complete currency-code validation.
Examples
Uses EUR and USD CLI flags, a rejected 19.8875 CAD amount, and parser tests for currencies with different precisions.
What you can do after
Build it from scratch: parse currency codes, reject amounts with excessive precision, and use target precision when converting.

Read how Learn Go with Pocket-Sized Projects explains currency →

Investing for Programmers

A currency is a medium of exchange issued or recognized by a government or monetary authority and used to denominate value.

How it is used
Standardizes mixed-currency holdings so portfolio values, yields, and gains can be summed in one target currency.
How deep it goes
Defines currency briefly and works through exchange mapping, conversion, and aggregation, stopping short of detailed foreign-exchange mechanics.
Examples
Uses Microsoft and BMW shares, exchange mappings, converted price columns, and a USD portfolio worksheet.
What you can do after
Operate/configure a portfolio monitor that converts asset values and aggregates positions in a chosen currency.

Read how Investing for Programmers explains currency →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.