Current Market Value

This is feature is only available on development version of Tackler

Use case

Current Market Value, or Mark-to-Market (MTM) is used to display commodity and share values with the latest available market price in PriceDB. Typically this is used to display assets as "Market Value Today", with the most up-to-date market price information.

Price Data application policy

last-price
  1. Used Price is based on rates (prices) noted in the pricedb. Possible costs recorded in the transactions are ignored.

  2. Latest price (rate) in the price db is used for the conversion

Configuration

Current Market Value mode is selected either by price.lookup-type = "last-price" in tackler.toml or by CLI --price.lookup-type=last-price option.

Current Market Value and Report commodity settings in tackler.toml
[price]
db-path = "journal/txns/price.db"
lookup-type = "last-price"
...
[Report]
commodity = "EUR"

See tackler --help for all price related CLI options.

Example

This is journal records from the 2024 spring - some lovely ice cream and one Golden Maple Leaf coin

2024-03-01 'Ice cream and maple syrup
  Expenses:Sweets  2.8 CAD
  Assets:Cash

2024-03-01 'The Royal Canadian Mint’s Gold Maple Leaf (GML)
  Assets:Coins 1 GML @ 2780 CAD ; Gold Maple Leaf
  Expenses:Fees 20 CAD
  Assets:Cash -2800 CAD

We would like to know what is the current market value of GML at the moment. To do that, we run report with price lookup with the last available price in pricedb:

tackler \
    --config examples/maple.toml \
    --reports balance \
    --accounts "Assets:Coins" \
    --price.lookup-type last-price \
    --report.commodity CAD

This will produce the following balance report:

Report Time Zone
        TZ name : UTC

Commodity Prices
           Time : 2025-03-12 00:00:00
      Commodity : GML
          Value : 4220 CAD

Balance Report
--------------
              4220.00        4220.00 CAD  Assets:Coins
=========================
              4220.00 CAD

Test data and configuration for this example is located Tackler’s source code examples directory.