diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,19 @@
 User-visible changes in the hledger command line tool and library.
 
 
+# 1.18.1 2020-06-21
+
+- journal: document recursive wildcards
+
+- by default, value reports work as in 1.17; to infer market prices from
+  transactions, add the new --infer-value flag. (#1239, #1253)
+
+- organise debug output better
+
+- print: amounts in csv output now have commodity symbol, digit group
+  separators and prices removed (Dmitry Astapov)
+
+
 # 1.18 2020-06-07
 
 ## General
@@ -18,9 +31,10 @@
 
 - We now show `..` instead of `-` to indicate date ranges, eg in
   report titles, to stand out more from hyphenated dates. 
+  (Stephen Morgan)
   
 - Period expressions (eg in -p, date:, and periodic rules) now accept
-  `to`, `until`, `-`, or `..` as synonyms.
+  `to`, `until`, `-`, or `..` as synonyms. (Stephen Morgan)
 
 - When parsing amounts, whitespace between sign and number is now allowed.
 
@@ -153,12 +167,12 @@
 
       hledger ui 'amt:>200'
 
-  failed. This was becasue the process of dispatching from `hledger ui`
+  failed. This was because the process of dispatching from `hledger ui`
   to `hledger-ui` (note addition of `-`) lost the quotes around
   `amt:>20` and the `>` character was interpreted as a shell redirection
   operator, rather than as part of the argument.
 
-  The machinery for quoting or escaping arguements which contain
+  The machinery for quoting or escaping arguments which contain
   characters which require quoting or escaping (thus far whitespace and
   quotes) already existed. This solution simply adds shell stdio
   redirection characters to this set.
diff --git a/Hledger/Cli/CliOptions.hs b/Hledger/Cli/CliOptions.hs
--- a/Hledger/Cli/CliOptions.hs
+++ b/Hledger/Cli/CliOptions.hs
@@ -155,7 +155,7 @@
 
   -- valuation
  ,flagNone ["B","cost"]      (setboolopt "B")
-   "show amounts converted to their cost, using the transaction price. Equivalent to --value=cost."
+   "show amounts converted to their cost/selling amount, using the transaction price. Equivalent to --value=cost."
  ,flagNone ["V","market"]    (setboolopt "V")
    (unwords
      ["show amounts converted to current market value (single period reports)"
@@ -178,6 +178,7 @@
      ,"- current market value, in default valuation commodity or COMM"
      ,"- market value on the given date, in default valuation commodity or COMM"
      ])
+ ,flagNone ["infer-value"]   (setboolopt "infer-value") "with -V/-X/--value, also infer market prices from transactions"
 
   -- generated postings/transactions
  ,flagNone ["auto"]          (setboolopt "auto") "apply automated posting rules to modify transactions"
diff --git a/Hledger/Cli/Commands/Print.hs b/Hledger/Cli/Commands/Print.hs
--- a/Hledger/Cli/Commands/Print.hs
+++ b/Hledger/Cli/Commands/Print.hs
@@ -148,7 +148,9 @@
 postingToCSV :: Posting -> CSV
 postingToCSV p =
   map (\(a@(Amount {aquantity=q,acommodity=c})) ->
-    let a_ = a{acommodity=""} in
+    -- commodity goes into separate column, so we suppress it, along with digit group
+    -- separators and prices
+    let a_ = a{acommodity="",astyle=(astyle a){asdigitgroups=Nothing},aprice=Nothing} in
     let amount = showAmount a_ in
     let commodity = T.unpack c in
     let credit = if q < 0 then showAmount $ negate a_ else "" in
diff --git a/Hledger/Cli/CompoundBalanceCommand.hs b/Hledger/Cli/CompoundBalanceCommand.hs
--- a/Hledger/Cli/CompoundBalanceCommand.hs
+++ b/Hledger/Cli/CompoundBalanceCommand.hs
@@ -146,7 +146,7 @@
 
       -- make a CompoundBalanceReport.
       -- For efficiency, generate a price oracle here and reuse it with each subreport.
-      priceoracle = journalPriceOracle j
+      priceoracle = journalPriceOracle infer_value_ j
       subreports =
         map (\CBCSubreportSpec{..} ->
                 (cbcsubreporttitle
@@ -270,7 +270,7 @@
        | otherwise = PeriodicReport dates rows' totals
           where
             nonzeroaccounts =
-              dbg1 "nonzeroaccounts" $
+              dbg5 "nonzeroaccounts" $
               mapMaybe (\(PeriodicReportRow act _ amts _ _) ->
                             if not (all mixedAmountLooksZero amts) then Just act else Nothing) rows
             rows' = filter (not . emptyRow) rows
diff --git a/Hledger/Cli/Main.hs b/Hledger/Cli/Main.hs
--- a/Hledger/Cli/Main.hs
+++ b/Hledger/Cli/Main.hs
@@ -115,7 +115,7 @@
     (argsbeforecmd, argsaftercmd') = break (==rawcmd) args
     argsaftercmd         = drop 1 argsaftercmd'
     dbgIO :: Show a => String -> a -> IO ()
-    dbgIO = ptraceAtIO 2
+    dbgIO = ptraceAtIO 6
 
   dbgIO "running" prognameandversion
   dbgIO "raw args" args
diff --git a/embeddedfiles/hledger-ui.1 b/embeddedfiles/hledger-ui.1
--- a/embeddedfiles/hledger-ui.1
+++ b/embeddedfiles/hledger-ui.1
@@ -1,5 +1,5 @@
 
-.TH "hledger-ui" "1" "June 2020" "hledger-ui 1.18" "hledger User Manuals"
+.TH "hledger-ui" "1" "June 2020" "hledger-ui 1.18.1" "hledger User Manuals"
 
 
 
@@ -139,12 +139,19 @@
 hledger-ui/hledger-web)
 .TP
 \f[B]\f[CB]-B --cost\f[B]\f[R]
-convert amounts to their cost at transaction time (using the transaction
-price, if any)
+convert amounts to their cost/selling amount at transaction time
 .TP
-\f[B]\f[CB]-V --value\f[B]\f[R]
-convert amounts to their market value on the report end date (using the
-most recent applicable market price, if any)
+\f[B]\f[CB]-V --market\f[B]\f[R]
+convert amounts to their market value in default valuation commodities
+.TP
+\f[B]\f[CB]-X --exchange=COMM\f[B]\f[R]
+convert amounts to their market value in commodity COMM
+.TP
+\f[B]\f[CB]--value\f[B]\f[R]
+convert amounts to cost or market value, more flexibly than -B/-V/-X
+.TP
+\f[B]\f[CB]--infer-value\f[B]\f[R]
+with -V/-X/--value, also infer market prices from transactions
 .TP
 \f[B]\f[CB]--auto\f[B]\f[R]
 apply automated posting rules to modify transactions.
diff --git a/embeddedfiles/hledger-ui.info b/embeddedfiles/hledger-ui.info
--- a/embeddedfiles/hledger-ui.info
+++ b/embeddedfiles/hledger-ui.info
@@ -3,8 +3,8 @@
 
 File: hledger-ui.info,  Node: Top,  Next: OPTIONS,  Up: (dir)
 
-hledger-ui(1) hledger-ui 1.18
-*****************************
+hledger-ui(1) hledger-ui 1.18.1
+*******************************
 
 hledger-ui - terminal interface for the hledger accounting tool
 
@@ -152,12 +152,21 @@
      hledger-ui/hledger-web)
 '-B --cost'
 
-     convert amounts to their cost at transaction time (using the
-     transaction price, if any)
-'-V --value'
+     convert amounts to their cost/selling amount at transaction time
+'-V --market'
 
-     convert amounts to their market value on the report end date (using
-     the most recent applicable market price, if any)
+     convert amounts to their market value in default valuation
+     commodities
+'-X --exchange=COMM'
+
+     convert amounts to their market value in commodity COMM
+'--value'
+
+     convert amounts to cost or market value, more flexibly than
+     -B/-V/-X
+'--infer-value'
+
+     with -V/-X/-value, also infer market prices from transactions
 '--auto'
 
      apply automated posting rules to modify transactions.
@@ -499,26 +508,26 @@
 
 Tag Table:
 Node: Top71
-Node: OPTIONS1470
-Ref: #options1567
-Node: KEYS4998
-Ref: #keys5093
-Node: SCREENS9369
-Ref: #screens9474
-Node: Accounts screen9564
-Ref: #accounts-screen9692
-Node: Register screen11908
-Ref: #register-screen12063
-Node: Transaction screen14060
-Ref: #transaction-screen14218
-Node: Error screen15088
-Ref: #error-screen15210
-Node: ENVIRONMENT15454
-Ref: #environment15568
-Node: FILES16375
-Ref: #files16474
-Node: BUGS16687
-Ref: #bugs16764
+Node: OPTIONS1474
+Ref: #options1571
+Node: KEYS5186
+Ref: #keys5281
+Node: SCREENS9557
+Ref: #screens9662
+Node: Accounts screen9752
+Ref: #accounts-screen9880
+Node: Register screen12096
+Ref: #register-screen12251
+Node: Transaction screen14248
+Ref: #transaction-screen14406
+Node: Error screen15276
+Ref: #error-screen15398
+Node: ENVIRONMENT15642
+Ref: #environment15756
+Node: FILES16563
+Ref: #files16662
+Node: BUGS16875
+Ref: #bugs16952
 
 End Tag Table
 
diff --git a/embeddedfiles/hledger-ui.txt b/embeddedfiles/hledger-ui.txt
--- a/embeddedfiles/hledger-ui.txt
+++ b/embeddedfiles/hledger-ui.txt
@@ -135,13 +135,22 @@
               hledger-ui/hledger-web)
 
        -B --cost
-              convert amounts to their cost at  transaction  time  (using  the
-              transaction price, if any)
+              convert amounts to their cost/selling amount at transaction time
 
-       -V --value
-              convert  amounts  to  their  market value on the report end date
-              (using the most recent applicable market price, if any)
+       -V --market
+              convert amounts to their market value in default valuation  com-
+              modities
 
+       -X --exchange=COMM
+              convert amounts to their market value in commodity COMM
+
+       --value
+              convert  amounts  to  cost  or  market value, more flexibly than
+              -B/-V/-X
+
+       --infer-value
+              with -V/-X/--value, also infer market prices from transactions
+
        --auto apply automated posting rules to modify transactions.
 
        --forecast
@@ -441,4 +450,4 @@
 
 
 
-hledger-ui 1.18                    June 2020                     hledger-ui(1)
+hledger-ui 1.18.1                  June 2020                     hledger-ui(1)
diff --git a/embeddedfiles/hledger-web.1 b/embeddedfiles/hledger-web.1
--- a/embeddedfiles/hledger-web.1
+++ b/embeddedfiles/hledger-web.1
@@ -1,5 +1,5 @@
 
-.TH "hledger-web" "1" "June 2020" "hledger-web 1.18" "hledger User Manuals"
+.TH "hledger-web" "1" "June 2020" "hledger-web 1.18.1" "hledger User Manuals"
 
 
 
@@ -165,13 +165,20 @@
 hledger-ui/hledger-web)
 .TP
 \f[B]\f[CB]-B --cost\f[B]\f[R]
-convert amounts to their cost at transaction time (using the transaction
-price, if any)
+convert amounts to their cost/selling amount at transaction time
 .TP
-\f[B]\f[CB]-V --value\f[B]\f[R]
-convert amounts to their market value on the report end date (using the
-most recent applicable market price, if any)
+\f[B]\f[CB]-V --market\f[B]\f[R]
+convert amounts to their market value in default valuation commodities
 .TP
+\f[B]\f[CB]-X --exchange=COMM\f[B]\f[R]
+convert amounts to their market value in commodity COMM
+.TP
+\f[B]\f[CB]--value\f[B]\f[R]
+convert amounts to cost or market value, more flexibly than -B/-V/-X
+.TP
+\f[B]\f[CB]--infer-value\f[B]\f[R]
+with -V/-X/--value, also infer market prices from transactions
+.TP
 \f[B]\f[CB]--auto\f[B]\f[R]
 apply automated posting rules to modify transactions.
 .TP
@@ -225,7 +232,7 @@
 behind a reverse proxy that handles authentication for different users.
 The path can be derived in a predictable way, eg by using the username
 within the path.
-As an example, \f[C]nginx\f[R] as reverse proxy can use the variabel
+As an example, \f[C]nginx\f[R] as reverse proxy can use the variable
 \f[C]$remote_user\f[R] to derive a path from the username used in a HTTP
 basic authentication.
 The following \f[C]proxy_pass\f[R] directive allows access to all
diff --git a/embeddedfiles/hledger-web.info b/embeddedfiles/hledger-web.info
--- a/embeddedfiles/hledger-web.info
+++ b/embeddedfiles/hledger-web.info
@@ -3,8 +3,8 @@
 
 File: hledger-web.info,  Node: Top,  Next: OPTIONS,  Up: (dir)
 
-hledger-web(1) hledger-web 1.18
-*******************************
+hledger-web(1) hledger-web 1.18.1
+*********************************
 
 hledger-web - web interface for the hledger accounting tool
 
@@ -176,12 +176,21 @@
      hledger-ui/hledger-web)
 '-B --cost'
 
-     convert amounts to their cost at transaction time (using the
-     transaction price, if any)
-'-V --value'
+     convert amounts to their cost/selling amount at transaction time
+'-V --market'
 
-     convert amounts to their market value on the report end date (using
-     the most recent applicable market price, if any)
+     convert amounts to their market value in default valuation
+     commodities
+'-X --exchange=COMM'
+
+     convert amounts to their market value in commodity COMM
+'--value'
+
+     convert amounts to cost or market value, more flexibly than
+     -B/-V/-X
+'--infer-value'
+
+     with -V/-X/-value, also infer market prices from transactions
 '--auto'
 
      apply automated posting rules to modify transactions.
@@ -234,7 +243,7 @@
 hledger-web instances behind a reverse proxy that handles authentication
 for different users.  The path can be derived in a predictable way, eg
 by using the username within the path.  As an example, 'nginx' as
-reverse proxy can use the variabel '$remote_user' to derive a path from
+reverse proxy can use the variable '$remote_user' to derive a path from
 the username used in a HTTP basic authentication.  The following
 'proxy_pass' directive allows access to all 'hledger-web' instances that
 created a socket in '/tmp/hledger/':
@@ -564,22 +573,22 @@
 
 Tag Table:
 Node: Top72
-Node: OPTIONS1746
-Ref: #options1851
-Node: PERMISSIONS8195
-Ref: #permissions8334
-Node: EDITING UPLOADING DOWNLOADING9546
-Ref: #editing-uploading-downloading9727
-Node: RELOADING10561
-Ref: #reloading10695
-Node: JSON API11128
-Ref: #json-api11242
-Node: ENVIRONMENT16723
-Ref: #environment16839
-Node: FILES17572
-Ref: #files17672
-Node: BUGS17885
-Ref: #bugs17963
+Node: OPTIONS1750
+Ref: #options1855
+Node: PERMISSIONS8383
+Ref: #permissions8522
+Node: EDITING UPLOADING DOWNLOADING9734
+Ref: #editing-uploading-downloading9915
+Node: RELOADING10749
+Ref: #reloading10883
+Node: JSON API11316
+Ref: #json-api11430
+Node: ENVIRONMENT16911
+Ref: #environment17027
+Node: FILES17760
+Ref: #files17860
+Node: BUGS18073
+Ref: #bugs18151
 
 End Tag Table
 
diff --git a/embeddedfiles/hledger-web.txt b/embeddedfiles/hledger-web.txt
--- a/embeddedfiles/hledger-web.txt
+++ b/embeddedfiles/hledger-web.txt
@@ -156,13 +156,22 @@
               hledger-ui/hledger-web)
 
        -B --cost
-              convert amounts to their cost at  transaction  time  (using  the
-              transaction price, if any)
+              convert amounts to their cost/selling amount at transaction time
 
-       -V --value
-              convert  amounts  to  their  market value on the report end date
-              (using the most recent applicable market price, if any)
+       -V --market
+              convert amounts to their market value in default valuation  com-
+              modities
 
+       -X --exchange=COMM
+              convert amounts to their market value in commodity COMM
+
+       --value
+              convert  amounts  to  cost  or  market value, more flexibly than
+              -B/-V/-X
+
+       --infer-value
+              with -V/-X/--value, also infer market prices from transactions
+
        --auto apply automated posting rules to modify transactions.
 
        --forecast
@@ -212,7 +221,7 @@
        hledger-web instances behind a reverse proxy that  handles  authentica-
        tion  for  different  users.   The path can be derived in a predictable
        way, eg by using the username within the path.  As an example, nginx as
-       reverse  proxy  can use the variabel $remote_user to derive a path from
+       reverse  proxy  can use the variable $remote_user to derive a path from
        the username used  in  a  HTTP  basic  authentication.   The  following
        proxy_pass  directive  allows  access to all hledger-web instances that
        created a socket in /tmp/hledger/:
@@ -529,4 +538,4 @@
 
 
 
-hledger-web 1.18                   June 2020                    hledger-web(1)
+hledger-web 1.18.1                 June 2020                    hledger-web(1)
diff --git a/embeddedfiles/hledger.1 b/embeddedfiles/hledger.1
--- a/embeddedfiles/hledger.1
+++ b/embeddedfiles/hledger.1
@@ -1,6 +1,6 @@
 .\"t
 
-.TH "hledger" "1" "June 2020" "hledger 1.18" "hledger User Manuals"
+.TH "hledger" "1" "June 2020" "hledger 1.18.1" "hledger User Manuals"
 
 
 
@@ -617,13 +617,20 @@
 hledger-ui/hledger-web)
 .TP
 \f[B]\f[CB]-B --cost\f[B]\f[R]
-convert amounts to their cost at transaction time (using the transaction
-price, if any)
+convert amounts to their cost/selling amount at transaction time
 .TP
-\f[B]\f[CB]-V --value\f[B]\f[R]
-convert amounts to their market value on the report end date (using the
-most recent applicable market price, if any)
+\f[B]\f[CB]-V --market\f[B]\f[R]
+convert amounts to their market value in default valuation commodities
 .TP
+\f[B]\f[CB]-X --exchange=COMM\f[B]\f[R]
+convert amounts to their market value in commodity COMM
+.TP
+\f[B]\f[CB]--value\f[B]\f[R]
+convert amounts to cost or market value, more flexibly than -B/-V/-X
+.TP
+\f[B]\f[CB]--infer-value\f[B]\f[R]
+with -V/-X/--value, also infer market prices from transactions
+.TP
 \f[B]\f[CB]--auto\f[B]\f[R]
 apply automated posting rules to modify transactions.
 .TP
@@ -1671,47 +1678,139 @@
 .fi
 .SS Valuation
 .PP
-hledger can show cost reports, where amounts are converted to their cost
-or sale amount at transaction time; or value reports, where amounts are
-converted to their market value in another currency/commodity at a
-specified date (using market prices inferred from your transactions, or
-declared with P directives).
-.PP
-We call this \[dq]valuation\[dq], and it is controlled by the
-\f[C]--value=VALUATIONTYPE[,COMMODITY]\f[R] option.
-It can get a little involved, so we cover all the details below.
-But most of the time, all you need to do is use these simpler flags
-instead:
-.IP \[bu] 2
-\f[C]-B\f[R] to convert to cost/sale amount, or
-.IP \[bu] 2
-\f[C]-V\f[R] to convert to market value in your base currency.
-Or occasionally,
-.IP \[bu] 2
-\f[C]-X COMMODITY\f[R] to convert to market value in some other
-currency.
+Instead of reporting amounts in their original commodity, hledger can
+convert them to cost/sale amount (using the conversion rate recorded in
+the transaction), or to market value (using some market price on a
+certain date).
+This is controlled by the \f[C]--value=TYPE[,COMMODITY]\f[R] option, but
+we also provide the simpler \f[C]-B\f[R]/\f[C]-V\f[R]/\f[C]-X\f[R]
+flags, and usually one of those is all you need.
 .SS -B: Cost
 .PP
 The \f[C]-B/--cost\f[R] flag converts amounts to their cost or sale
 amount at transaction time, if they have a transaction price specified.
-(It is equivalent to \f[C]--value=cost\f[R].)
 .SS -V: Value
 .PP
-The \f[C]-V/--market\f[R] flag converts reported amounts to market value
-in their \f[I]default valuation commodity\f[R], using the market prices
-in effect on a \f[I]default valuation date\f[R].
-(More on these below.)
+The \f[C]-V/--market\f[R] flag converts amounts to market value in their
+default \f[I]valuation commodity\f[R], using the market prices in effect
+on the \f[I]valuation date(s)\f[R], if any.
+More on these in a minute.
+.SS -X: Value in specified commodity
 .PP
-The default valuation commodity is the one referenced in the latest
-applicable market price dated on or before the valuation date.
-Typically your P declarations or currency exchange transactions
-reference a single base currency, and -V will pick that.
+The \f[C]-X/--exchange=COMM\f[R] option is like \f[C]-V\f[R], except you
+tell it which currency you want to convert to, and it tries to convert
+everything to that.
+.SS Valuation date
 .PP
-The default valuation date is today for single period reports
-(equivalent to \f[C]--value=now\f[R]), or the last day of each subperiod
-for multiperiod reports (equivalent to \f[C]--value=end\f[R]).
+Since market prices can change from day to day, market value reports
+have a valuation date (or more than one), which determines which market
+prices will be used.
 .PP
-An example:
+For single period reports, if an explicit report end date is specified,
+that will be used as the valuation date; otherwise the valuation date is
+\[dq]today\[dq].
+.PP
+For multiperiod reports, each column/period is valued on the last day of
+the period.
+.SS Market prices
+.PP
+\f[I](experimental)\f[R]
+.PP
+To convert a commodity A to its market value in another commodity B,
+hledger looks for a suitable market price (exchange rate) as follows, in
+this order of preference :
+.IP "1." 3
+A \f[I]declared market price\f[R] or \f[I]inferred market price\f[R]:
+A\[aq]s latest market price in B on or before the valuation date as
+declared by a P directive, or (if the \f[C]--infer-value\f[R] flag is
+used) inferred from transaction prices.
+.IP "2." 3
+A \f[I]reverse market price\f[R]: the inverse of a declared or inferred
+market price from B to A.
+.IP "3." 3
+A \f[I]chained market price\f[R]: a synthetic price formed by combining
+the shortest chain of market prices (any of the above types) leading
+from A to B.
+.PP
+Amounts for which no applicable market price can be found, are not
+converted.
+.SS --infer-value: market prices from transactions
+.PP
+\f[I](experimental)\f[R]
+.PP
+Normally, market value in hledger is fully controlled by, and requires,
+P directives in your journal.
+Since adding and updating those can be a chore, and since transactions
+usually take place at close to market value, why not use the recorded
+transaction prices as additional market prices (as Ledger does) ?
+We could produce value reports without needing P directives at all.
+.PP
+Adding the \f[C]--infer-value\f[R] flag to \f[C]-V\f[R], \f[C]-X\f[R] or
+\f[C]--value\f[R] enables this.
+So for example, \f[C]hledger bs -V --infer-value\f[R] will get market
+prices both from P directives and from transactions.
+.PP
+There is a downside: value reports can sometimes be affected in
+confusing/undesired ways by your journal entries.
+If this happens to you, read all of this Valuation section carefully,
+and try adding \f[C]--debug\f[R] or \f[C]--debug=2\f[R] to troubleshoot.
+.PP
+\f[C]--infer-value\f[R] can infer market prices from:
+.IP \[bu] 2
+multicommodity transactions with explicit prices
+(\f[C]\[at]\f[R]/\f[C]\[at]\[at]\f[R])
+.IP \[bu] 2
+multicommodity transactions with implicit prices (no \f[C]\[at]\f[R],
+two commodities, unbalanced).
+(With these, the order of postings matters.
+\f[C]hledger print -x\f[R] can be useful for troubleshooting.)
+.IP \[bu] 2
+but not, currently, from \[dq]more correct\[dq] multicommodity
+transactions (no \f[C]\[at]\f[R], multiple commodities, balanced).
+.SS Valuation commodity
+.PP
+\f[I](experimental)\f[R]
+.PP
+\f[B]When you specify a valuation commodity (\f[CB]-X COMM\f[B] or
+\f[CB]--value TYPE,COMM\f[B]):\f[R]
+.PD 0
+.P
+.PD
+hledger will convert all amounts to COMM, wherever it can find a
+suitable market price (including by reversing or chaining prices).
+.PP
+\f[B]When you leave the valuation commodity unspecified (\f[CB]-V\f[B]
+or \f[CB]--value TYPE\f[B]):\f[R]
+.PD 0
+.P
+.PD
+For each commodity A, hledger picks a default valuation commodity as
+follows, in this order of preference:
+.IP "1." 3
+The price commodity from the latest P-declared market price for A on or
+before valuation date.
+.IP "2." 3
+The price commodity from the latest P-declared market price for A on any
+date.
+(Allows conversion to proceed when there are inferred prices before the
+valuation date.)
+.IP "3." 3
+If there are no P directives at all (any commodity or date) and the
+\f[C]--infer-value\f[R] flag is used: the price commodity from the
+latest transaction-inferred price for A on or before valuation date.
+.PP
+This means:
+.IP \[bu] 2
+If you have P directives, they determine which commodities \f[C]-V\f[R]
+will convert, and to what.
+.IP \[bu] 2
+If you have no P directives, and use the \f[C]--infer-value\f[R] flag,
+transaction prices determine it.
+.PP
+Amounts for which no valuation commodity can be found are not converted.
+.SS Simple valuation examples
+.PP
+Here are some quick examples of \f[C]-V\f[R]:
 .IP
 .nf
 \f[C]
@@ -1755,39 +1854,8 @@
              $103.00  assets:euros
 \f[R]
 .fi
-.SS -X: Market value in specified commodity
-.PP
-The \f[C]-X/--exchange\f[R] option is like \f[C]-V\f[R], except it
-specifies the target commodity you would like to convert to.
-(It is equivalent to \f[C]--value=now,COMM\f[R] or
-\f[C]--value=end,COMM\f[R].)
-.SS Market prices
-.PP
-To convert a commodity A to commodity B, hledger looks for a suitable
-market price (exchange rate) in the following ways, in this order of
-preference:
-.IP "1." 3
-a \f[I]declared market price\f[R] - the latest P directive specifying
-the exchange rate from A to B, dated on or before the valuation date.
-.IP "2." 3
-a \f[I]transaction-implied market price\f[R] - a market price matching
-the transaction price used in the latest transaction where A is
-converted to B, dated on or before the valuation date.
-(\f[I]since hledger 1.18; experimental\f[R])
-.IP "3." 3
-a \f[I]reverse declared market price\f[R] - calculated by inverting a
-declared market price from B to A.
-.IP "4." 3
-a \f[I]reverse transaction-implied market price\f[R] - calculated by
-inverting a transaction-implied market price from B to A.
-.IP "5." 3
-an \f[I]indirect market price\f[R] - calculated by combining the
-shortest chain of market prices (any of the above types) leading from A
-to B.
 .SS --value: Flexible valuation
 .PP
-\f[I](experimental, added 201905)\f[R]
-.PP
 \f[C]-B\f[R], \f[C]-V\f[R] and \f[C]-X\f[R] are special cases of the
 more general \f[C]--value\f[R] option:
 .IP
@@ -1804,52 +1872,38 @@
 \f[R]
 .fi
 .PP
-The TYPE part basically selects either \[dq]cost\[dq], or \[dq]market
-value\[dq] plus a valuation date:
+The TYPE part selects cost or value and valuation date:
 .TP
 \f[B]\f[CB]--value=cost\f[B]\f[R]
 Convert amounts to cost, using the prices recorded in transactions.
 .TP
 \f[B]\f[CB]--value=then\f[B]\f[R]
-Convert amounts to their value in a default valuation commodity, using
+Convert amounts to their value in the default valuation commodity, using
 market prices on each posting\[aq]s date.
 This is currently supported only by the print and register commands.
 .TP
 \f[B]\f[CB]--value=end\f[B]\f[R]
-Convert amounts to their value in a default valuation commodity, using
+Convert amounts to their value in the default valuation commodity, using
 market prices on the last day of the report period (or if unspecified,
 the journal\[aq]s end date); or in multiperiod reports, market prices on
 the last day of each subperiod.
 .TP
 \f[B]\f[CB]--value=now\f[B]\f[R]
-Convert amounts to their value in default valuation commodity using
+Convert amounts to their value in the default valuation commodity using
 current market prices (as of when report is generated).
 .TP
 \f[B]\f[CB]--value=YYYY-MM-DD\f[B]\f[R]
-Convert amounts to their value in default valuation commodity using
+Convert amounts to their value in the default valuation commodity using
 market prices on this date.
 .PP
-The default valuation commodity is the commodity mentioned in the most
-recent applicable market price declaration.
-When all your price declarations lead to a single home currency, this
-will usually do what you want.
-.PP
 To select a different valuation commodity, add the optional
 \f[C],COMM\f[R] part: a comma, then the target commodity\[aq]s symbol.
 Eg: \f[B]\f[CB]--value=now,EUR\f[B]\f[R].
-hledger will do its best to convert amounts to this commodity, using:
-.IP \[bu] 2
-declared prices (from source commodity to valuation commodity)
-.IP \[bu] 2
-reverse prices (declared prices from valuation to source commodity,
-inverted)
-.IP \[bu] 2
-indirect prices (prices calculated from the shortest chain of declared
-or reverse prices from source to valuation commodity)
-.PP
-in that order.
+hledger will do its best to convert amounts to this commodity, deducing
+market prices as described above.
+.SS More valuation examples
 .PP
-Here are some examples showing the effect of \f[C]--value\f[R] as seen
+Here are some examples showing the effect of \f[C]--value\f[R], as seen
 with \f[C]print\f[R]:
 .IP
 .nf
@@ -1997,13 +2051,12 @@
     b          -0.50A
 \f[R]
 .fi
-.SS Effect of --value on reports
+.SS Effect of valuation on reports
 .PP
-Here is a reference for how \f[C]--value\f[R] currently affects each
-part of hledger\[aq]s reports.
-It\[aq]s work in progress, but may be useful for troubleshooting or
-reporting bugs.
-See also the definitions and notes below.
+Here is a reference for how valuation is supposed to affect each part of
+hledger\[aq]s reports (and a glossary).
+(It\[aq]s wide, you\[aq]ll have to scroll sideways.) It may be useful
+when troubleshooting.
 If you find problems, please report them, ideally with a reproducible
 example.
 Related: #329, #1083.
@@ -2254,7 +2307,7 @@
 T}
 .TE
 .PP
-\f[B]Additional notes\f[R]
+\f[B]Glossary:\f[R]
 .TP
 \f[I]cost\f[R]
 calculated using price(s) recorded in the transaction(s).
diff --git a/embeddedfiles/hledger.info b/embeddedfiles/hledger.info
--- a/embeddedfiles/hledger.info
+++ b/embeddedfiles/hledger.info
@@ -3,8 +3,8 @@
 
 File: hledger.info,  Node: Top,  Next: COMMON TASKS,  Up: (dir)
 
-hledger(1) hledger 1.18
-***********************
+hledger(1) hledger 1.18.1
+*************************
 
 hledger - a command-line accounting tool
 
@@ -610,12 +610,21 @@
      hledger-ui/hledger-web)
 '-B --cost'
 
-     convert amounts to their cost at transaction time (using the
-     transaction price, if any)
-'-V --value'
+     convert amounts to their cost/selling amount at transaction time
+'-V --market'
 
-     convert amounts to their market value on the report end date (using
-     the most recent applicable market price, if any)
+     convert amounts to their market value in default valuation
+     commodities
+'-X --exchange=COMM'
+
+     convert amounts to their market value in commodity COMM
+'--value'
+
+     convert amounts to cost or market value, more flexibly than
+     -B/-V/-X
+'--infer-value'
+
+     with -V/-X/-value, also infer market prices from transactions
 '--auto'
 
      apply automated posting rules to modify transactions.
@@ -1363,30 +1372,26 @@
 2.17 Valuation
 ==============
 
-hledger can show cost reports, where amounts are converted to their cost
-or sale amount at transaction time; or value reports, where amounts are
-converted to their market value in another currency/commodity at a
-specified date (using market prices inferred from your transactions, or
-declared with P directives).
-
-   We call this "valuation", and it is controlled by the
-'--value=VALUATIONTYPE[,COMMODITY]' option.  It can get a little
-involved, so we cover all the details below.  But most of the time, all
-you need to do is use these simpler flags instead:
-
-   * '-B' to convert to cost/sale amount, or
-   * '-V' to convert to market value in your base currency.  Or
-     occasionally,
-   * '-X COMMODITY' to convert to market value in some other currency.
+Instead of reporting amounts in their original commodity, hledger can
+convert them to cost/sale amount (using the conversion rate recorded in
+the transaction), or to market value (using some market price on a
+certain date).  This is controlled by the '--value=TYPE[,COMMODITY]'
+option, but we also provide the simpler '-B'/'-V'/'-X' flags, and
+usually one of those is all you need.
 
 * Menu:
 
 * -B Cost::
 * -V Value::
-* -X Market value in specified commodity::
+* -X Value in specified commodity::
+* Valuation date::
 * Market prices::
+* --infer-value market prices from transactions::
+* Valuation commodity::
+* Simple valuation examples::
 * --value Flexible valuation::
-* Effect of --value on reports::
+* More valuation examples::
+* Effect of valuation on reports::
 
 
 File: hledger.info,  Node: -B Cost,  Next: -V Value,  Up: Valuation
@@ -1395,30 +1400,155 @@
 ---------------
 
 The '-B/--cost' flag converts amounts to their cost or sale amount at
-transaction time, if they have a transaction price specified.  (It is
-equivalent to '--value=cost'.)
+transaction time, if they have a transaction price specified.
 
 
-File: hledger.info,  Node: -V Value,  Next: -X Market value in specified commodity,  Prev: -B Cost,  Up: Valuation
+File: hledger.info,  Node: -V Value,  Next: -X Value in specified commodity,  Prev: -B Cost,  Up: Valuation
 
 2.17.2 -V: Value
 ----------------
 
-The '-V/--market' flag converts reported amounts to market value in
-their _default valuation commodity_, using the market prices in effect
-on a _default valuation date_.  (More on these below.)
+The '-V/--market' flag converts amounts to market value in their default
+_valuation commodity_, using the market prices in effect on the
+_valuation date(s)_, if any.  More on these in a minute.
 
-   The default valuation commodity is the one referenced in the latest
-applicable market price dated on or before the valuation date.
-Typically your P declarations or currency exchange transactions
-reference a single base currency, and -V will pick that.
+
+File: hledger.info,  Node: -X Value in specified commodity,  Next: Valuation date,  Prev: -V Value,  Up: Valuation
 
-   The default valuation date is today for single period reports
-(equivalent to '--value=now'), or the last day of each subperiod for
-multiperiod reports (equivalent to '--value=end').
+2.17.3 -X: Value in specified commodity
+---------------------------------------
 
-   An example:
+The '-X/--exchange=COMM' option is like '-V', except you tell it which
+currency you want to convert to, and it tries to convert everything to
+that.
 
+
+File: hledger.info,  Node: Valuation date,  Next: Market prices,  Prev: -X Value in specified commodity,  Up: Valuation
+
+2.17.4 Valuation date
+---------------------
+
+Since market prices can change from day to day, market value reports
+have a valuation date (or more than one), which determines which market
+prices will be used.
+
+   For single period reports, if an explicit report end date is
+specified, that will be used as the valuation date; otherwise the
+valuation date is "today".
+
+   For multiperiod reports, each column/period is valued on the last day
+of the period.
+
+
+File: hledger.info,  Node: Market prices,  Next: --infer-value market prices from transactions,  Prev: Valuation date,  Up: Valuation
+
+2.17.5 Market prices
+--------------------
+
+_(experimental)_
+
+   To convert a commodity A to its market value in another commodity B,
+hledger looks for a suitable market price (exchange rate) as follows, in
+this order of preference :
+
+  1. A _declared market price_ or _inferred market price_: A's latest
+     market price in B on or before the valuation date as declared by a
+     P directive, or (if the '--infer-value' flag is used) inferred from
+     transaction prices.
+
+  2. A _reverse market price_: the inverse of a declared or inferred
+     market price from B to A.
+
+  3. A _chained market price_: a synthetic price formed by combining the
+     shortest chain of market prices (any of the above types) leading
+     from A to B.
+
+   Amounts for which no applicable market price can be found, are not
+converted.
+
+
+File: hledger.info,  Node: --infer-value market prices from transactions,  Next: Valuation commodity,  Prev: Market prices,  Up: Valuation
+
+2.17.6 -infer-value: market prices from transactions
+----------------------------------------------------
+
+_(experimental)_
+
+   Normally, market value in hledger is fully controlled by, and
+requires, P directives in your journal.  Since adding and updating those
+can be a chore, and since transactions usually take place at close to
+market value, why not use the recorded transaction prices as additional
+market prices (as Ledger does) ?  We could produce value reports without
+needing P directives at all.
+
+   Adding the '--infer-value' flag to '-V', '-X' or '--value' enables
+this.  So for example, 'hledger bs -V --infer-value' will get market
+prices both from P directives and from transactions.
+
+   There is a downside: value reports can sometimes be affected in
+confusing/undesired ways by your journal entries.  If this happens to
+you, read all of this Valuation section carefully, and try adding
+'--debug' or '--debug=2' to troubleshoot.
+
+   '--infer-value' can infer market prices from:
+
+   * multicommodity transactions with explicit prices ('@'/'@@')
+
+   * multicommodity transactions with implicit prices (no '@', two
+     commodities, unbalanced).  (With these, the order of postings
+     matters.  'hledger print -x' can be useful for troubleshooting.)
+
+   * but not, currently, from "more correct" multicommodity transactions
+     (no '@', multiple commodities, balanced).
+
+
+File: hledger.info,  Node: Valuation commodity,  Next: Simple valuation examples,  Prev: --infer-value market prices from transactions,  Up: Valuation
+
+2.17.7 Valuation commodity
+--------------------------
+
+_(experimental)_
+
+   *When you specify a valuation commodity ('-X COMM' or '--value
+TYPE,COMM'):*
+hledger will convert all amounts to COMM, wherever it can find a
+suitable market price (including by reversing or chaining prices).
+
+   *When you leave the valuation commodity unspecified ('-V' or '--value
+TYPE'):*
+For each commodity A, hledger picks a default valuation commodity as
+follows, in this order of preference:
+
+  1. The price commodity from the latest P-declared market price for A
+     on or before valuation date.
+
+  2. The price commodity from the latest P-declared market price for A
+     on any date.  (Allows conversion to proceed when there are inferred
+     prices before the valuation date.)
+
+  3. If there are no P directives at all (any commodity or date) and the
+     '--infer-value' flag is used: the price commodity from the latest
+     transaction-inferred price for A on or before valuation date.
+
+   This means:
+
+   * If you have P directives, they determine which commodities '-V'
+     will convert, and to what.
+
+   * If you have no P directives, and use the '--infer-value' flag,
+     transaction prices determine it.
+
+   Amounts for which no valuation commodity can be found are not
+converted.
+
+
+File: hledger.info,  Node: Simple valuation examples,  Next: --value Flexible valuation,  Prev: Valuation commodity,  Up: Valuation
+
+2.17.8 Simple valuation examples
+--------------------------------
+
+Here are some quick examples of '-V':
+
 ; one euro is worth this many dollars from nov 1
 P 2016/11/01 € $1.10
 
@@ -1447,52 +1577,12 @@
              $103.00  assets:euros
 
 
-File: hledger.info,  Node: -X Market value in specified commodity,  Next: Market prices,  Prev: -V Value,  Up: Valuation
-
-2.17.3 -X: Market value in specified commodity
-----------------------------------------------
-
-The '-X/--exchange' option is like '-V', except it specifies the target
-commodity you would like to convert to.  (It is equivalent to
-'--value=now,COMM' or '--value=end,COMM'.)
-
-
-File: hledger.info,  Node: Market prices,  Next: --value Flexible valuation,  Prev: -X Market value in specified commodity,  Up: Valuation
-
-2.17.4 Market prices
---------------------
-
-To convert a commodity A to commodity B, hledger looks for a suitable
-market price (exchange rate) in the following ways, in this order of
-preference:
-
-  1. a _declared market price_ - the latest P directive specifying the
-     exchange rate from A to B, dated on or before the valuation date.
-
-  2. a _transaction-implied market price_ - a market price matching the
-     transaction price used in the latest transaction where A is
-     converted to B, dated on or before the valuation date.  (_since
-     hledger 1.18; experimental_)
-
-  3. a _reverse declared market price_ - calculated by inverting a
-     declared market price from B to A.
-
-  4. a _reverse transaction-implied market price_ - calculated by
-     inverting a transaction-implied market price from B to A.
-
-  5. an _indirect market price_ - calculated by combining the shortest
-     chain of market prices (any of the above types) leading from A to
-     B.
-
-
-File: hledger.info,  Node: --value Flexible valuation,  Next: Effect of --value on reports,  Prev: Market prices,  Up: Valuation
+File: hledger.info,  Node: --value Flexible valuation,  Next: More valuation examples,  Prev: Simple valuation examples,  Up: Valuation
 
-2.17.5 -value: Flexible valuation
+2.17.9 -value: Flexible valuation
 ---------------------------------
 
-_(experimental, added 201905)_
-
-   '-B', '-V' and '-X' are special cases of the more general '--value'
+'-B', '-V' and '-X' are special cases of the more general '--value'
 option:
 
  --value=TYPE[,COMM]  TYPE is cost, then, end, now or YYYY-MM-DD.
@@ -1504,51 +1594,43 @@
                       - default valuation commodity (or COMM) using current market prices
                       - default valuation commodity (or COMM) using market prices at some date
 
-   The TYPE part basically selects either "cost", or "market value" plus
-a valuation date:
+   The TYPE part selects cost or value and valuation date:
 
 '--value=cost'
 
      Convert amounts to cost, using the prices recorded in transactions.
 '--value=then'
 
-     Convert amounts to their value in a default valuation commodity,
+     Convert amounts to their value in the default valuation commodity,
      using market prices on each posting's date.  This is currently
      supported only by the print and register commands.
 '--value=end'
 
-     Convert amounts to their value in a default valuation commodity,
+     Convert amounts to their value in the default valuation commodity,
      using market prices on the last day of the report period (or if
      unspecified, the journal's end date); or in multiperiod reports,
      market prices on the last day of each subperiod.
 '--value=now'
 
-     Convert amounts to their value in default valuation commodity using
-     current market prices (as of when report is generated).
+     Convert amounts to their value in the default valuation commodity
+     using current market prices (as of when report is generated).
 '--value=YYYY-MM-DD'
 
-     Convert amounts to their value in default valuation commodity using
-     market prices on this date.
-
-   The default valuation commodity is the commodity mentioned in the
-most recent applicable market price declaration.  When all your price
-declarations lead to a single home currency, this will usually do what
-you want.
+     Convert amounts to their value in the default valuation commodity
+     using market prices on this date.
 
    To select a different valuation commodity, add the optional ',COMM'
 part: a comma, then the target commodity's symbol.  Eg:
 *'--value=now,EUR'*.  hledger will do its best to convert amounts to
-this commodity, using:
+this commodity, deducing market prices as described above.
 
-   * declared prices (from source commodity to valuation commodity)
-   * reverse prices (declared prices from valuation to source commodity,
-     inverted)
-   * indirect prices (prices calculated from the shortest chain of
-     declared or reverse prices from source to valuation commodity)
+
+File: hledger.info,  Node: More valuation examples,  Next: Effect of valuation on reports,  Prev: --value Flexible valuation,  Up: Valuation
 
-   in that order.
+2.17.10 More valuation examples
+-------------------------------
 
-   Here are some examples showing the effect of '--value' as seen with
+Here are some examples showing the effect of '--value', as seen with
 'print':
 
 P 2000-01-01 A  1 B
@@ -1657,16 +1739,16 @@
     b          -0.50A
 
 
-File: hledger.info,  Node: Effect of --value on reports,  Prev: --value Flexible valuation,  Up: Valuation
+File: hledger.info,  Node: Effect of valuation on reports,  Prev: More valuation examples,  Up: Valuation
 
-2.17.6 Effect of -value on reports
-----------------------------------
+2.17.11 Effect of valuation on reports
+--------------------------------------
 
-Here is a reference for how '--value' currently affects each part of
-hledger's reports.  It's work in progress, but may be useful for
-troubleshooting or reporting bugs.  See also the definitions and notes
-below.  If you find problems, please report them, ideally with a
-reproducible example.  Related: #329, #1083.
+Here is a reference for how valuation is supposed to affect each part of
+hledger's reports (and a glossary).  (It's wide, you'll have to scroll
+sideways.)  It may be useful when troubleshooting.  If you find
+problems, please report them, ideally with a reproducible example.
+Related: #329, #1083.
 
 Report       '-B',        '-V', '-X'   '--value=then' '--value=end' '--value=DATE',
 type         '--value=cost'                                         '--value=now'
@@ -1739,7 +1821,7 @@
              totals       totals                      totals        column
                                                                     totals
 
-   *Additional notes*
+   *Glossary:*
 
 _cost_
 
@@ -3776,187 +3858,197 @@
 
 Tag Table:
 Node: Top68
-Node: COMMON TASKS2315
-Ref: #common-tasks2427
-Node: Getting help2834
-Ref: #getting-help2966
-Node: Constructing command lines3519
-Ref: #constructing-command-lines3711
-Node: Starting a journal file4408
-Ref: #starting-a-journal-file4606
-Node: Setting opening balances5794
-Ref: #setting-opening-balances5990
-Node: Recording transactions9131
-Ref: #recording-transactions9311
-Node: Reconciling9867
-Ref: #reconciling10010
-Node: Reporting12267
-Ref: #reporting12407
-Node: Migrating to a new file16406
-Ref: #migrating-to-a-new-file16554
-Node: OPTIONS16853
-Ref: #options16960
-Node: General options17330
-Ref: #general-options17455
-Node: Command options20225
-Ref: #command-options20376
-Node: Command arguments20774
-Ref: #command-arguments20921
-Node: Queries21801
-Ref: #queries21956
-Node: Special characters in arguments and queries25918
-Ref: #special-characters-in-arguments-and-queries26146
-Node: More escaping26597
-Ref: #more-escaping26759
-Node: Even more escaping27055
-Ref: #even-more-escaping27249
-Node: Less escaping27920
-Ref: #less-escaping28082
-Node: Unicode characters28327
-Ref: #unicode-characters28509
-Node: Input files29921
-Ref: #input-files30064
-Node: Output destination31993
-Ref: #output-destination32145
-Node: Output format32570
-Ref: #output-format32720
-Node: Regular expressions34302
-Ref: #regular-expressions34459
-Node: Smart dates36195
-Ref: #smart-dates36346
-Node: Report start & end date37707
-Ref: #report-start-end-date37879
-Node: Report intervals39376
-Ref: #report-intervals39541
-Node: Period expressions39931
-Ref: #period-expressions40091
-Node: Depth limiting44227
-Ref: #depth-limiting44371
-Node: Pivoting44703
-Ref: #pivoting44826
-Node: Valuation46502
-Ref: #valuation46604
-Node: -B Cost47524
-Ref: #b-cost47628
-Node: -V Value47800
-Ref: #v-value47953
-Node: -X Market value in specified commodity49226
-Ref: #x-market-value-in-specified-commodity49445
-Node: Market prices49623
-Ref: #market-prices49808
-Node: --value Flexible valuation50733
-Ref: #value-flexible-valuation50934
-Node: Effect of --value on reports55439
-Ref: #effect-of---value-on-reports55620
-Node: COMMANDS61166
-Ref: #commands61274
-Node: accounts62358
-Ref: #accounts62456
-Node: activity63155
-Ref: #activity63265
-Node: add63648
-Ref: #add63747
-Node: balance66486
-Ref: #balance66597
-Node: Classic balance report68055
-Ref: #classic-balance-report68228
-Node: Customising the classic balance report69597
-Ref: #customising-the-classic-balance-report69825
-Node: Colour support71901
-Ref: #colour-support72068
-Node: Flat mode72241
-Ref: #flat-mode72389
-Node: Depth limited balance reports72802
-Ref: #depth-limited-balance-reports72987
-Node: Percentages73443
-Ref: #percentages73609
-Node: Multicolumn balance report74746
-Ref: #multicolumn-balance-report74926
-Node: Budget report80188
-Ref: #budget-report80331
-Node: Nested budgets85597
-Ref: #nested-budgets85709
-Ref: #output-format-189190
-Node: balancesheet89387
-Ref: #balancesheet89523
-Node: balancesheetequity90989
-Ref: #balancesheetequity91138
-Node: cashflow91861
-Ref: #cashflow91989
-Node: check-dates93168
-Ref: #check-dates93295
-Node: check-dupes93574
-Ref: #check-dupes93698
-Node: close93991
-Ref: #close94105
-Node: close usage95627
-Ref: #close-usage95720
-Node: commodities98533
-Ref: #commodities98660
-Node: descriptions98742
-Ref: #descriptions98870
-Node: diff99051
-Ref: #diff99157
-Node: files100204
-Ref: #files100304
-Node: help100451
-Ref: #help100551
-Node: import101632
-Ref: #import101746
-Node: Importing balance assignments102639
-Ref: #importing-balance-assignments102787
-Node: incomestatement103436
-Ref: #incomestatement103569
-Node: notes105056
-Ref: #notes105169
-Node: payees105295
-Ref: #payees105401
-Node: prices105559
-Ref: #prices105665
-Node: print106006
-Ref: #print106116
-Node: print-unique110902
-Ref: #print-unique111028
-Node: register111313
-Ref: #register111440
-Node: Custom register output115612
-Ref: #custom-register-output115741
-Node: register-match117078
-Ref: #register-match117212
-Node: rewrite117563
-Ref: #rewrite117678
-Node: Re-write rules in a file119533
-Ref: #re-write-rules-in-a-file119667
-Node: Diff output format120877
-Ref: #diff-output-format121046
-Node: rewrite vs print --auto122138
-Ref: #rewrite-vs.-print---auto122317
-Node: roi122873
-Ref: #roi122971
-Node: stats123983
-Ref: #stats124082
-Node: tags124870
-Ref: #tags124968
-Node: test125262
-Ref: #test125370
-Node: Add-on commands126117
-Ref: #add-on-commands126234
-Node: ui127577
-Ref: #ui127665
-Node: web127719
-Ref: #web127822
-Node: iadd127938
-Ref: #iadd128049
-Node: interest128131
-Ref: #interest128238
-Node: ENVIRONMENT128478
-Ref: #environment128590
-Node: FILES129419
-Ref: #files-1129522
-Node: LIMITATIONS129735
-Ref: #limitations129854
-Node: TROUBLESHOOTING130596
-Ref: #troubleshooting130709
+Node: COMMON TASKS2319
+Ref: #common-tasks2431
+Node: Getting help2838
+Ref: #getting-help2970
+Node: Constructing command lines3523
+Ref: #constructing-command-lines3715
+Node: Starting a journal file4412
+Ref: #starting-a-journal-file4610
+Node: Setting opening balances5798
+Ref: #setting-opening-balances5994
+Node: Recording transactions9135
+Ref: #recording-transactions9315
+Node: Reconciling9871
+Ref: #reconciling10014
+Node: Reporting12271
+Ref: #reporting12411
+Node: Migrating to a new file16410
+Ref: #migrating-to-a-new-file16558
+Node: OPTIONS16857
+Ref: #options16964
+Node: General options17334
+Ref: #general-options17459
+Node: Command options20413
+Ref: #command-options20564
+Node: Command arguments20962
+Ref: #command-arguments21109
+Node: Queries21989
+Ref: #queries22144
+Node: Special characters in arguments and queries26106
+Ref: #special-characters-in-arguments-and-queries26334
+Node: More escaping26785
+Ref: #more-escaping26947
+Node: Even more escaping27243
+Ref: #even-more-escaping27437
+Node: Less escaping28108
+Ref: #less-escaping28270
+Node: Unicode characters28515
+Ref: #unicode-characters28697
+Node: Input files30109
+Ref: #input-files30252
+Node: Output destination32181
+Ref: #output-destination32333
+Node: Output format32758
+Ref: #output-format32908
+Node: Regular expressions34490
+Ref: #regular-expressions34647
+Node: Smart dates36383
+Ref: #smart-dates36534
+Node: Report start & end date37895
+Ref: #report-start-end-date38067
+Node: Report intervals39564
+Ref: #report-intervals39729
+Node: Period expressions40119
+Ref: #period-expressions40279
+Node: Depth limiting44415
+Ref: #depth-limiting44559
+Node: Pivoting44891
+Ref: #pivoting45014
+Node: Valuation46690
+Ref: #valuation46792
+Node: -B Cost47481
+Ref: #b-cost47585
+Node: -V Value47718
+Ref: #v-value47864
+Node: -X Value in specified commodity48059
+Ref: #x-value-in-specified-commodity48258
+Node: Valuation date48407
+Ref: #valuation-date48575
+Node: Market prices48985
+Ref: #market-prices49165
+Node: --infer-value market prices from transactions49942
+Ref: #infer-value-market-prices-from-transactions50191
+Node: Valuation commodity51473
+Ref: #valuation-commodity51682
+Node: Simple valuation examples52908
+Ref: #simple-valuation-examples53110
+Node: --value Flexible valuation53769
+Ref: #value-flexible-valuation53977
+Node: More valuation examples55924
+Ref: #more-valuation-examples56133
+Node: Effect of valuation on reports58138
+Ref: #effect-of-valuation-on-reports58326
+Node: COMMANDS63847
+Ref: #commands63955
+Node: accounts65039
+Ref: #accounts65137
+Node: activity65836
+Ref: #activity65946
+Node: add66329
+Ref: #add66428
+Node: balance69167
+Ref: #balance69278
+Node: Classic balance report70736
+Ref: #classic-balance-report70909
+Node: Customising the classic balance report72278
+Ref: #customising-the-classic-balance-report72506
+Node: Colour support74582
+Ref: #colour-support74749
+Node: Flat mode74922
+Ref: #flat-mode75070
+Node: Depth limited balance reports75483
+Ref: #depth-limited-balance-reports75668
+Node: Percentages76124
+Ref: #percentages76290
+Node: Multicolumn balance report77427
+Ref: #multicolumn-balance-report77607
+Node: Budget report82869
+Ref: #budget-report83012
+Node: Nested budgets88278
+Ref: #nested-budgets88390
+Ref: #output-format-191871
+Node: balancesheet92068
+Ref: #balancesheet92204
+Node: balancesheetequity93670
+Ref: #balancesheetequity93819
+Node: cashflow94542
+Ref: #cashflow94670
+Node: check-dates95849
+Ref: #check-dates95976
+Node: check-dupes96255
+Ref: #check-dupes96379
+Node: close96672
+Ref: #close96786
+Node: close usage98308
+Ref: #close-usage98401
+Node: commodities101214
+Ref: #commodities101341
+Node: descriptions101423
+Ref: #descriptions101551
+Node: diff101732
+Ref: #diff101838
+Node: files102885
+Ref: #files102985
+Node: help103132
+Ref: #help103232
+Node: import104313
+Ref: #import104427
+Node: Importing balance assignments105320
+Ref: #importing-balance-assignments105468
+Node: incomestatement106117
+Ref: #incomestatement106250
+Node: notes107737
+Ref: #notes107850
+Node: payees107976
+Ref: #payees108082
+Node: prices108240
+Ref: #prices108346
+Node: print108687
+Ref: #print108797
+Node: print-unique113583
+Ref: #print-unique113709
+Node: register113994
+Ref: #register114121
+Node: Custom register output118293
+Ref: #custom-register-output118422
+Node: register-match119759
+Ref: #register-match119893
+Node: rewrite120244
+Ref: #rewrite120359
+Node: Re-write rules in a file122214
+Ref: #re-write-rules-in-a-file122348
+Node: Diff output format123558
+Ref: #diff-output-format123727
+Node: rewrite vs print --auto124819
+Ref: #rewrite-vs.-print---auto124998
+Node: roi125554
+Ref: #roi125652
+Node: stats126664
+Ref: #stats126763
+Node: tags127551
+Ref: #tags127649
+Node: test127943
+Ref: #test128051
+Node: Add-on commands128798
+Ref: #add-on-commands128915
+Node: ui130258
+Ref: #ui130346
+Node: web130400
+Ref: #web130503
+Node: iadd130619
+Ref: #iadd130730
+Node: interest130812
+Ref: #interest130919
+Node: ENVIRONMENT131159
+Ref: #environment131271
+Node: FILES132100
+Ref: #files-1132203
+Node: LIMITATIONS132416
+Ref: #limitations132535
+Node: TROUBLESHOOTING133277
+Ref: #troubleshooting133390
 
 End Tag Table
 
diff --git a/embeddedfiles/hledger.txt b/embeddedfiles/hledger.txt
--- a/embeddedfiles/hledger.txt
+++ b/embeddedfiles/hledger.txt
@@ -515,13 +515,22 @@
               hledger-ui/hledger-web)
 
        -B --cost
-              convert  amounts  to  their  cost at transaction time (using the
-              transaction price, if any)
+              convert amounts to their cost/selling amount at transaction time
 
-       -V --value
-              convert amounts to their market value on  the  report  end  date
-              (using the most recent applicable market price, if any)
+       -V --market
+              convert  amounts to their market value in default valuation com-
+              modities
 
+       -X --exchange=COMM
+              convert amounts to their market value in commodity COMM
+
+       --value
+              convert amounts to cost or  market  value,  more  flexibly  than
+              -B/-V/-X
+
+       --infer-value
+              with -V/-X/--value, also infer market prices from transactions
+
        --auto apply automated posting rules to modify transactions.
 
        --forecast
@@ -934,7 +943,6 @@
        2004/10/1,   2004-01-01,   exact date, several separators allowed.   Year
        2004.9.1                   is 4+ digits, month is 1-12, day is 1-31
        2004                       start of year
-
        2004/10                    start of month
        10/1                       month and day in current year
        21                         day in current month
@@ -1067,6 +1075,8 @@
 
        -p  "weekly from 2009/1/1   starts on 2008/12/29, closest preceding Mon-
        to 2009/4/1"                day
+
+
        -p       "monthly      in   starts on 2018/11/01
        2008/11/25"
        -p    "quarterly     from   starts  on  2009/04/01,  ends on 2009/06/30,
@@ -1179,45 +1189,128 @@
                             -2 EUR
 
    Valuation
-       hledger can show cost reports, where amounts  are  converted  to  their
-       cost  or  sale  amount  at  transaction  time;  or value reports, where
-       amounts are converted to their market value in another currency/commod-
-       ity  at a specified date (using market prices inferred from your trans-
-       actions, or declared with P directives).
+       Instead of reporting amounts in their original commodity,  hledger  can
+       convert them to cost/sale amount (using the conversion rate recorded in
+       the transaction), or to market value (using some market price on a cer-
+       tain date).  This is controlled by the --value=TYPE[,COMMODITY] option,
+       but we also provide the simpler -B/-V/-X  flags,  and  usually  one  of
+       those is all you need.
 
-       We call this "valuation", and it is controlled  by  the  --value=VALUA-
-       TIONTYPE[,COMMODITY] option.  It can get a little involved, so we cover
-       all the details below.  But most of the time, all you need to do is use
-       these simpler flags instead:
+   -B: Cost
+       The  -B/--cost  flag  converts  amounts to their cost or sale amount at
+       transaction time, if they have a transaction price specified.
 
-       o -B to convert to cost/sale amount, or
+   -V: Value
+       The -V/--market flag converts amounts to market value in their  default
+       valuation commodity, using the market prices in effect on the valuation
+       date(s), if any.  More on these in a minute.
 
-       o -V  to  convert  to market value in your base currency.  Or occasion-
-         ally,
+   -X: Value in specified commodity
+       The -X/--exchange=COMM option is like -V, except you tell it which cur-
+       rency  you  want  to  convert to, and it tries to convert everything to
+       that.
 
-       o -X COMMODITY to convert to market value in some other currency.
+   Valuation date
+       Since market prices can change from day to day,  market  value  reports
+       have a valuation date (or more than one), which determines which market
+       prices will be used.
 
-   -B: Cost
-       The -B/--cost flag converts amounts to their cost  or  sale  amount  at
-       transaction  time,  if they have a transaction price specified.  (It is
-       equivalent to --value=cost.)
+       For single period reports, if an explicit report end date is specified,
+       that  will  be used as the valuation date; otherwise the valuation date
+       is "today".
 
-   -V: Value
-       The -V/--market flag converts reported amounts to market value in their
-       default valuation commodity, using the market prices in effect on a de-
-       fault valuation date.  (More on these below.)
+       For multiperiod reports, each column/period is valued on the  last  day
+       of the period.
 
-       The default valuation commodity is the one referenced in the latest ap-
-       plicable market price dated on or before the valuation date.  Typically
-       your P declarations or currency exchange transactions reference a  sin-
-       gle base currency, and -V will pick that.
+   Market prices
+       (experimental)
 
-       The  default valuation date is today for single period reports (equiva-
-       lent to --value=now), or the last day of each subperiod for multiperiod
-       reports (equivalent to --value=end).
+       To  convert  a  commodity A to its market value in another commodity B,
+       hledger looks for a suitable market price (exchange rate)  as  follows,
+       in this order of preference :
 
-       An example:
+       1. A  declared market price or inferred market price: A's latest market
+          price in B on or before the valuation date as declared by a P direc-
+          tive,  or (if the --infer-value flag is used) inferred from transac-
+          tion prices.
 
+       2. A reverse market price: the inverse of a declared or inferred market
+          price from B to A.
+
+       3. A  chained  market  price: a synthetic price formed by combining the
+          shortest chain of market prices (any of  the  above  types)  leading
+          from A to B.
+
+       Amounts for which no applicable market price can be found, are not con-
+       verted.
+
+   --infer-value: market prices from transactions
+       (experimental)
+
+       Normally, market value in hledger is fully controlled by, and requires,
+       P directives in your journal.  Since adding and updating those can be a
+       chore, and since transactions usually take place  at  close  to  market
+       value, why not use the recorded transaction prices as additional market
+       prices (as Ledger does) ?  We could produce value reports without need-
+       ing P directives at all.
+
+       Adding  the  --infer-value  flag to -V, -X or --value enables this.  So
+       for example, hledger bs -V --infer-value will get  market  prices  both
+       from P directives and from transactions.
+
+       There is a downside: value reports can sometimes be affected in confus-
+       ing/undesired ways by your journal entries.  If this  happens  to  you,
+       read all of this Valuation section carefully, and try adding --debug or
+       --debug=2 to troubleshoot.
+
+       --infer-value can infer market prices from:
+
+       o multicommodity transactions with explicit prices (@/@@)
+
+       o multicommodity transactions with implicit prices (no @, two  commodi-
+         ties,  unbalanced).   (With  these,  the  order  of postings matters.
+         hledger print -x can be useful for troubleshooting.)
+
+       o but not, currently, from "more correct"  multicommodity  transactions
+         (no @, multiple commodities, balanced).
+
+   Valuation commodity
+       (experimental)
+
+       When you specify a valuation commodity (-X COMM or --value TYPE,COMM):
+       hledger  will convert all amounts to COMM, wherever it can find a suit-
+       able market price (including by reversing or chaining prices).
+
+       When you leave the  valuation  commodity  unspecified  (-V  or  --value
+       TYPE):
+       For  each  commodity  A, hledger picks a default valuation commodity as
+       follows, in this order of preference:
+
+       1. The price commodity from the latest P-declared market price for A on
+          or before valuation date.
+
+       2. The price commodity from the latest P-declared market price for A on
+          any date.  (Allows conversion to proceed  when  there  are  inferred
+          prices before the valuation date.)
+
+       3. If  there are no P directives at all (any commodity or date) and the
+          --infer-value flag is used: the  price  commodity  from  the  latest
+          transaction-inferred price for A on or before valuation date.
+
+       This means:
+
+       o If  you  have  P directives, they determine which commodities -V will
+         convert, and to what.
+
+       o If you have no P directives, and use the --infer-value flag, transac-
+         tion prices determine it.
+
+       Amounts  for  which  no  valuation  commodity can be found are not con-
+       verted.
+
+   Simple valuation examples
+       Here are some quick examples of -V:
+
               ; one euro is worth this many dollars from nov 1
               P 2016/11/01 EUR $1.10
 
@@ -1239,42 +1332,13 @@
               $ hledger -f t.j bal -N euros -V -e 2016/11/4
                            $110.00  assets:euros
 
-       What  are they worth after 2016/12/21 ?  (no report end date specified,
+       What are they worth after 2016/12/21 ?  (no report end date  specified,
        defaults to today)
 
               $ hledger -f t.j bal -N euros -V
                            $103.00  assets:euros
 
-   -X: Market value in specified commodity
-       The -X/--exchange option is like -V, except  it  specifies  the  target
-       commodity  you  would  like  to  convert  to.   (It  is  equivalent  to
-       --value=now,COMM or --value=end,COMM.)
-
-   Market prices
-       To convert a commodity A to commodity B, hledger looks for  a  suitable
-       market  price  (exchange  rate) in the following ways, in this order of
-       preference:
-
-       1. a declared market price - the latest P directive specifying the  ex-
-          change rate from A to B, dated on or before the valuation date.
-
-       2. a  transaction-implied  market  price  - a market price matching the
-          transaction price used in the latest transaction  where  A  is  con-
-          verted  to B, dated on or before the valuation date.  (since hledger
-          1.18; experimental)
-
-       3. a reverse declared market price - calculated by inverting a declared
-          market price from B to A.
-
-       4. a reverse transaction-implied market price - calculated by inverting
-          a transaction-implied market price from B to A.
-
-       5. an indirect market price -  calculated  by  combining  the  shortest
-          chain of market prices (any of the above types) leading from A to B.
-
    --value: Flexible valuation
-       (experimental, added 201905)
-
        -B, -V and -X are special cases of the more general --value option:
 
                --value=TYPE[,COMM]  TYPE is cost, then, end, now or YYYY-MM-DD.
@@ -1286,52 +1350,39 @@
                                     - default valuation commodity (or COMM) using current market prices
                                     - default valuation commodity (or COMM) using market prices at some date
 
-       The TYPE part basically selects either "cost", or "market value" plus a
-       valuation date:
+       The TYPE part selects cost or value and valuation date:
 
        --value=cost
-              Convert amounts to cost, using the prices recorded  in  transac-
+              Convert  amounts  to cost, using the prices recorded in transac-
               tions.
 
        --value=then
-              Convert amounts to their value in a default valuation commodity,
-              using market prices on each posting's date.  This  is  currently
-              supported only by the print and register commands.
+              Convert amounts to their value in the default valuation  commod-
+              ity,  using  market prices on each posting's date.  This is cur-
+              rently supported only by the print and register commands.
 
        --value=end
-              Convert amounts to their value in a default valuation commodity,
-              using market prices on the last day of the report period (or  if
-              unspecified, the journal's end date); or in multiperiod reports,
-              market prices on the last day of each subperiod.
+              Convert amounts to their value in the default valuation  commod-
+              ity,  using  market  prices on the last day of the report period
+              (or if unspecified, the journal's end date); or  in  multiperiod
+              reports, market prices on the last day of each subperiod.
 
        --value=now
-              Convert amounts to their value in  default  valuation  commodity
-              using current market prices (as of when report is generated).
+              Convert  amounts to their value in the default valuation commod-
+              ity using current market prices (as of  when  report  is  gener-
+              ated).
 
        --value=YYYY-MM-DD
-              Convert  amounts  to  their value in default valuation commodity
-              using market prices on this date.
-
-       The default valuation commodity is the commodity mentioned in the  most
-       recent applicable market price declaration.  When all your price decla-
-       rations lead to a single home currency, this will usually do  what  you
-       want.
+              Convert  amounts to their value in the default valuation commod-
+              ity using market prices on this date.
 
        To select a different valuation commodity, add the optional ,COMM part:
-       a comma, then the  target  commodity's  symbol.   Eg:  --value=now,EUR.
-       hledger will do its best to convert amounts to this commodity, using:
-
-       o declared prices (from source commodity to valuation commodity)
-
-       o reverse  prices  (declared prices from valuation to source commodity,
-         inverted)
-
-       o indirect prices (prices calculated from the  shortest  chain  of  de-
-         clared or reverse prices from source to valuation commodity)
-
-       in that order.
+       a  comma,  then  the  target  commodity's symbol.  Eg: --value=now,EUR.
+       hledger will do its best to convert amounts to this commodity, deducing
+       market prices as described above.
 
-       Here  are  some  examples  showing  the  effect of --value as seen with
+   More valuation examples
+       Here  are  some  examples  showing  the effect of --value, as seen with
        print:
 
               P 2000-01-01 A  1 B
@@ -1438,12 +1489,12 @@
                   a           0.50A
                   b          -0.50A
 
-   Effect of --value on reports
-       Here is a reference for how --value  currently  affects  each  part  of
-       hledger's  reports.  It's work in progress, but may be useful for trou-
-       bleshooting or reporting bugs.  See also the definitions and notes  be-
-       low.   If  you find problems, please report them, ideally with a repro-
-       ducible example.  Related: #329, #1083.
+   Effect of valuation on reports
+       Here is a reference for how valuation is supposed to affect  each  part
+       of  hledger's  reports  (and  a  glossary).  (It's wide, you'll have to
+       scroll sideways.) It may be useful when troubleshooting.  If  you  find
+       problems, please report them, ideally with a reproducible example.  Re-
+       lated: #329, #1083.
 
        Report type    -B,            -V, -X         --value=then    --value=end    --value=DATE,
                       --value=cost                                                 --value=now
@@ -1492,9 +1543,6 @@
        (with report   postings be-   fore  report                   fore  report   report start
        interval and   fore  report   start                          start
        -H)            start
-
-
-
        budget         like    bal-   like    bal-   not supported   like    bal-   like balances
        amounts with   ances          ances                          ances
        --budget
@@ -1514,7 +1562,7 @@
                       totals         totals                         totals         tals
 
 
-       Additional notes
+       Glossary:
 
        cost   calculated using price(s) recorded in the transaction(s).
 
@@ -3231,4 +3279,4 @@
 
 
 
-hledger 1.18                       June 2020                        hledger(1)
+hledger 1.18.1                     June 2020                        hledger(1)
diff --git a/embeddedfiles/hledger_csv.5 b/embeddedfiles/hledger_csv.5
--- a/embeddedfiles/hledger_csv.5
+++ b/embeddedfiles/hledger_csv.5
@@ -1,6 +1,6 @@
 .\"t
 
-.TH "hledger_csv" "5" "June 2020" "hledger 1.18" "hledger User Manuals"
+.TH "hledger_csv" "5" "June 2020" "hledger 1.18.1" "hledger User Manuals"
 
 
 
@@ -961,7 +961,7 @@
 .PP
 A posting amount can be set in one of these ways:
 .IP \[bu] 2
-by assigning (with a fields list or field assigment) to
+by assigning (with a fields list or field assignment) to
 \f[C]amountN\f[R] (posting N\[aq]s amount) or \f[C]amount\f[R] (posting
 1\[aq]s amount)
 .IP \[bu] 2
diff --git a/embeddedfiles/hledger_csv.info b/embeddedfiles/hledger_csv.info
--- a/embeddedfiles/hledger_csv.info
+++ b/embeddedfiles/hledger_csv.info
@@ -3,8 +3,8 @@
 
 File: hledger_csv.info,  Node: Top,  Next: EXAMPLES,  Up: (dir)
 
-hledger_csv(5) hledger 1.18
-***************************
+hledger_csv(5) hledger 1.18.1
+*****************************
 
 CSV - how hledger reads CSV data, and the CSV rules file format
 
@@ -907,7 +907,7 @@
 
 A posting amount can be set in one of these ways:
 
-   * by assigning (with a fields list or field assigment) to 'amountN'
+   * by assigning (with a fields list or field assignment) to 'amountN'
      (posting N's amount) or 'amount' (posting 1's amount)
 
    * by assigning to 'amountN-in' and 'amountN-out' (or 'amount-in' and
@@ -1036,74 +1036,74 @@
 
 Tag Table:
 Node: Top72
-Node: EXAMPLES2174
-Ref: #examples2280
-Node: Basic2488
-Ref: #basic2588
-Node: Bank of Ireland3130
-Ref: #bank-of-ireland3265
-Node: Amazon4727
-Ref: #amazon4845
-Node: Paypal6564
-Ref: #paypal6658
-Node: CSV RULES14302
-Ref: #csv-rules14411
-Node: skip14687
-Ref: #skip14780
-Node: fields15155
-Ref: #fields15277
-Node: Transaction field names16442
-Ref: #transaction-field-names16602
-Node: Posting field names16713
-Ref: #posting-field-names16865
-Node: account16935
-Ref: #account17051
-Node: amount17588
-Ref: #amount17719
-Node: currency18826
-Ref: #currency18961
-Node: balance19167
-Ref: #balance19301
-Node: comment19618
-Ref: #comment19735
-Node: field assignment19898
-Ref: #field-assignment20041
-Node: separator20859
-Ref: #separator20988
-Node: if21399
-Ref: #if21501
-Node: end23657
-Ref: #end23763
-Node: date-format23987
-Ref: #date-format24119
-Node: newest-first24868
-Ref: #newest-first25006
-Node: include25689
-Ref: #include25818
-Node: balance-type26262
-Ref: #balance-type26382
-Node: TIPS27082
-Ref: #tips27164
-Node: Rapid feedback27420
-Ref: #rapid-feedback27537
-Node: Valid CSV27997
-Ref: #valid-csv28127
-Node: File Extension28319
-Ref: #file-extension28471
-Node: Reading multiple CSV files28881
-Ref: #reading-multiple-csv-files29066
-Node: Valid transactions29307
-Ref: #valid-transactions29485
-Node: Deduplicating importing30113
-Ref: #deduplicating-importing30292
-Node: Setting amounts31325
-Ref: #setting-amounts31494
-Node: Setting currency/commodity32480
-Ref: #setting-currencycommodity32672
-Node: Referencing other fields33475
-Ref: #referencing-other-fields33675
-Node: How CSV rules are evaluated34572
-Ref: #how-csv-rules-are-evaluated34745
+Node: EXAMPLES2178
+Ref: #examples2284
+Node: Basic2492
+Ref: #basic2592
+Node: Bank of Ireland3134
+Ref: #bank-of-ireland3269
+Node: Amazon4731
+Ref: #amazon4849
+Node: Paypal6568
+Ref: #paypal6662
+Node: CSV RULES14306
+Ref: #csv-rules14415
+Node: skip14691
+Ref: #skip14784
+Node: fields15159
+Ref: #fields15281
+Node: Transaction field names16446
+Ref: #transaction-field-names16606
+Node: Posting field names16717
+Ref: #posting-field-names16869
+Node: account16939
+Ref: #account17055
+Node: amount17592
+Ref: #amount17723
+Node: currency18830
+Ref: #currency18965
+Node: balance19171
+Ref: #balance19305
+Node: comment19622
+Ref: #comment19739
+Node: field assignment19902
+Ref: #field-assignment20045
+Node: separator20863
+Ref: #separator20992
+Node: if21403
+Ref: #if21505
+Node: end23661
+Ref: #end23767
+Node: date-format23991
+Ref: #date-format24123
+Node: newest-first24872
+Ref: #newest-first25010
+Node: include25693
+Ref: #include25822
+Node: balance-type26266
+Ref: #balance-type26386
+Node: TIPS27086
+Ref: #tips27168
+Node: Rapid feedback27424
+Ref: #rapid-feedback27541
+Node: Valid CSV28001
+Ref: #valid-csv28131
+Node: File Extension28323
+Ref: #file-extension28475
+Node: Reading multiple CSV files28885
+Ref: #reading-multiple-csv-files29070
+Node: Valid transactions29311
+Ref: #valid-transactions29489
+Node: Deduplicating importing30117
+Ref: #deduplicating-importing30296
+Node: Setting amounts31329
+Ref: #setting-amounts31498
+Node: Setting currency/commodity32485
+Ref: #setting-currencycommodity32677
+Node: Referencing other fields33480
+Ref: #referencing-other-fields33680
+Node: How CSV rules are evaluated34577
+Ref: #how-csv-rules-are-evaluated34750
 
 End Tag Table
 
diff --git a/embeddedfiles/hledger_csv.txt b/embeddedfiles/hledger_csv.txt
--- a/embeddedfiles/hledger_csv.txt
+++ b/embeddedfiles/hledger_csv.txt
@@ -710,7 +710,7 @@
    Setting amounts
        A posting amount can be set in one of these ways:
 
-       o by assigning (with a fields  list  or  field  assigment)  to  amountN
+       o by assigning (with a fields list  or  field  assignment)  to  amountN
          (posting N's amount) or amount (posting 1's amount)
 
        o by  assigning to amountN-in and amountN-out (or amount-in and amount-
@@ -852,4 +852,4 @@
 
 
 
-hledger 1.18                       June 2020                    hledger_csv(5)
+hledger 1.18.1                     June 2020                    hledger_csv(5)
diff --git a/embeddedfiles/hledger_journal.5 b/embeddedfiles/hledger_journal.5
--- a/embeddedfiles/hledger_journal.5
+++ b/embeddedfiles/hledger_journal.5
@@ -1,6 +1,6 @@
 .\"t
 
-.TH "hledger_journal" "5" "June 2020" "hledger 1.18" "hledger User Manuals"
+.TH "hledger_journal" "5" "June 2020" "hledger 1.18.1" "hledger User Manuals"
 
 
 
@@ -1143,15 +1143,20 @@
 If the file path does not begin with a slash, it is relative to the
 current file\[aq]s folder.
 .PP
-It may contain glob patterns to match multiple files, eg:
+A tilde means home directory, eg: \f[C]include \[ti]/main.journal\f[R].
+.PP
+The path may contain glob patterns to match multiple files, eg:
 \f[C]include *.journal\f[R].
 .PP
-Or a tilde, meaning home directory:
-\f[C]include \[ti]/main.journal\f[R].
+There is limited support for recursive wildcards: \f[C]**/\f[R] (the
+slash is required) matches 0 or more subdirectories.
+It\[aq]s not super convenient since you have to avoid include cycles and
+including directories, but this can be done, eg:
+\f[C]include */**/*.journal\f[R].
 .PP
-It may also be prefixed to force a specific file format, overriding the
-file extension (as described in hledger.1 -> Input files):
-\f[C]include timedot:\[ti]/notes/2020*.md\f[R].
+The path may also be prefixed to force a specific file format,
+overriding the file extension (as described in hledger.1 -> Input
+files): \f[C]include timedot:\[ti]/notes/2020*.md\f[R].
 .SS Default year
 .PP
 You can set a default year to be used for subsequent dates which
diff --git a/embeddedfiles/hledger_journal.info b/embeddedfiles/hledger_journal.info
--- a/embeddedfiles/hledger_journal.info
+++ b/embeddedfiles/hledger_journal.info
@@ -4,8 +4,8 @@
 
 File: hledger_journal.info,  Node: Top,  Up: (dir)
 
-hledger_journal(5) hledger 1.18
-*******************************
+hledger_journal(5) hledger 1.18.1
+*********************************
 
 Journal - hledger's default file format, representing a General Journal
 
@@ -1023,15 +1023,20 @@
    If the file path does not begin with a slash, it is relative to the
 current file's folder.
 
-   It may contain glob patterns to match multiple files, eg: 'include
-*.journal'.
+   A tilde means home directory, eg: 'include ~/main.journal'.
 
-   Or a tilde, meaning home directory: 'include ~/main.journal'.
+   The path may contain glob patterns to match multiple files, eg:
+'include *.journal'.
 
-   It may also be prefixed to force a specific file format, overriding
-the file extension (as described in hledger.1 -> Input files): 'include
-timedot:~/notes/2020*.md'.
+   There is limited support for recursive wildcards: '**/' (the slash is
+required) matches 0 or more subdirectories.  It's not super convenient
+since you have to avoid include cycles and including directories, but
+this can be done, eg: 'include */**/*.journal'.
 
+   The path may also be prefixed to force a specific file format,
+overriding the file extension (as described in hledger.1 -> Input
+files): 'include timedot:~/notes/2020*.md'.
+
 
 File: hledger_journal.info,  Node: Default year,  Next: Declaring commodities,  Prev: Including other files,  Up: Directives
 
@@ -1823,124 +1828,124 @@
 
 Tag Table:
 Node: Top76
-Node: Transactions1869
-Ref: #transactions1961
-Node: Dates3245
-Ref: #dates3344
-Node: Simple dates3409
-Ref: #simple-dates3535
-Node: Secondary dates4044
-Ref: #secondary-dates4198
-Node: Posting dates5534
-Ref: #posting-dates5663
-Node: Status7035
-Ref: #status7156
-Node: Description8864
-Ref: #description8998
-Node: Payee and note9318
-Ref: #payee-and-note9432
-Node: Comments9767
-Ref: #comments9893
-Node: Tags11087
-Ref: #tags11202
-Node: Postings12595
-Ref: #postings12723
-Node: Virtual postings13749
-Ref: #virtual-postings13866
-Node: Account names15171
-Ref: #account-names15312
-Node: Amounts15799
-Ref: #amounts15938
-Node: Digit group marks17046
-Ref: #digit-group-marks17194
-Node: Amount display style18132
-Ref: #amount-display-style18286
-Node: Transaction prices19723
-Ref: #transaction-prices19895
-Node: Lot prices and lot dates22227
-Ref: #lot-prices-and-lot-dates22424
-Node: Balance assertions22912
-Ref: #balance-assertions23098
-Node: Assertions and ordering24131
-Ref: #assertions-and-ordering24319
-Node: Assertions and included files25019
-Ref: #assertions-and-included-files25262
-Node: Assertions and multiple -f options25595
-Ref: #assertions-and-multiple--f-options25851
-Node: Assertions and commodities25983
-Ref: #assertions-and-commodities26215
-Node: Assertions and prices27372
-Ref: #assertions-and-prices27586
-Node: Assertions and subaccounts28026
-Ref: #assertions-and-subaccounts28255
-Node: Assertions and virtual postings28579
-Ref: #assertions-and-virtual-postings28821
-Node: Assertions and precision28963
-Ref: #assertions-and-precision29156
-Node: Balance assignments29423
-Ref: #balance-assignments29597
-Node: Balance assignments and prices30761
-Ref: #balance-assignments-and-prices30933
-Node: Directives31157
-Ref: #directives31316
-Node: Directives and multiple files37007
-Ref: #directives-and-multiple-files37190
-Node: Comment blocks37854
-Ref: #comment-blocks38037
-Node: Including other files38213
-Ref: #including-other-files38393
-Node: Default year39044
-Ref: #default-year39213
-Node: Declaring commodities39620
-Ref: #declaring-commodities39803
-Node: Default commodity41609
-Ref: #default-commodity41795
-Node: Declaring market prices42684
-Ref: #declaring-market-prices42879
-Node: Declaring accounts43736
-Ref: #declaring-accounts43922
-Node: Account comments44847
-Ref: #account-comments45010
-Node: Account subdirectives45434
-Ref: #account-subdirectives45629
-Node: Account types45942
-Ref: #account-types46126
-Node: Account display order47765
-Ref: #account-display-order47935
-Node: Rewriting accounts49086
-Ref: #rewriting-accounts49271
-Node: Basic aliases50028
-Ref: #basic-aliases50174
-Node: Regex aliases50878
-Ref: #regex-aliases51050
-Node: Combining aliases51768
-Ref: #combining-aliases51961
-Node: Aliases and multiple files53237
-Ref: #aliases-and-multiple-files53446
-Node: end aliases54025
-Ref: #end-aliases54182
-Node: Default parent account54283
-Ref: #default-parent-account54451
-Node: Periodic transactions55335
-Ref: #periodic-transactions55510
-Node: Periodic rule syntax57382
-Ref: #periodic-rule-syntax57588
-Node: Two spaces between period expression and description!58292
-Ref: #two-spaces-between-period-expression-and-description58611
-Node: Forecasting with periodic transactions59295
-Ref: #forecasting-with-periodic-transactions59600
-Node: Budgeting with periodic transactions61655
-Ref: #budgeting-with-periodic-transactions61894
-Node: Auto postings62343
-Ref: #auto-postings62483
-Node: Auto postings and multiple files64662
-Ref: #auto-postings-and-multiple-files64866
-Node: Auto postings and dates65075
-Ref: #auto-postings-and-dates65349
-Node: Auto postings and transaction balancing / inferred amounts / balance assertions65524
-Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions65875
-Node: Auto posting tags66217
-Ref: #auto-posting-tags66432
+Node: Transactions1873
+Ref: #transactions1965
+Node: Dates3249
+Ref: #dates3348
+Node: Simple dates3413
+Ref: #simple-dates3539
+Node: Secondary dates4048
+Ref: #secondary-dates4202
+Node: Posting dates5538
+Ref: #posting-dates5667
+Node: Status7039
+Ref: #status7160
+Node: Description8868
+Ref: #description9002
+Node: Payee and note9322
+Ref: #payee-and-note9436
+Node: Comments9771
+Ref: #comments9897
+Node: Tags11091
+Ref: #tags11206
+Node: Postings12599
+Ref: #postings12727
+Node: Virtual postings13753
+Ref: #virtual-postings13870
+Node: Account names15175
+Ref: #account-names15316
+Node: Amounts15803
+Ref: #amounts15942
+Node: Digit group marks17050
+Ref: #digit-group-marks17198
+Node: Amount display style18136
+Ref: #amount-display-style18290
+Node: Transaction prices19727
+Ref: #transaction-prices19899
+Node: Lot prices and lot dates22231
+Ref: #lot-prices-and-lot-dates22428
+Node: Balance assertions22916
+Ref: #balance-assertions23102
+Node: Assertions and ordering24135
+Ref: #assertions-and-ordering24323
+Node: Assertions and included files25023
+Ref: #assertions-and-included-files25266
+Node: Assertions and multiple -f options25599
+Ref: #assertions-and-multiple--f-options25855
+Node: Assertions and commodities25987
+Ref: #assertions-and-commodities26219
+Node: Assertions and prices27376
+Ref: #assertions-and-prices27590
+Node: Assertions and subaccounts28030
+Ref: #assertions-and-subaccounts28259
+Node: Assertions and virtual postings28583
+Ref: #assertions-and-virtual-postings28825
+Node: Assertions and precision28967
+Ref: #assertions-and-precision29160
+Node: Balance assignments29427
+Ref: #balance-assignments29601
+Node: Balance assignments and prices30765
+Ref: #balance-assignments-and-prices30937
+Node: Directives31161
+Ref: #directives31320
+Node: Directives and multiple files37011
+Ref: #directives-and-multiple-files37194
+Node: Comment blocks37858
+Ref: #comment-blocks38041
+Node: Including other files38217
+Ref: #including-other-files38397
+Node: Default year39321
+Ref: #default-year39490
+Node: Declaring commodities39897
+Ref: #declaring-commodities40080
+Node: Default commodity41886
+Ref: #default-commodity42072
+Node: Declaring market prices42961
+Ref: #declaring-market-prices43156
+Node: Declaring accounts44013
+Ref: #declaring-accounts44199
+Node: Account comments45124
+Ref: #account-comments45287
+Node: Account subdirectives45711
+Ref: #account-subdirectives45906
+Node: Account types46219
+Ref: #account-types46403
+Node: Account display order48042
+Ref: #account-display-order48212
+Node: Rewriting accounts49363
+Ref: #rewriting-accounts49548
+Node: Basic aliases50305
+Ref: #basic-aliases50451
+Node: Regex aliases51155
+Ref: #regex-aliases51327
+Node: Combining aliases52045
+Ref: #combining-aliases52238
+Node: Aliases and multiple files53514
+Ref: #aliases-and-multiple-files53723
+Node: end aliases54302
+Ref: #end-aliases54459
+Node: Default parent account54560
+Ref: #default-parent-account54728
+Node: Periodic transactions55612
+Ref: #periodic-transactions55787
+Node: Periodic rule syntax57659
+Ref: #periodic-rule-syntax57865
+Node: Two spaces between period expression and description!58569
+Ref: #two-spaces-between-period-expression-and-description58888
+Node: Forecasting with periodic transactions59572
+Ref: #forecasting-with-periodic-transactions59877
+Node: Budgeting with periodic transactions61932
+Ref: #budgeting-with-periodic-transactions62171
+Node: Auto postings62620
+Ref: #auto-postings62760
+Node: Auto postings and multiple files64939
+Ref: #auto-postings-and-multiple-files65143
+Node: Auto postings and dates65352
+Ref: #auto-postings-and-dates65626
+Node: Auto postings and transaction balancing / inferred amounts / balance assertions65801
+Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions66152
+Node: Auto posting tags66494
+Ref: #auto-posting-tags66709
 
 End Tag Table
 
diff --git a/embeddedfiles/hledger_journal.txt b/embeddedfiles/hledger_journal.txt
--- a/embeddedfiles/hledger_journal.txt
+++ b/embeddedfiles/hledger_journal.txt
@@ -792,18 +792,23 @@
        If  the  file  path  does not begin with a slash, it is relative to the
        current file's folder.
 
-       It may contain glob patterns  to  match  multiple  files,  eg:  include
+       A tilde means home directory, eg: include ~/main.journal.
+
+       The path may contain glob patterns to match multiple files, eg: include
        *.journal.
 
-       Or a tilde, meaning home directory: include ~/main.journal.
+       There is limited support for recursive wildcards: **/ (the slash is re-
+       quired) matches 0 or more subdirectories.  It's  not  super  convenient
+       since  you  have to avoid include cycles and including directories, but
+       this can be done, eg: include */**/*.journal.
 
-       It may also be prefixed to force a specific file format, overriding the
-       file extension (as described in  hledger.1  ->  Input  files):  include
-       timedot:~/notes/2020*.md.
+       The path may also be prefixed to force a specific file format, overrid-
+       ing  the file extension (as described in hledger.1 -> Input files): in-
+       clude timedot:~/notes/2020*.md.
 
    Default year
-       You  can set a default year to be used for subsequent dates which don't
-       specify a year.  This is a line beginning with Y followed by the  year.
+       You can set a default year to be used for subsequent dates which  don't
+       specify  a year.  This is a line beginning with Y followed by the year.
        Eg:
 
               Y2009  ; set default year to 2009
@@ -825,19 +830,19 @@
    Declaring commodities
        The commodity directive has several functions:
 
-       1. It  declares  commodities which may be used in the journal.  This is
+       1. It declares commodities which may be used in the journal.   This  is
           currently not enforced, but can serve as documentation.
 
-       2. It declares what decimal mark character (period or comma) to  expect
-          when  parsing  input  -  useful to disambiguate international number
-          formats in your data.  (Without this, hledger will parse both  1,000
+       2. It  declares what decimal mark character (period or comma) to expect
+          when parsing input - useful  to  disambiguate  international  number
+          formats  in your data.  (Without this, hledger will parse both 1,000
           and 1.000 as 1).
 
-       3. It  declares the amount display style to use in output - decimal and
+       3. It declares the amount display style to use in output - decimal  and
           digit group marks, number of decimal places, symbol placement etc.
 
-       You are likely to run into one of the problems solved by commodity  di-
-       rectives,  sooner or later, so it's a good idea to just always use them
+       You  are likely to run into one of the problems solved by commodity di-
+       rectives, sooner or later, so it's a good idea to just always use  them
        to declare your commodities.
 
        A commodity directive is just the word commodity followed by an amount.
@@ -850,8 +855,8 @@
               ; separating thousands with comma.
               commodity 1,000.0000 AAAA
 
-       or  on  multiple lines, using the "format" subdirective.  (In this case
-       the commodity symbol appears twice and  should  be  the  same  in  both
+       or on multiple lines, using the "format" subdirective.  (In  this  case
+       the  commodity  symbol  appears  twice  and  should be the same in both
        places.):
 
               ; commodity SYMBOL
@@ -864,22 +869,22 @@
                 format INR 1,00,00,000.00
 
        The quantity of the amount does not matter; only the format is signifi-
-       cant.  The number must include a decimal mark: either  a  period  or  a
+       cant.   The  number  must  include a decimal mark: either a period or a
        comma, followed by 0 or more decimal digits.
 
-       Note  hledger  normally  uses  banker's rounding, so 0.5 displayed with
+       Note hledger normally uses banker's rounding,  so  0.5  displayed  with
        zero decimal digits is "0".  (More at Amount display style.)
 
    Default commodity
-       The D directive sets a default commodity, to be used for amounts  with-
+       The  D directive sets a default commodity, to be used for amounts with-
        out a commodity symbol (ie, plain numbers).  This commodity will be ap-
        plied to all subsequent commodity-less amounts, or until the next D di-
        rective.  (Note, this is different from Ledger's D.)
 
-       For  compatibility/historical reasons, D also acts like a commodity di-
+       For compatibility/historical reasons, D also acts like a commodity  di-
        rective, setting the commodity's display style (for output) and decimal
        mark (for parsing input).  As with commodity, the amount must always be
-       written with a decimal mark (period or comma).  If both directives  are
+       written  with a decimal mark (period or comma).  If both directives are
        used, commodity's style takes precedence.
 
        The syntax is D AMOUNT.  Eg:
@@ -893,9 +898,9 @@
                 b
 
    Declaring market prices
-       The  P directive declares a market price, which is an exchange rate be-
-       tween two commodities on a certain date.  (In Ledger, they  are  called
-       "historical  prices".)  These are often obtained from a stock exchange,
+       The P directive declares a market price, which is an exchange rate  be-
+       tween  two  commodities on a certain date.  (In Ledger, they are called
+       "historical prices".) These are often obtained from a  stock  exchange,
        cryptocurrency exchange, or the foreign exchange market.
 
        Here is the format:
@@ -906,16 +911,16 @@
 
        o COMMODITYA is the symbol of the commodity being priced
 
-       o COMMODITYBAMOUNT is an amount (symbol and quantity) in a second  com-
+       o COMMODITYBAMOUNT  is an amount (symbol and quantity) in a second com-
          modity, giving the price in commodity B of one unit of commodity A.
 
-       These  two  market price directives say that one euro was worth 1.35 US
+       These two market price directives say that one euro was worth  1.35  US
        dollars during 2009, and $1.40 from 2010 onward:
 
               P 2009/1/1 EUR $1.35
               P 2010/1/1 EUR $1.40
 
-       The -V, -X and --value flags use these market  prices  to  show  amount
+       The  -V,  -X  and  --value flags use these market prices to show amount
        values in another commodity.  See Valuation.
 
    Declaring accounts
@@ -925,20 +930,20 @@
        o They can document your intended chart of accounts, providing a refer-
          ence.
 
-       o They  can  store  extra  information about accounts (account numbers,
+       o They can store extra information  about  accounts  (account  numbers,
          notes, etc.)
 
-       o They can help hledger know your accounts'  types  (asset,  liability,
-         equity,  revenue,  expense), useful for reports like balancesheet and
+       o They  can  help  hledger know your accounts' types (asset, liability,
+         equity, revenue, expense), useful for reports like  balancesheet  and
          incomestatement.
 
-       o They control account display order in  reports,  allowing  non-alpha-
+       o They  control  account  display order in reports, allowing non-alpha-
          betic sorting (eg Revenues to appear above Expenses).
 
-       o They  help  with account name completion in the add command, hledger-
+       o They help with account name completion in the add  command,  hledger-
          iadd, hledger-web, ledger-mode etc.
 
-       The simplest form is just the word account followed by a  hledger-style
+       The  simplest form is just the word account followed by a hledger-style
        account name, eg:
 
               account assets:bank:checking
@@ -946,7 +951,7 @@
    Account comments
        Comments, beginning with a semicolon, can be added:
 
-       o on  the  same line, after two or more spaces (because ; is allowed in
+       o on the same line, after two or more spaces (because ; is  allowed  in
          account names)
 
        o on the next lines, indented
@@ -960,7 +965,7 @@
        Same-line comments are not supported by Ledger, or hledger <1.13.
 
    Account subdirectives
-       We also allow (and ignore) Ledger-style  indented  subdirectives,  just
+       We  also  allow  (and ignore) Ledger-style indented subdirectives, just
        for compatibility.:
 
               account assets:bank:checking
@@ -973,18 +978,18 @@
                 [LEDGER-STYLE SUBDIRECTIVES, IGNORED]
 
    Account types
-       hledger  recognises  five types (or classes) of account: Asset, Liabil-
-       ity, Equity, Revenue, Expense.  This is used by a few  accounting-aware
+       hledger recognises five types (or classes) of account:  Asset,  Liabil-
+       ity,  Equity, Revenue, Expense.  This is used by a few accounting-aware
        reports such as balancesheet, incomestatement and cashflow.
 
    Auto-detected account types
        If you name your top-level accounts with some variation of assets, lia-
-       bilities/debts, equity, revenues/income, or expenses, their  types  are
+       bilities/debts,  equity,  revenues/income, or expenses, their types are
        detected automatically.
 
    Account types declared with tags
-       More  generally,  you can declare an account's type with an account di-
-       rective, by writing a type: tag in a comment, followed by  one  of  the
+       More generally, you can declare an account's type with an  account  di-
+       rective,  by  writing  a type: tag in a comment, followed by one of the
        words Asset, Liability, Equity, Revenue, Expense, or one of the letters
        ALERX (case insensitive):
 
@@ -995,8 +1000,8 @@
               account expenses     ; type:Expense
 
    Account types declared with account type codes
-       Or, you can write one of those letters separated from the account  name
-       by  two  or  more spaces, but this should probably be considered depre-
+       Or,  you can write one of those letters separated from the account name
+       by two or more spaces, but this should probably  be  considered  depre-
        cated as of hledger 1.13:
 
               account assets       A
@@ -1006,7 +1011,7 @@
               account expenses     X
 
    Overriding auto-detected types
-       If you ever override the types of those auto-detected  english  account
+       If  you  ever override the types of those auto-detected english account
        names mentioned above, you might need to help the reports a bit.  Eg:
 
               ; make "liabilities" not have the liability type - who knows why
@@ -1017,8 +1022,8 @@
               account -            ; type:L
 
    Account display order
-       Account  directives also set the order in which accounts are displayed,
-       eg in reports, the hledger-ui  accounts  screen,  and  the  hledger-web
+       Account directives also set the order in which accounts are  displayed,
+       eg  in  reports,  the  hledger-ui  accounts screen, and the hledger-web
        sidebar.  By default accounts are listed in alphabetical order.  But if
        you have these account directives in the journal:
 
@@ -1040,20 +1045,20 @@
 
        Undeclared accounts, if any, are displayed last, in alphabetical order.
 
-       Note  that  sorting  is  done at each level of the account tree (within
-       each group of sibling accounts under the same parent).  And  currently,
+       Note that sorting is done at each level of  the  account  tree  (within
+       each  group of sibling accounts under the same parent).  And currently,
        this directive:
 
               account other:zoo
 
-       would  influence the position of zoo among other's subaccounts, but not
+       would influence the position of zoo among other's subaccounts, but  not
        the position of other among the top-level accounts.  This means:
 
-       o you will sometimes declare parent accounts (eg account  other  above)
+       o you  will  sometimes declare parent accounts (eg account other above)
          that you don't intend to post to, just to customize their display or-
          der
 
-       o sibling accounts stay together (you couldn't display x:y  in  between
+       o sibling  accounts  stay together (you couldn't display x:y in between
          a:b and a:c).
 
    Rewriting accounts
@@ -1071,14 +1076,14 @@
        o customising reports
 
        Account aliases also rewrite account names in account directives.  They
-       do  not  affect account names being entered via hledger add or hledger-
+       do not affect account names being entered via hledger add  or  hledger-
        web.
 
        See also Rewrite account names.
 
    Basic aliases
-       To set an account alias, use the alias directive in your journal  file.
-       This  affects all subsequent journal entries in the current file or its
+       To  set an account alias, use the alias directive in your journal file.
+       This affects all subsequent journal entries in the current file or  its
        included files.  The spaces around the = are optional:
 
               alias OLD = NEW
@@ -1086,49 +1091,49 @@
        Or, you can use the --alias 'OLD=NEW' option on the command line.  This
        affects all entries.  It's useful for trying out aliases interactively.
 
-       OLD  and  NEW  are case sensitive full account names.  hledger will re-
-       place any occurrence of the old account name with the new one.   Subac-
+       OLD and NEW are case sensitive full account names.   hledger  will  re-
+       place  any occurrence of the old account name with the new one.  Subac-
        counts are also affected.  Eg:
 
               alias checking = assets:bank:wells fargo:checking
               ; rewrites "checking" to "assets:bank:wells fargo:checking", or "checking:a" to "assets:bank:wells fargo:checking:a"
 
    Regex aliases
-       There  is  also a more powerful variant that uses a regular expression,
+       There is also a more powerful variant that uses a  regular  expression,
        indicated by the forward slashes:
 
               alias /REGEX/ = REPLACEMENT
 
        or --alias '/REGEX/=REPLACEMENT'.
 
-       REGEX is a case-insensitive regular expression.   Anywhere  it  matches
-       inside  an  account name, the matched part will be replaced by REPLACE-
-       MENT.  If REGEX contains parenthesised match groups, these can be  ref-
+       REGEX  is  a  case-insensitive regular expression.  Anywhere it matches
+       inside an account name, the matched part will be replaced  by  REPLACE-
+       MENT.   If REGEX contains parenthesised match groups, these can be ref-
        erenced by the usual numeric backreferences in REPLACEMENT.  Eg:
 
               alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3
               ; rewrites "assets:bank:wells fargo:checking" to  "assets:wells fargo checking"
 
-       Also  note that REPLACEMENT continues to the end of line (or on command
-       line, to end of option argument), so it  can  contain  trailing  white-
+       Also note that REPLACEMENT continues to the end of line (or on  command
+       line,  to  end  of  option argument), so it can contain trailing white-
        space.
 
    Combining aliases
-       You  can  define  as many aliases as you like, using journal directives
+       You can define as many aliases as you like,  using  journal  directives
        and/or command line options.
 
-       Recursive aliases - where an account name is rewritten  by  one  alias,
-       then  by  another  alias, and so on - are allowed.  Each alias sees the
+       Recursive  aliases  -  where an account name is rewritten by one alias,
+       then by another alias, and so on - are allowed.  Each  alias  sees  the
        effect of previously applied aliases.
 
-       In such cases it can be important to understand which aliases  will  be
-       applied  and  in  which order.  For (each account name in) each journal
+       In  such  cases it can be important to understand which aliases will be
+       applied and in which order.  For (each account name  in)  each  journal
        entry, we apply:
 
-       1. alias directives preceding the journal entry, most  recently  parsed
+       1. alias  directives  preceding the journal entry, most recently parsed
           first (ie, reading upward from the journal entry, bottom to top)
 
-       2. --alias  options,  in  the  order  they appeared on the command line
+       2. --alias options, in the order they  appeared  on  the  command  line
           (left to right).
 
        In other words, for (an account name in) a given journal entry:
@@ -1139,20 +1144,20 @@
 
        o aliases defined after/below the entry do not affect it.
 
-       This gives nearby aliases precedence over distant ones, and helps  pro-
-       vide  semantic stability - aliases will keep working the same way inde-
+       This  gives nearby aliases precedence over distant ones, and helps pro-
+       vide semantic stability - aliases will keep working the same way  inde-
        pendent of which files are being read and in which order.
 
-       In case of trouble, adding --debug=6 to  the  command  line  will  show
+       In  case  of  trouble,  adding  --debug=6 to the command line will show
        which aliases are being applied when.
 
    Aliases and multiple files
-       As  explained at Directives and multiple files, alias directives do not
+       As explained at Directives and multiple files, alias directives do  not
        affect parent or sibling files.  Eg in this command,
 
               hledger -f a.aliases -f b.journal
 
-       account aliases defined in a.aliases will not  affect  b.journal.   In-
+       account  aliases  defined  in a.aliases will not affect b.journal.  In-
        cluding the aliases doesn't work either:
 
               include a.aliases
@@ -1174,14 +1179,14 @@
               include c.journal  ; also affected
 
    end aliases
-       You can clear (forget) all  currently  defined  aliases  with  the  end
+       You  can  clear  (forget)  all  currently  defined aliases with the end
        aliases directive:
 
               end aliases
 
    Default parent account
-       You  can  specify  a  parent account which will be prepended to all ac-
-       counts within a section of the journal.  Use the apply account and  end
+       You can specify a parent account which will be  prepended  to  all  ac-
+       counts  within a section of the journal.  Use the apply account and end
        apply account directives like so:
 
               apply account home
@@ -1198,7 +1203,7 @@
                   home:food           $10
                   home:cash          $-10
 
-       If  end  apply  account  is omitted, the effect lasts to the end of the
+       If end apply account is omitted, the effect lasts to  the  end  of  the
        file.  Included files are also affected, eg:
 
               apply account business
@@ -1207,50 +1212,50 @@
               apply account personal
               include personal.journal
 
-       Prior to hledger 1.0, legacy account and end spellings were  also  sup-
+       Prior  to  hledger 1.0, legacy account and end spellings were also sup-
        ported.
 
-       A  default parent account also affects account directives.  It does not
-       affect account names being entered via hledger add or hledger-web.   If
-       account  aliases are present, they are applied after the default parent
+       A default parent account also affects account directives.  It does  not
+       affect  account names being entered via hledger add or hledger-web.  If
+       account aliases are present, they are applied after the default  parent
        account.
 
    Periodic transactions
-       Periodic transaction rules describe transactions that recur.  They  al-
-       low  hledger  to  generate  temporary  future transactions to help with
-       forecasting, so you don't have to write out each one  in  the  journal,
-       and  it's easy to try out different forecasts.  Secondly, they are also
+       Periodic  transaction rules describe transactions that recur.  They al-
+       low hledger to generate temporary  future  transactions  to  help  with
+       forecasting,  so  you  don't have to write out each one in the journal,
+       and it's easy to try out different forecasts.  Secondly, they are  also
        used to define the budgets shown in budget reports.
 
-       Periodic transactions can be a little tricky, so before you  use  them,
+       Periodic  transactions  can be a little tricky, so before you use them,
        read this whole section - or at least these tips:
 
-       1. Two  spaces  accidentally  added or omitted will cause you trouble -
+       1. Two spaces accidentally added or omitted will cause  you  trouble  -
           read about this below.
 
-       2. For troubleshooting, show the generated  transactions  with  hledger
-          print   --forecast  tag:generated  or  hledger  register  --forecast
+       2. For  troubleshooting,  show  the generated transactions with hledger
+          print  --forecast  tag:generated  or  hledger  register   --forecast
           tag:generated.
 
-       3. Forecasted transactions will begin only  after  the  last  non-fore-
+       3. Forecasted  transactions  will  begin  only after the last non-fore-
           casted transaction's date.
 
-       4. Forecasted  transactions  will  end 6 months from today, by default.
+       4. Forecasted transactions will end 6 months from  today,  by  default.
           See below for the exact start/end rules.
 
-       5. period expressions can be tricky.   Their  documentation  needs  im-
+       5. period  expressions  can  be  tricky.  Their documentation needs im-
           provement, but is worth studying.
 
-       6. Some  period  expressions  with a repeating interval must begin on a
-          natural boundary of that interval.  Eg in  weekly  from  DATE,  DATE
-          must  be a monday.  ~ weekly from 2019/10/1 (a tuesday) will give an
+       6. Some period expressions with a repeating interval must  begin  on  a
+          natural  boundary  of  that  interval.  Eg in weekly from DATE, DATE
+          must be a monday.  ~ weekly from 2019/10/1 (a tuesday) will give  an
           error.
 
        7. Other period expressions with an interval are automatically expanded
-          to  cover a whole number of that interval.  (This is done to improve
+          to cover a whole number of that interval.  (This is done to  improve
           reports, but it also affects periodic transactions.  Yes, it's a bit
-          inconsistent  with  the  above.)  Eg: ~ every 10th day of month from
-          2020/01, which is equivalent to ~  every  10th  day  of  month  from
+          inconsistent with the above.) Eg: ~ every 10th  day  of  month  from
+          2020/01,  which  is  equivalent  to  ~  every 10th day of month from
           2020/01/01, will be adjusted to start on 2019/12/10.
 
    Periodic rule syntax
@@ -1262,17 +1267,17 @@
                   expenses:rent          $2000
                   assets:bank:checking
 
-       There  is  an additional constraint on the period expression: the start
-       date must fall on a natural boundary of the interval.  Eg monthly  from
+       There is an additional constraint on the period expression:  the  start
+       date  must fall on a natural boundary of the interval.  Eg monthly from
        2018/1/1 is valid, but monthly from 2018/1/15 is not.
 
-       Partial  or  relative dates (M/D, D, tomorrow, last week) in the period
-       expression can work (useful or not).  They will be relative to  today's
-       date,  unless  a  Y  default year directive is in effect, in which case
+       Partial or relative dates (M/D, D, tomorrow, last week) in  the  period
+       expression  can work (useful or not).  They will be relative to today's
+       date, unless a Y default year directive is in  effect,  in  which  case
        they will be relative to Y/1/1.
 
    Two spaces between period expression and description!
-       If the period expression is  followed  by  a  transaction  description,
+       If  the  period  expression  is  followed by a transaction description,
        these must be separated by two or more spaces.  This helps hledger know
        where the period expression ends, so that descriptions can not acciden-
        tally alter their meaning, as in this example:
@@ -1286,68 +1291,68 @@
 
        So,
 
-       o Do  write two spaces between your period expression and your transac-
+       o Do write two spaces between your period expression and your  transac-
          tion description, if any.
 
-       o Don't accidentally write two spaces in the middle of your period  ex-
+       o Don't  accidentally write two spaces in the middle of your period ex-
          pression.
 
    Forecasting with periodic transactions
-       The  --forecast  flag  activates  any periodic transaction rules in the
-       journal.  They will generate temporary  recurring  transactions,  which
-       are  not  saved  in  the  journal,  but  will appear in all reports (eg
+       The --forecast flag activates any periodic  transaction  rules  in  the
+       journal.   They  will  generate temporary recurring transactions, which
+       are not saved in the journal,  but  will  appear  in  all  reports  (eg
        print).  This can be useful for estimating balances into the future, or
-       experimenting  with  different scenarios.  Or, it can be used as a data
+       experimenting with different scenarios.  Or, it can be used as  a  data
        entry aid: describe recurring transactions, and every so often copy the
        output of print --forecast into the journal.
 
-       These  transactions  will  have  an extra tag indicating which periodic
+       These transactions will have an extra  tag  indicating  which  periodic
        rule generated them: generated-transaction:~ PERIODICEXPR.  And a simi-
-       lar,  hidden  tag  (beginning  with  an underscore) which, because it's
-       never displayed by print, can be used to match  transactions  generated
+       lar, hidden tag (beginning with  an  underscore)  which,  because  it's
+       never  displayed  by print, can be used to match transactions generated
        "just now": _generated-transaction:~ PERIODICEXPR.
 
-       Periodic  transactions  are  generated within some forecast period.  By
+       Periodic transactions are generated within some  forecast  period.   By
        default, this
 
        o begins on the later of
 
          o the report start date if specified with -b/-p/date:
 
-         o the day after the latest normal (non-periodic) transaction  in  the
+         o the  day  after the latest normal (non-periodic) transaction in the
            journal, or today if there are no normal transactions.
 
-       o ends  on  the  report  end  date  if specified with -e/-p/date:, or 6
+       o ends on the report end date  if  specified  with  -e/-p/date:,  or  6
          months (180 days) from today.
 
-       This means that periodic transactions will begin only after the  latest
-       recorded  transaction.   And a recorded transaction dated in the future
-       can prevent generation of periodic transactions.  (You can  avoid  that
+       This  means that periodic transactions will begin only after the latest
+       recorded transaction.  And a recorded transaction dated in  the  future
+       can  prevent  generation of periodic transactions.  (You can avoid that
        by writing the future transaction as a one-time periodic rule instead -
        put tilde before the date, eg ~ YYYY-MM-DD ...).
 
        Or, you can set your own arbitrary "forecast period", which can overlap
-       recorded  transactions,  and need not be in the future, by providing an
-       option argument, like --forecast=PERIODEXPR.  Note the equals  sign  is
+       recorded transactions, and need not be in the future, by  providing  an
+       option  argument,  like --forecast=PERIODEXPR.  Note the equals sign is
        required, a space won't work.  PERIODEXPR is a period expression, which
-       can specify the start date, end date, or both, like in a  date:  query.
-       (See  also  hledger.1  ->  Report  start  &  end date).  Some examples:
+       can  specify  the start date, end date, or both, like in a date: query.
+       (See also hledger.1 ->  Report  start  &  end  date).   Some  examples:
        --forecast=202001-202004, --forecast=jan-, --forecast=2020.
 
    Budgeting with periodic transactions
-       With the --budget flag, currently supported  by  the  balance  command,
-       each  periodic transaction rule declares recurring budget goals for the
-       specified accounts.  Eg the first example  above  declares  a  goal  of
-       spending  $2000  on  rent  (and  also,  a goal of depositing $2000 into
-       checking) every month.  Goals and actual performance can then  be  com-
+       With  the  --budget  flag,  currently supported by the balance command,
+       each periodic transaction rule declares recurring budget goals for  the
+       specified  accounts.   Eg  the  first  example above declares a goal of
+       spending $2000 on rent (and also,  a  goal  of  depositing  $2000  into
+       checking)  every  month.  Goals and actual performance can then be com-
        pared in budget reports.
 
-       For  more  details, see: balance: Budget report and Budgeting and Fore-
+       For more details, see: balance: Budget report and Budgeting  and  Fore-
        casting.
 
    Auto postings
-       "Automated postings" or "auto postings" are extra  postings  which  get
-       added  automatically  to  transactions which match certain queries, de-
+       "Automated  postings"  or  "auto postings" are extra postings which get
+       added automatically to transactions which match  certain  queries,  de-
        fined by "auto posting rules", when you use the --auto flag.
 
        An auto posting rule looks a bit like a transaction:
@@ -1357,27 +1362,27 @@
                   ...
                   ACCOUNT  [AMOUNT]
 
-       except the first line is an equals sign (mnemonic:  =  suggests  match-
-       ing),  followed  by a query (which matches existing postings), and each
-       "posting" line describes a posting to be  generated,  and  the  posting
+       except  the  first  line is an equals sign (mnemonic: = suggests match-
+       ing), followed by a query (which matches existing postings),  and  each
+       "posting"  line  describes  a  posting to be generated, and the posting
        amounts can be:
 
-       o a  normal  amount  with a commodity symbol, eg $2.  This will be used
+       o a normal amount with a commodity symbol, eg $2.  This  will  be  used
          as-is.
 
        o a number, eg 2.  The commodity symbol (if any) from the matched post-
          ing will be added to this.
 
-       o a  numeric  multiplier,  eg  *2 (a star followed by a number N).  The
+       o a numeric multiplier, eg *2 (a star followed by  a  number  N).   The
          matched posting's amount (and total price, if any) will be multiplied
          by N.
 
-       o a  multiplier  with a commodity symbol, eg *$2 (a star, number N, and
+       o a multiplier with a commodity symbol, eg *$2 (a star, number  N,  and
          symbol S).  The matched posting's amount will be multiplied by N, and
          its commodity symbol will be replaced with S.
 
-       Any  query  term containing spaces must be enclosed in single or double
-       quotes, as on the command line.  Eg, note the quotes around the  second
+       Any query term containing spaces must be enclosed in single  or  double
+       quotes,  as on the command line.  Eg, note the quotes around the second
        query term below:
 
               = expenses:groceries 'expenses:dining out'
@@ -1416,24 +1421,24 @@
 
    Auto postings and multiple files
        An auto posting rule can affect any transaction in the current file, or
-       in any parent file or child file.  Note, currently it will  not  affect
+       in  any  parent file or child file.  Note, currently it will not affect
        sibling files (when multiple -f/--file are used - see #1212).
 
    Auto postings and dates
-       A  posting  date (or secondary date) in the matched posting, or (taking
-       precedence) a posting date in the auto posting rule itself,  will  also
+       A posting date (or secondary date) in the matched posting,  or  (taking
+       precedence)  a  posting date in the auto posting rule itself, will also
        be used in the generated posting.
 
    Auto postings and transaction balancing / inferred amounts / balance asser-
        tions
        Currently, auto postings are added:
 
-       o after missing amounts are inferred, and transactions are checked  for
+       o after  missing amounts are inferred, and transactions are checked for
          balancedness,
 
        o but before balance assertions are checked.
 
-       Note  this  means that journal entries must be balanced both before and
+       Note this means that journal entries must be balanced both  before  and
        after auto postings are added.  This changed in hledger 1.12+; see #893
        for background.
 
@@ -1443,11 +1448,11 @@
        o generated-posting:= QUERY - shows this was generated by an auto post-
          ing rule, and the query
 
-       o _generated-posting:= QUERY - a hidden tag, which does not  appear  in
+       o _generated-posting:=  QUERY  - a hidden tag, which does not appear in
          hledger's output.  This can be used to match postings generated "just
          now", rather than generated in the past and saved to the journal.
 
-       Also, any transaction that has been changed by auto posting rules  will
+       Also,  any transaction that has been changed by auto posting rules will
        have these tags added:
 
        o modified: - this transaction was modified
@@ -1458,7 +1463,7 @@
 
 
 REPORTING BUGS
-       Report bugs at http://bugs.hledger.org (or on the #hledger IRC  channel
+       Report  bugs at http://bugs.hledger.org (or on the #hledger IRC channel
        or hledger mail list)
 
 
@@ -1472,7 +1477,7 @@
 
 
 SEE ALSO
-       hledger(1),      hledger-ui(1),     hledger-web(1),     hledger-api(1),
+       hledger(1),     hledger-ui(1),     hledger-web(1),      hledger-api(1),
        hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
        dot(5), ledger(1)
 
@@ -1480,4 +1485,4 @@
 
 
 
-hledger 1.18                       June 2020                hledger_journal(5)
+hledger 1.18.1                     June 2020                hledger_journal(5)
diff --git a/embeddedfiles/hledger_timeclock.5 b/embeddedfiles/hledger_timeclock.5
--- a/embeddedfiles/hledger_timeclock.5
+++ b/embeddedfiles/hledger_timeclock.5
@@ -1,5 +1,5 @@
 
-.TH "hledger_timeclock" "5" "June 2020" "hledger 1.18" "hledger User Manuals"
+.TH "hledger_timeclock" "5" "June 2020" "hledger 1.18.1" "hledger User Manuals"
 
 
 
diff --git a/embeddedfiles/hledger_timeclock.info b/embeddedfiles/hledger_timeclock.info
--- a/embeddedfiles/hledger_timeclock.info
+++ b/embeddedfiles/hledger_timeclock.info
@@ -4,8 +4,8 @@
 
 File: hledger_timeclock.info,  Node: Top,  Up: (dir)
 
-hledger_timeclock(5) hledger 1.18
-*********************************
+hledger_timeclock(5) hledger 1.18.1
+***********************************
 
 Timeclock - the time logging format of timeclock.el, as read by hledger
 
diff --git a/embeddedfiles/hledger_timeclock.txt b/embeddedfiles/hledger_timeclock.txt
--- a/embeddedfiles/hledger_timeclock.txt
+++ b/embeddedfiles/hledger_timeclock.txt
@@ -78,4 +78,4 @@
 
 
 
-hledger 1.18                       June 2020              hledger_timeclock(5)
+hledger 1.18.1                     June 2020              hledger_timeclock(5)
diff --git a/embeddedfiles/hledger_timedot.5 b/embeddedfiles/hledger_timedot.5
--- a/embeddedfiles/hledger_timedot.5
+++ b/embeddedfiles/hledger_timedot.5
@@ -1,5 +1,5 @@
 
-.TH "hledger_timedot" "5" "June 2020" "hledger 1.18" "hledger User Manuals"
+.TH "hledger_timedot" "5" "June 2020" "hledger 1.18.1" "hledger User Manuals"
 
 
 
diff --git a/embeddedfiles/hledger_timedot.info b/embeddedfiles/hledger_timedot.info
--- a/embeddedfiles/hledger_timedot.info
+++ b/embeddedfiles/hledger_timedot.info
@@ -4,8 +4,8 @@
 
 File: hledger_timedot.info,  Node: Top,  Up: (dir)
 
-hledger_timedot(5) hledger 1.18
-*******************************
+hledger_timedot(5) hledger 1.18.1
+*********************************
 
 Timedot - hledger's human-friendly time logging format
 
diff --git a/embeddedfiles/hledger_timedot.txt b/embeddedfiles/hledger_timedot.txt
--- a/embeddedfiles/hledger_timedot.txt
+++ b/embeddedfiles/hledger_timedot.txt
@@ -161,4 +161,4 @@
 
 
 
-hledger 1.18                       June 2020                hledger_timedot(5)
+hledger 1.18.1                     June 2020                hledger_timedot(5)
diff --git a/hledger.1 b/hledger.1
--- a/hledger.1
+++ b/hledger.1
@@ -1,6 +1,6 @@
 .\"t
 
-.TH "hledger" "1" "June 2020" "hledger 1.18" "hledger User Manuals"
+.TH "hledger" "1" "June 2020" "hledger 1.18.1" "hledger User Manuals"
 
 
 
@@ -617,13 +617,20 @@
 hledger-ui/hledger-web)
 .TP
 \f[B]\f[CB]-B --cost\f[B]\f[R]
-convert amounts to their cost at transaction time (using the transaction
-price, if any)
+convert amounts to their cost/selling amount at transaction time
 .TP
-\f[B]\f[CB]-V --value\f[B]\f[R]
-convert amounts to their market value on the report end date (using the
-most recent applicable market price, if any)
+\f[B]\f[CB]-V --market\f[B]\f[R]
+convert amounts to their market value in default valuation commodities
 .TP
+\f[B]\f[CB]-X --exchange=COMM\f[B]\f[R]
+convert amounts to their market value in commodity COMM
+.TP
+\f[B]\f[CB]--value\f[B]\f[R]
+convert amounts to cost or market value, more flexibly than -B/-V/-X
+.TP
+\f[B]\f[CB]--infer-value\f[B]\f[R]
+with -V/-X/--value, also infer market prices from transactions
+.TP
 \f[B]\f[CB]--auto\f[B]\f[R]
 apply automated posting rules to modify transactions.
 .TP
@@ -1671,47 +1678,139 @@
 .fi
 .SS Valuation
 .PP
-hledger can show cost reports, where amounts are converted to their cost
-or sale amount at transaction time; or value reports, where amounts are
-converted to their market value in another currency/commodity at a
-specified date (using market prices inferred from your transactions, or
-declared with P directives).
-.PP
-We call this \[dq]valuation\[dq], and it is controlled by the
-\f[C]--value=VALUATIONTYPE[,COMMODITY]\f[R] option.
-It can get a little involved, so we cover all the details below.
-But most of the time, all you need to do is use these simpler flags
-instead:
-.IP \[bu] 2
-\f[C]-B\f[R] to convert to cost/sale amount, or
-.IP \[bu] 2
-\f[C]-V\f[R] to convert to market value in your base currency.
-Or occasionally,
-.IP \[bu] 2
-\f[C]-X COMMODITY\f[R] to convert to market value in some other
-currency.
+Instead of reporting amounts in their original commodity, hledger can
+convert them to cost/sale amount (using the conversion rate recorded in
+the transaction), or to market value (using some market price on a
+certain date).
+This is controlled by the \f[C]--value=TYPE[,COMMODITY]\f[R] option, but
+we also provide the simpler \f[C]-B\f[R]/\f[C]-V\f[R]/\f[C]-X\f[R]
+flags, and usually one of those is all you need.
 .SS -B: Cost
 .PP
 The \f[C]-B/--cost\f[R] flag converts amounts to their cost or sale
 amount at transaction time, if they have a transaction price specified.
-(It is equivalent to \f[C]--value=cost\f[R].)
 .SS -V: Value
 .PP
-The \f[C]-V/--market\f[R] flag converts reported amounts to market value
-in their \f[I]default valuation commodity\f[R], using the market prices
-in effect on a \f[I]default valuation date\f[R].
-(More on these below.)
+The \f[C]-V/--market\f[R] flag converts amounts to market value in their
+default \f[I]valuation commodity\f[R], using the market prices in effect
+on the \f[I]valuation date(s)\f[R], if any.
+More on these in a minute.
+.SS -X: Value in specified commodity
 .PP
-The default valuation commodity is the one referenced in the latest
-applicable market price dated on or before the valuation date.
-Typically your P declarations or currency exchange transactions
-reference a single base currency, and -V will pick that.
+The \f[C]-X/--exchange=COMM\f[R] option is like \f[C]-V\f[R], except you
+tell it which currency you want to convert to, and it tries to convert
+everything to that.
+.SS Valuation date
 .PP
-The default valuation date is today for single period reports
-(equivalent to \f[C]--value=now\f[R]), or the last day of each subperiod
-for multiperiod reports (equivalent to \f[C]--value=end\f[R]).
+Since market prices can change from day to day, market value reports
+have a valuation date (or more than one), which determines which market
+prices will be used.
 .PP
-An example:
+For single period reports, if an explicit report end date is specified,
+that will be used as the valuation date; otherwise the valuation date is
+\[dq]today\[dq].
+.PP
+For multiperiod reports, each column/period is valued on the last day of
+the period.
+.SS Market prices
+.PP
+\f[I](experimental)\f[R]
+.PP
+To convert a commodity A to its market value in another commodity B,
+hledger looks for a suitable market price (exchange rate) as follows, in
+this order of preference :
+.IP "1." 3
+A \f[I]declared market price\f[R] or \f[I]inferred market price\f[R]:
+A\[aq]s latest market price in B on or before the valuation date as
+declared by a P directive, or (if the \f[C]--infer-value\f[R] flag is
+used) inferred from transaction prices.
+.IP "2." 3
+A \f[I]reverse market price\f[R]: the inverse of a declared or inferred
+market price from B to A.
+.IP "3." 3
+A \f[I]chained market price\f[R]: a synthetic price formed by combining
+the shortest chain of market prices (any of the above types) leading
+from A to B.
+.PP
+Amounts for which no applicable market price can be found, are not
+converted.
+.SS --infer-value: market prices from transactions
+.PP
+\f[I](experimental)\f[R]
+.PP
+Normally, market value in hledger is fully controlled by, and requires,
+P directives in your journal.
+Since adding and updating those can be a chore, and since transactions
+usually take place at close to market value, why not use the recorded
+transaction prices as additional market prices (as Ledger does) ?
+We could produce value reports without needing P directives at all.
+.PP
+Adding the \f[C]--infer-value\f[R] flag to \f[C]-V\f[R], \f[C]-X\f[R] or
+\f[C]--value\f[R] enables this.
+So for example, \f[C]hledger bs -V --infer-value\f[R] will get market
+prices both from P directives and from transactions.
+.PP
+There is a downside: value reports can sometimes be affected in
+confusing/undesired ways by your journal entries.
+If this happens to you, read all of this Valuation section carefully,
+and try adding \f[C]--debug\f[R] or \f[C]--debug=2\f[R] to troubleshoot.
+.PP
+\f[C]--infer-value\f[R] can infer market prices from:
+.IP \[bu] 2
+multicommodity transactions with explicit prices
+(\f[C]\[at]\f[R]/\f[C]\[at]\[at]\f[R])
+.IP \[bu] 2
+multicommodity transactions with implicit prices (no \f[C]\[at]\f[R],
+two commodities, unbalanced).
+(With these, the order of postings matters.
+\f[C]hledger print -x\f[R] can be useful for troubleshooting.)
+.IP \[bu] 2
+but not, currently, from \[dq]more correct\[dq] multicommodity
+transactions (no \f[C]\[at]\f[R], multiple commodities, balanced).
+.SS Valuation commodity
+.PP
+\f[I](experimental)\f[R]
+.PP
+\f[B]When you specify a valuation commodity (\f[CB]-X COMM\f[B] or
+\f[CB]--value TYPE,COMM\f[B]):\f[R]
+.PD 0
+.P
+.PD
+hledger will convert all amounts to COMM, wherever it can find a
+suitable market price (including by reversing or chaining prices).
+.PP
+\f[B]When you leave the valuation commodity unspecified (\f[CB]-V\f[B]
+or \f[CB]--value TYPE\f[B]):\f[R]
+.PD 0
+.P
+.PD
+For each commodity A, hledger picks a default valuation commodity as
+follows, in this order of preference:
+.IP "1." 3
+The price commodity from the latest P-declared market price for A on or
+before valuation date.
+.IP "2." 3
+The price commodity from the latest P-declared market price for A on any
+date.
+(Allows conversion to proceed when there are inferred prices before the
+valuation date.)
+.IP "3." 3
+If there are no P directives at all (any commodity or date) and the
+\f[C]--infer-value\f[R] flag is used: the price commodity from the
+latest transaction-inferred price for A on or before valuation date.
+.PP
+This means:
+.IP \[bu] 2
+If you have P directives, they determine which commodities \f[C]-V\f[R]
+will convert, and to what.
+.IP \[bu] 2
+If you have no P directives, and use the \f[C]--infer-value\f[R] flag,
+transaction prices determine it.
+.PP
+Amounts for which no valuation commodity can be found are not converted.
+.SS Simple valuation examples
+.PP
+Here are some quick examples of \f[C]-V\f[R]:
 .IP
 .nf
 \f[C]
@@ -1755,39 +1854,8 @@
              $103.00  assets:euros
 \f[R]
 .fi
-.SS -X: Market value in specified commodity
-.PP
-The \f[C]-X/--exchange\f[R] option is like \f[C]-V\f[R], except it
-specifies the target commodity you would like to convert to.
-(It is equivalent to \f[C]--value=now,COMM\f[R] or
-\f[C]--value=end,COMM\f[R].)
-.SS Market prices
-.PP
-To convert a commodity A to commodity B, hledger looks for a suitable
-market price (exchange rate) in the following ways, in this order of
-preference:
-.IP "1." 3
-a \f[I]declared market price\f[R] - the latest P directive specifying
-the exchange rate from A to B, dated on or before the valuation date.
-.IP "2." 3
-a \f[I]transaction-implied market price\f[R] - a market price matching
-the transaction price used in the latest transaction where A is
-converted to B, dated on or before the valuation date.
-(\f[I]since hledger 1.18; experimental\f[R])
-.IP "3." 3
-a \f[I]reverse declared market price\f[R] - calculated by inverting a
-declared market price from B to A.
-.IP "4." 3
-a \f[I]reverse transaction-implied market price\f[R] - calculated by
-inverting a transaction-implied market price from B to A.
-.IP "5." 3
-an \f[I]indirect market price\f[R] - calculated by combining the
-shortest chain of market prices (any of the above types) leading from A
-to B.
 .SS --value: Flexible valuation
 .PP
-\f[I](experimental, added 201905)\f[R]
-.PP
 \f[C]-B\f[R], \f[C]-V\f[R] and \f[C]-X\f[R] are special cases of the
 more general \f[C]--value\f[R] option:
 .IP
@@ -1804,52 +1872,38 @@
 \f[R]
 .fi
 .PP
-The TYPE part basically selects either \[dq]cost\[dq], or \[dq]market
-value\[dq] plus a valuation date:
+The TYPE part selects cost or value and valuation date:
 .TP
 \f[B]\f[CB]--value=cost\f[B]\f[R]
 Convert amounts to cost, using the prices recorded in transactions.
 .TP
 \f[B]\f[CB]--value=then\f[B]\f[R]
-Convert amounts to their value in a default valuation commodity, using
+Convert amounts to their value in the default valuation commodity, using
 market prices on each posting\[aq]s date.
 This is currently supported only by the print and register commands.
 .TP
 \f[B]\f[CB]--value=end\f[B]\f[R]
-Convert amounts to their value in a default valuation commodity, using
+Convert amounts to their value in the default valuation commodity, using
 market prices on the last day of the report period (or if unspecified,
 the journal\[aq]s end date); or in multiperiod reports, market prices on
 the last day of each subperiod.
 .TP
 \f[B]\f[CB]--value=now\f[B]\f[R]
-Convert amounts to their value in default valuation commodity using
+Convert amounts to their value in the default valuation commodity using
 current market prices (as of when report is generated).
 .TP
 \f[B]\f[CB]--value=YYYY-MM-DD\f[B]\f[R]
-Convert amounts to their value in default valuation commodity using
+Convert amounts to their value in the default valuation commodity using
 market prices on this date.
 .PP
-The default valuation commodity is the commodity mentioned in the most
-recent applicable market price declaration.
-When all your price declarations lead to a single home currency, this
-will usually do what you want.
-.PP
 To select a different valuation commodity, add the optional
 \f[C],COMM\f[R] part: a comma, then the target commodity\[aq]s symbol.
 Eg: \f[B]\f[CB]--value=now,EUR\f[B]\f[R].
-hledger will do its best to convert amounts to this commodity, using:
-.IP \[bu] 2
-declared prices (from source commodity to valuation commodity)
-.IP \[bu] 2
-reverse prices (declared prices from valuation to source commodity,
-inverted)
-.IP \[bu] 2
-indirect prices (prices calculated from the shortest chain of declared
-or reverse prices from source to valuation commodity)
-.PP
-in that order.
+hledger will do its best to convert amounts to this commodity, deducing
+market prices as described above.
+.SS More valuation examples
 .PP
-Here are some examples showing the effect of \f[C]--value\f[R] as seen
+Here are some examples showing the effect of \f[C]--value\f[R], as seen
 with \f[C]print\f[R]:
 .IP
 .nf
@@ -1997,13 +2051,12 @@
     b          -0.50A
 \f[R]
 .fi
-.SS Effect of --value on reports
+.SS Effect of valuation on reports
 .PP
-Here is a reference for how \f[C]--value\f[R] currently affects each
-part of hledger\[aq]s reports.
-It\[aq]s work in progress, but may be useful for troubleshooting or
-reporting bugs.
-See also the definitions and notes below.
+Here is a reference for how valuation is supposed to affect each part of
+hledger\[aq]s reports (and a glossary).
+(It\[aq]s wide, you\[aq]ll have to scroll sideways.) It may be useful
+when troubleshooting.
 If you find problems, please report them, ideally with a reproducible
 example.
 Related: #329, #1083.
@@ -2254,7 +2307,7 @@
 T}
 .TE
 .PP
-\f[B]Additional notes\f[R]
+\f[B]Glossary:\f[R]
 .TP
 \f[I]cost\f[R]
 calculated using price(s) recorded in the transaction(s).
diff --git a/hledger.cabal b/hledger.cabal
--- a/hledger.cabal
+++ b/hledger.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 7c3d5511ae3e0b87af5d89a1f2b127fb9c33cacb05894148d9169c77a6309362
+-- hash: a143aaa15c1e629724eac79aa6eb29b5a1af4432366e8855450a1e53ee8c30e4
 
 name:           hledger
-version:        1.18
+version:        1.18.1
 synopsis:       Command-line interface for the hledger accounting system
 description:    The command-line interface for the hledger accounting system.
                 Its basic function is to read a plain text file describing
@@ -144,7 +144,7 @@
   other-modules:
       Paths_hledger
   ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
-  cpp-options: -DVERSION="1.18"
+  cpp-options: -DVERSION="1.18.1"
   build-depends:
       Decimal >=0.5.1
     , Diff
@@ -161,7 +161,7 @@
     , filepath
     , hashable >=1.2.4
     , haskeline >=0.6
-    , hledger-lib >=1.18 && <1.19
+    , hledger-lib >=1.18.1 && <1.19
     , lucid
     , math-functions >=0.3.3.0
     , megaparsec >=7.0.0 && <8.1
@@ -197,7 +197,7 @@
   hs-source-dirs:
       app
   ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
-  cpp-options: -DVERSION="1.18"
+  cpp-options: -DVERSION="1.18.1"
   build-depends:
       Decimal >=0.5.1
     , aeson
@@ -213,7 +213,7 @@
     , filepath
     , haskeline >=0.6
     , hledger
-    , hledger-lib >=1.18 && <1.19
+    , hledger-lib >=1.18.1 && <1.19
     , math-functions >=0.3.3.0
     , megaparsec >=7.0.0 && <8.1
     , mtl >=2.2.1
@@ -249,7 +249,7 @@
   hs-source-dirs:
       test
   ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
-  cpp-options: -DVERSION="1.18"
+  cpp-options: -DVERSION="1.18.1"
   build-depends:
       Decimal >=0.5.1
     , aeson
@@ -265,7 +265,7 @@
     , filepath
     , haskeline >=0.6
     , hledger
-    , hledger-lib >=1.18 && <1.19
+    , hledger-lib >=1.18.1 && <1.19
     , math-functions >=0.3.3.0
     , megaparsec >=7.0.0 && <8.1
     , mtl >=2.2.1
@@ -315,7 +315,7 @@
     , filepath
     , haskeline >=0.6
     , hledger
-    , hledger-lib >=1.18 && <1.19
+    , hledger-lib >=1.18.1 && <1.19
     , html
     , math-functions >=0.3.3.0
     , megaparsec >=7.0.0 && <8.1
diff --git a/hledger.info b/hledger.info
--- a/hledger.info
+++ b/hledger.info
@@ -3,8 +3,8 @@
 
 File: hledger.info,  Node: Top,  Next: COMMON TASKS,  Up: (dir)
 
-hledger(1) hledger 1.18
-***********************
+hledger(1) hledger 1.18.1
+*************************
 
 hledger - a command-line accounting tool
 
@@ -610,12 +610,21 @@
      hledger-ui/hledger-web)
 '-B --cost'
 
-     convert amounts to their cost at transaction time (using the
-     transaction price, if any)
-'-V --value'
+     convert amounts to their cost/selling amount at transaction time
+'-V --market'
 
-     convert amounts to their market value on the report end date (using
-     the most recent applicable market price, if any)
+     convert amounts to their market value in default valuation
+     commodities
+'-X --exchange=COMM'
+
+     convert amounts to their market value in commodity COMM
+'--value'
+
+     convert amounts to cost or market value, more flexibly than
+     -B/-V/-X
+'--infer-value'
+
+     with -V/-X/-value, also infer market prices from transactions
 '--auto'
 
      apply automated posting rules to modify transactions.
@@ -1363,30 +1372,26 @@
 2.17 Valuation
 ==============
 
-hledger can show cost reports, where amounts are converted to their cost
-or sale amount at transaction time; or value reports, where amounts are
-converted to their market value in another currency/commodity at a
-specified date (using market prices inferred from your transactions, or
-declared with P directives).
-
-   We call this "valuation", and it is controlled by the
-'--value=VALUATIONTYPE[,COMMODITY]' option.  It can get a little
-involved, so we cover all the details below.  But most of the time, all
-you need to do is use these simpler flags instead:
-
-   * '-B' to convert to cost/sale amount, or
-   * '-V' to convert to market value in your base currency.  Or
-     occasionally,
-   * '-X COMMODITY' to convert to market value in some other currency.
+Instead of reporting amounts in their original commodity, hledger can
+convert them to cost/sale amount (using the conversion rate recorded in
+the transaction), or to market value (using some market price on a
+certain date).  This is controlled by the '--value=TYPE[,COMMODITY]'
+option, but we also provide the simpler '-B'/'-V'/'-X' flags, and
+usually one of those is all you need.
 
 * Menu:
 
 * -B Cost::
 * -V Value::
-* -X Market value in specified commodity::
+* -X Value in specified commodity::
+* Valuation date::
 * Market prices::
+* --infer-value market prices from transactions::
+* Valuation commodity::
+* Simple valuation examples::
 * --value Flexible valuation::
-* Effect of --value on reports::
+* More valuation examples::
+* Effect of valuation on reports::
 
 
 File: hledger.info,  Node: -B Cost,  Next: -V Value,  Up: Valuation
@@ -1395,30 +1400,155 @@
 ---------------
 
 The '-B/--cost' flag converts amounts to their cost or sale amount at
-transaction time, if they have a transaction price specified.  (It is
-equivalent to '--value=cost'.)
+transaction time, if they have a transaction price specified.
 
 
-File: hledger.info,  Node: -V Value,  Next: -X Market value in specified commodity,  Prev: -B Cost,  Up: Valuation
+File: hledger.info,  Node: -V Value,  Next: -X Value in specified commodity,  Prev: -B Cost,  Up: Valuation
 
 2.17.2 -V: Value
 ----------------
 
-The '-V/--market' flag converts reported amounts to market value in
-their _default valuation commodity_, using the market prices in effect
-on a _default valuation date_.  (More on these below.)
+The '-V/--market' flag converts amounts to market value in their default
+_valuation commodity_, using the market prices in effect on the
+_valuation date(s)_, if any.  More on these in a minute.
 
-   The default valuation commodity is the one referenced in the latest
-applicable market price dated on or before the valuation date.
-Typically your P declarations or currency exchange transactions
-reference a single base currency, and -V will pick that.
+
+File: hledger.info,  Node: -X Value in specified commodity,  Next: Valuation date,  Prev: -V Value,  Up: Valuation
 
-   The default valuation date is today for single period reports
-(equivalent to '--value=now'), or the last day of each subperiod for
-multiperiod reports (equivalent to '--value=end').
+2.17.3 -X: Value in specified commodity
+---------------------------------------
 
-   An example:
+The '-X/--exchange=COMM' option is like '-V', except you tell it which
+currency you want to convert to, and it tries to convert everything to
+that.
 
+
+File: hledger.info,  Node: Valuation date,  Next: Market prices,  Prev: -X Value in specified commodity,  Up: Valuation
+
+2.17.4 Valuation date
+---------------------
+
+Since market prices can change from day to day, market value reports
+have a valuation date (or more than one), which determines which market
+prices will be used.
+
+   For single period reports, if an explicit report end date is
+specified, that will be used as the valuation date; otherwise the
+valuation date is "today".
+
+   For multiperiod reports, each column/period is valued on the last day
+of the period.
+
+
+File: hledger.info,  Node: Market prices,  Next: --infer-value market prices from transactions,  Prev: Valuation date,  Up: Valuation
+
+2.17.5 Market prices
+--------------------
+
+_(experimental)_
+
+   To convert a commodity A to its market value in another commodity B,
+hledger looks for a suitable market price (exchange rate) as follows, in
+this order of preference :
+
+  1. A _declared market price_ or _inferred market price_: A's latest
+     market price in B on or before the valuation date as declared by a
+     P directive, or (if the '--infer-value' flag is used) inferred from
+     transaction prices.
+
+  2. A _reverse market price_: the inverse of a declared or inferred
+     market price from B to A.
+
+  3. A _chained market price_: a synthetic price formed by combining the
+     shortest chain of market prices (any of the above types) leading
+     from A to B.
+
+   Amounts for which no applicable market price can be found, are not
+converted.
+
+
+File: hledger.info,  Node: --infer-value market prices from transactions,  Next: Valuation commodity,  Prev: Market prices,  Up: Valuation
+
+2.17.6 -infer-value: market prices from transactions
+----------------------------------------------------
+
+_(experimental)_
+
+   Normally, market value in hledger is fully controlled by, and
+requires, P directives in your journal.  Since adding and updating those
+can be a chore, and since transactions usually take place at close to
+market value, why not use the recorded transaction prices as additional
+market prices (as Ledger does) ?  We could produce value reports without
+needing P directives at all.
+
+   Adding the '--infer-value' flag to '-V', '-X' or '--value' enables
+this.  So for example, 'hledger bs -V --infer-value' will get market
+prices both from P directives and from transactions.
+
+   There is a downside: value reports can sometimes be affected in
+confusing/undesired ways by your journal entries.  If this happens to
+you, read all of this Valuation section carefully, and try adding
+'--debug' or '--debug=2' to troubleshoot.
+
+   '--infer-value' can infer market prices from:
+
+   * multicommodity transactions with explicit prices ('@'/'@@')
+
+   * multicommodity transactions with implicit prices (no '@', two
+     commodities, unbalanced).  (With these, the order of postings
+     matters.  'hledger print -x' can be useful for troubleshooting.)
+
+   * but not, currently, from "more correct" multicommodity transactions
+     (no '@', multiple commodities, balanced).
+
+
+File: hledger.info,  Node: Valuation commodity,  Next: Simple valuation examples,  Prev: --infer-value market prices from transactions,  Up: Valuation
+
+2.17.7 Valuation commodity
+--------------------------
+
+_(experimental)_
+
+   *When you specify a valuation commodity ('-X COMM' or '--value
+TYPE,COMM'):*
+hledger will convert all amounts to COMM, wherever it can find a
+suitable market price (including by reversing or chaining prices).
+
+   *When you leave the valuation commodity unspecified ('-V' or '--value
+TYPE'):*
+For each commodity A, hledger picks a default valuation commodity as
+follows, in this order of preference:
+
+  1. The price commodity from the latest P-declared market price for A
+     on or before valuation date.
+
+  2. The price commodity from the latest P-declared market price for A
+     on any date.  (Allows conversion to proceed when there are inferred
+     prices before the valuation date.)
+
+  3. If there are no P directives at all (any commodity or date) and the
+     '--infer-value' flag is used: the price commodity from the latest
+     transaction-inferred price for A on or before valuation date.
+
+   This means:
+
+   * If you have P directives, they determine which commodities '-V'
+     will convert, and to what.
+
+   * If you have no P directives, and use the '--infer-value' flag,
+     transaction prices determine it.
+
+   Amounts for which no valuation commodity can be found are not
+converted.
+
+
+File: hledger.info,  Node: Simple valuation examples,  Next: --value Flexible valuation,  Prev: Valuation commodity,  Up: Valuation
+
+2.17.8 Simple valuation examples
+--------------------------------
+
+Here are some quick examples of '-V':
+
 ; one euro is worth this many dollars from nov 1
 P 2016/11/01 € $1.10
 
@@ -1447,52 +1577,12 @@
              $103.00  assets:euros
 
 
-File: hledger.info,  Node: -X Market value in specified commodity,  Next: Market prices,  Prev: -V Value,  Up: Valuation
-
-2.17.3 -X: Market value in specified commodity
-----------------------------------------------
-
-The '-X/--exchange' option is like '-V', except it specifies the target
-commodity you would like to convert to.  (It is equivalent to
-'--value=now,COMM' or '--value=end,COMM'.)
-
-
-File: hledger.info,  Node: Market prices,  Next: --value Flexible valuation,  Prev: -X Market value in specified commodity,  Up: Valuation
-
-2.17.4 Market prices
---------------------
-
-To convert a commodity A to commodity B, hledger looks for a suitable
-market price (exchange rate) in the following ways, in this order of
-preference:
-
-  1. a _declared market price_ - the latest P directive specifying the
-     exchange rate from A to B, dated on or before the valuation date.
-
-  2. a _transaction-implied market price_ - a market price matching the
-     transaction price used in the latest transaction where A is
-     converted to B, dated on or before the valuation date.  (_since
-     hledger 1.18; experimental_)
-
-  3. a _reverse declared market price_ - calculated by inverting a
-     declared market price from B to A.
-
-  4. a _reverse transaction-implied market price_ - calculated by
-     inverting a transaction-implied market price from B to A.
-
-  5. an _indirect market price_ - calculated by combining the shortest
-     chain of market prices (any of the above types) leading from A to
-     B.
-
-
-File: hledger.info,  Node: --value Flexible valuation,  Next: Effect of --value on reports,  Prev: Market prices,  Up: Valuation
+File: hledger.info,  Node: --value Flexible valuation,  Next: More valuation examples,  Prev: Simple valuation examples,  Up: Valuation
 
-2.17.5 -value: Flexible valuation
+2.17.9 -value: Flexible valuation
 ---------------------------------
 
-_(experimental, added 201905)_
-
-   '-B', '-V' and '-X' are special cases of the more general '--value'
+'-B', '-V' and '-X' are special cases of the more general '--value'
 option:
 
  --value=TYPE[,COMM]  TYPE is cost, then, end, now or YYYY-MM-DD.
@@ -1504,51 +1594,43 @@
                       - default valuation commodity (or COMM) using current market prices
                       - default valuation commodity (or COMM) using market prices at some date
 
-   The TYPE part basically selects either "cost", or "market value" plus
-a valuation date:
+   The TYPE part selects cost or value and valuation date:
 
 '--value=cost'
 
      Convert amounts to cost, using the prices recorded in transactions.
 '--value=then'
 
-     Convert amounts to their value in a default valuation commodity,
+     Convert amounts to their value in the default valuation commodity,
      using market prices on each posting's date.  This is currently
      supported only by the print and register commands.
 '--value=end'
 
-     Convert amounts to their value in a default valuation commodity,
+     Convert amounts to their value in the default valuation commodity,
      using market prices on the last day of the report period (or if
      unspecified, the journal's end date); or in multiperiod reports,
      market prices on the last day of each subperiod.
 '--value=now'
 
-     Convert amounts to their value in default valuation commodity using
-     current market prices (as of when report is generated).
+     Convert amounts to their value in the default valuation commodity
+     using current market prices (as of when report is generated).
 '--value=YYYY-MM-DD'
 
-     Convert amounts to their value in default valuation commodity using
-     market prices on this date.
-
-   The default valuation commodity is the commodity mentioned in the
-most recent applicable market price declaration.  When all your price
-declarations lead to a single home currency, this will usually do what
-you want.
+     Convert amounts to their value in the default valuation commodity
+     using market prices on this date.
 
    To select a different valuation commodity, add the optional ',COMM'
 part: a comma, then the target commodity's symbol.  Eg:
 *'--value=now,EUR'*.  hledger will do its best to convert amounts to
-this commodity, using:
+this commodity, deducing market prices as described above.
 
-   * declared prices (from source commodity to valuation commodity)
-   * reverse prices (declared prices from valuation to source commodity,
-     inverted)
-   * indirect prices (prices calculated from the shortest chain of
-     declared or reverse prices from source to valuation commodity)
+
+File: hledger.info,  Node: More valuation examples,  Next: Effect of valuation on reports,  Prev: --value Flexible valuation,  Up: Valuation
 
-   in that order.
+2.17.10 More valuation examples
+-------------------------------
 
-   Here are some examples showing the effect of '--value' as seen with
+Here are some examples showing the effect of '--value', as seen with
 'print':
 
 P 2000-01-01 A  1 B
@@ -1657,16 +1739,16 @@
     b          -0.50A
 
 
-File: hledger.info,  Node: Effect of --value on reports,  Prev: --value Flexible valuation,  Up: Valuation
+File: hledger.info,  Node: Effect of valuation on reports,  Prev: More valuation examples,  Up: Valuation
 
-2.17.6 Effect of -value on reports
-----------------------------------
+2.17.11 Effect of valuation on reports
+--------------------------------------
 
-Here is a reference for how '--value' currently affects each part of
-hledger's reports.  It's work in progress, but may be useful for
-troubleshooting or reporting bugs.  See also the definitions and notes
-below.  If you find problems, please report them, ideally with a
-reproducible example.  Related: #329, #1083.
+Here is a reference for how valuation is supposed to affect each part of
+hledger's reports (and a glossary).  (It's wide, you'll have to scroll
+sideways.)  It may be useful when troubleshooting.  If you find
+problems, please report them, ideally with a reproducible example.
+Related: #329, #1083.
 
 Report       '-B',        '-V', '-X'   '--value=then' '--value=end' '--value=DATE',
 type         '--value=cost'                                         '--value=now'
@@ -1739,7 +1821,7 @@
              totals       totals                      totals        column
                                                                     totals
 
-   *Additional notes*
+   *Glossary:*
 
 _cost_
 
@@ -3776,187 +3858,197 @@
 
 Tag Table:
 Node: Top68
-Node: COMMON TASKS2315
-Ref: #common-tasks2427
-Node: Getting help2834
-Ref: #getting-help2966
-Node: Constructing command lines3519
-Ref: #constructing-command-lines3711
-Node: Starting a journal file4408
-Ref: #starting-a-journal-file4606
-Node: Setting opening balances5794
-Ref: #setting-opening-balances5990
-Node: Recording transactions9131
-Ref: #recording-transactions9311
-Node: Reconciling9867
-Ref: #reconciling10010
-Node: Reporting12267
-Ref: #reporting12407
-Node: Migrating to a new file16406
-Ref: #migrating-to-a-new-file16554
-Node: OPTIONS16853
-Ref: #options16960
-Node: General options17330
-Ref: #general-options17455
-Node: Command options20225
-Ref: #command-options20376
-Node: Command arguments20774
-Ref: #command-arguments20921
-Node: Queries21801
-Ref: #queries21956
-Node: Special characters in arguments and queries25918
-Ref: #special-characters-in-arguments-and-queries26146
-Node: More escaping26597
-Ref: #more-escaping26759
-Node: Even more escaping27055
-Ref: #even-more-escaping27249
-Node: Less escaping27920
-Ref: #less-escaping28082
-Node: Unicode characters28327
-Ref: #unicode-characters28509
-Node: Input files29921
-Ref: #input-files30064
-Node: Output destination31993
-Ref: #output-destination32145
-Node: Output format32570
-Ref: #output-format32720
-Node: Regular expressions34302
-Ref: #regular-expressions34459
-Node: Smart dates36195
-Ref: #smart-dates36346
-Node: Report start & end date37707
-Ref: #report-start-end-date37879
-Node: Report intervals39376
-Ref: #report-intervals39541
-Node: Period expressions39931
-Ref: #period-expressions40091
-Node: Depth limiting44227
-Ref: #depth-limiting44371
-Node: Pivoting44703
-Ref: #pivoting44826
-Node: Valuation46502
-Ref: #valuation46604
-Node: -B Cost47524
-Ref: #b-cost47628
-Node: -V Value47800
-Ref: #v-value47953
-Node: -X Market value in specified commodity49226
-Ref: #x-market-value-in-specified-commodity49445
-Node: Market prices49623
-Ref: #market-prices49808
-Node: --value Flexible valuation50733
-Ref: #value-flexible-valuation50934
-Node: Effect of --value on reports55439
-Ref: #effect-of---value-on-reports55620
-Node: COMMANDS61166
-Ref: #commands61274
-Node: accounts62358
-Ref: #accounts62456
-Node: activity63155
-Ref: #activity63265
-Node: add63648
-Ref: #add63747
-Node: balance66486
-Ref: #balance66597
-Node: Classic balance report68055
-Ref: #classic-balance-report68228
-Node: Customising the classic balance report69597
-Ref: #customising-the-classic-balance-report69825
-Node: Colour support71901
-Ref: #colour-support72068
-Node: Flat mode72241
-Ref: #flat-mode72389
-Node: Depth limited balance reports72802
-Ref: #depth-limited-balance-reports72987
-Node: Percentages73443
-Ref: #percentages73609
-Node: Multicolumn balance report74746
-Ref: #multicolumn-balance-report74926
-Node: Budget report80188
-Ref: #budget-report80331
-Node: Nested budgets85597
-Ref: #nested-budgets85709
-Ref: #output-format-189190
-Node: balancesheet89387
-Ref: #balancesheet89523
-Node: balancesheetequity90989
-Ref: #balancesheetequity91138
-Node: cashflow91861
-Ref: #cashflow91989
-Node: check-dates93168
-Ref: #check-dates93295
-Node: check-dupes93574
-Ref: #check-dupes93698
-Node: close93991
-Ref: #close94105
-Node: close usage95627
-Ref: #close-usage95720
-Node: commodities98533
-Ref: #commodities98660
-Node: descriptions98742
-Ref: #descriptions98870
-Node: diff99051
-Ref: #diff99157
-Node: files100204
-Ref: #files100304
-Node: help100451
-Ref: #help100551
-Node: import101632
-Ref: #import101746
-Node: Importing balance assignments102639
-Ref: #importing-balance-assignments102787
-Node: incomestatement103436
-Ref: #incomestatement103569
-Node: notes105056
-Ref: #notes105169
-Node: payees105295
-Ref: #payees105401
-Node: prices105559
-Ref: #prices105665
-Node: print106006
-Ref: #print106116
-Node: print-unique110902
-Ref: #print-unique111028
-Node: register111313
-Ref: #register111440
-Node: Custom register output115612
-Ref: #custom-register-output115741
-Node: register-match117078
-Ref: #register-match117212
-Node: rewrite117563
-Ref: #rewrite117678
-Node: Re-write rules in a file119533
-Ref: #re-write-rules-in-a-file119667
-Node: Diff output format120877
-Ref: #diff-output-format121046
-Node: rewrite vs print --auto122138
-Ref: #rewrite-vs.-print---auto122317
-Node: roi122873
-Ref: #roi122971
-Node: stats123983
-Ref: #stats124082
-Node: tags124870
-Ref: #tags124968
-Node: test125262
-Ref: #test125370
-Node: Add-on commands126117
-Ref: #add-on-commands126234
-Node: ui127577
-Ref: #ui127665
-Node: web127719
-Ref: #web127822
-Node: iadd127938
-Ref: #iadd128049
-Node: interest128131
-Ref: #interest128238
-Node: ENVIRONMENT128478
-Ref: #environment128590
-Node: FILES129419
-Ref: #files-1129522
-Node: LIMITATIONS129735
-Ref: #limitations129854
-Node: TROUBLESHOOTING130596
-Ref: #troubleshooting130709
+Node: COMMON TASKS2319
+Ref: #common-tasks2431
+Node: Getting help2838
+Ref: #getting-help2970
+Node: Constructing command lines3523
+Ref: #constructing-command-lines3715
+Node: Starting a journal file4412
+Ref: #starting-a-journal-file4610
+Node: Setting opening balances5798
+Ref: #setting-opening-balances5994
+Node: Recording transactions9135
+Ref: #recording-transactions9315
+Node: Reconciling9871
+Ref: #reconciling10014
+Node: Reporting12271
+Ref: #reporting12411
+Node: Migrating to a new file16410
+Ref: #migrating-to-a-new-file16558
+Node: OPTIONS16857
+Ref: #options16964
+Node: General options17334
+Ref: #general-options17459
+Node: Command options20413
+Ref: #command-options20564
+Node: Command arguments20962
+Ref: #command-arguments21109
+Node: Queries21989
+Ref: #queries22144
+Node: Special characters in arguments and queries26106
+Ref: #special-characters-in-arguments-and-queries26334
+Node: More escaping26785
+Ref: #more-escaping26947
+Node: Even more escaping27243
+Ref: #even-more-escaping27437
+Node: Less escaping28108
+Ref: #less-escaping28270
+Node: Unicode characters28515
+Ref: #unicode-characters28697
+Node: Input files30109
+Ref: #input-files30252
+Node: Output destination32181
+Ref: #output-destination32333
+Node: Output format32758
+Ref: #output-format32908
+Node: Regular expressions34490
+Ref: #regular-expressions34647
+Node: Smart dates36383
+Ref: #smart-dates36534
+Node: Report start & end date37895
+Ref: #report-start-end-date38067
+Node: Report intervals39564
+Ref: #report-intervals39729
+Node: Period expressions40119
+Ref: #period-expressions40279
+Node: Depth limiting44415
+Ref: #depth-limiting44559
+Node: Pivoting44891
+Ref: #pivoting45014
+Node: Valuation46690
+Ref: #valuation46792
+Node: -B Cost47481
+Ref: #b-cost47585
+Node: -V Value47718
+Ref: #v-value47864
+Node: -X Value in specified commodity48059
+Ref: #x-value-in-specified-commodity48258
+Node: Valuation date48407
+Ref: #valuation-date48575
+Node: Market prices48985
+Ref: #market-prices49165
+Node: --infer-value market prices from transactions49942
+Ref: #infer-value-market-prices-from-transactions50191
+Node: Valuation commodity51473
+Ref: #valuation-commodity51682
+Node: Simple valuation examples52908
+Ref: #simple-valuation-examples53110
+Node: --value Flexible valuation53769
+Ref: #value-flexible-valuation53977
+Node: More valuation examples55924
+Ref: #more-valuation-examples56133
+Node: Effect of valuation on reports58138
+Ref: #effect-of-valuation-on-reports58326
+Node: COMMANDS63847
+Ref: #commands63955
+Node: accounts65039
+Ref: #accounts65137
+Node: activity65836
+Ref: #activity65946
+Node: add66329
+Ref: #add66428
+Node: balance69167
+Ref: #balance69278
+Node: Classic balance report70736
+Ref: #classic-balance-report70909
+Node: Customising the classic balance report72278
+Ref: #customising-the-classic-balance-report72506
+Node: Colour support74582
+Ref: #colour-support74749
+Node: Flat mode74922
+Ref: #flat-mode75070
+Node: Depth limited balance reports75483
+Ref: #depth-limited-balance-reports75668
+Node: Percentages76124
+Ref: #percentages76290
+Node: Multicolumn balance report77427
+Ref: #multicolumn-balance-report77607
+Node: Budget report82869
+Ref: #budget-report83012
+Node: Nested budgets88278
+Ref: #nested-budgets88390
+Ref: #output-format-191871
+Node: balancesheet92068
+Ref: #balancesheet92204
+Node: balancesheetequity93670
+Ref: #balancesheetequity93819
+Node: cashflow94542
+Ref: #cashflow94670
+Node: check-dates95849
+Ref: #check-dates95976
+Node: check-dupes96255
+Ref: #check-dupes96379
+Node: close96672
+Ref: #close96786
+Node: close usage98308
+Ref: #close-usage98401
+Node: commodities101214
+Ref: #commodities101341
+Node: descriptions101423
+Ref: #descriptions101551
+Node: diff101732
+Ref: #diff101838
+Node: files102885
+Ref: #files102985
+Node: help103132
+Ref: #help103232
+Node: import104313
+Ref: #import104427
+Node: Importing balance assignments105320
+Ref: #importing-balance-assignments105468
+Node: incomestatement106117
+Ref: #incomestatement106250
+Node: notes107737
+Ref: #notes107850
+Node: payees107976
+Ref: #payees108082
+Node: prices108240
+Ref: #prices108346
+Node: print108687
+Ref: #print108797
+Node: print-unique113583
+Ref: #print-unique113709
+Node: register113994
+Ref: #register114121
+Node: Custom register output118293
+Ref: #custom-register-output118422
+Node: register-match119759
+Ref: #register-match119893
+Node: rewrite120244
+Ref: #rewrite120359
+Node: Re-write rules in a file122214
+Ref: #re-write-rules-in-a-file122348
+Node: Diff output format123558
+Ref: #diff-output-format123727
+Node: rewrite vs print --auto124819
+Ref: #rewrite-vs.-print---auto124998
+Node: roi125554
+Ref: #roi125652
+Node: stats126664
+Ref: #stats126763
+Node: tags127551
+Ref: #tags127649
+Node: test127943
+Ref: #test128051
+Node: Add-on commands128798
+Ref: #add-on-commands128915
+Node: ui130258
+Ref: #ui130346
+Node: web130400
+Ref: #web130503
+Node: iadd130619
+Ref: #iadd130730
+Node: interest130812
+Ref: #interest130919
+Node: ENVIRONMENT131159
+Ref: #environment131271
+Node: FILES132100
+Ref: #files-1132203
+Node: LIMITATIONS132416
+Ref: #limitations132535
+Node: TROUBLESHOOTING133277
+Ref: #troubleshooting133390
 
 End Tag Table
 
diff --git a/hledger.txt b/hledger.txt
--- a/hledger.txt
+++ b/hledger.txt
@@ -515,13 +515,22 @@
               hledger-ui/hledger-web)
 
        -B --cost
-              convert  amounts  to  their  cost at transaction time (using the
-              transaction price, if any)
+              convert amounts to their cost/selling amount at transaction time
 
-       -V --value
-              convert amounts to their market value on  the  report  end  date
-              (using the most recent applicable market price, if any)
+       -V --market
+              convert  amounts to their market value in default valuation com-
+              modities
 
+       -X --exchange=COMM
+              convert amounts to their market value in commodity COMM
+
+       --value
+              convert amounts to cost or  market  value,  more  flexibly  than
+              -B/-V/-X
+
+       --infer-value
+              with -V/-X/--value, also infer market prices from transactions
+
        --auto apply automated posting rules to modify transactions.
 
        --forecast
@@ -934,7 +943,6 @@
        2004/10/1,   2004-01-01,   exact date, several separators allowed.   Year
        2004.9.1                   is 4+ digits, month is 1-12, day is 1-31
        2004                       start of year
-
        2004/10                    start of month
        10/1                       month and day in current year
        21                         day in current month
@@ -1067,6 +1075,8 @@
 
        -p  "weekly from 2009/1/1   starts on 2008/12/29, closest preceding Mon-
        to 2009/4/1"                day
+
+
        -p       "monthly      in   starts on 2018/11/01
        2008/11/25"
        -p    "quarterly     from   starts  on  2009/04/01,  ends on 2009/06/30,
@@ -1179,45 +1189,128 @@
                             -2 EUR
 
    Valuation
-       hledger can show cost reports, where amounts  are  converted  to  their
-       cost  or  sale  amount  at  transaction  time;  or value reports, where
-       amounts are converted to their market value in another currency/commod-
-       ity  at a specified date (using market prices inferred from your trans-
-       actions, or declared with P directives).
+       Instead of reporting amounts in their original commodity,  hledger  can
+       convert them to cost/sale amount (using the conversion rate recorded in
+       the transaction), or to market value (using some market price on a cer-
+       tain date).  This is controlled by the --value=TYPE[,COMMODITY] option,
+       but we also provide the simpler -B/-V/-X  flags,  and  usually  one  of
+       those is all you need.
 
-       We call this "valuation", and it is controlled  by  the  --value=VALUA-
-       TIONTYPE[,COMMODITY] option.  It can get a little involved, so we cover
-       all the details below.  But most of the time, all you need to do is use
-       these simpler flags instead:
+   -B: Cost
+       The  -B/--cost  flag  converts  amounts to their cost or sale amount at
+       transaction time, if they have a transaction price specified.
 
-       o -B to convert to cost/sale amount, or
+   -V: Value
+       The -V/--market flag converts amounts to market value in their  default
+       valuation commodity, using the market prices in effect on the valuation
+       date(s), if any.  More on these in a minute.
 
-       o -V  to  convert  to market value in your base currency.  Or occasion-
-         ally,
+   -X: Value in specified commodity
+       The -X/--exchange=COMM option is like -V, except you tell it which cur-
+       rency  you  want  to  convert to, and it tries to convert everything to
+       that.
 
-       o -X COMMODITY to convert to market value in some other currency.
+   Valuation date
+       Since market prices can change from day to day,  market  value  reports
+       have a valuation date (or more than one), which determines which market
+       prices will be used.
 
-   -B: Cost
-       The -B/--cost flag converts amounts to their cost  or  sale  amount  at
-       transaction  time,  if they have a transaction price specified.  (It is
-       equivalent to --value=cost.)
+       For single period reports, if an explicit report end date is specified,
+       that  will  be used as the valuation date; otherwise the valuation date
+       is "today".
 
-   -V: Value
-       The -V/--market flag converts reported amounts to market value in their
-       default valuation commodity, using the market prices in effect on a de-
-       fault valuation date.  (More on these below.)
+       For multiperiod reports, each column/period is valued on the  last  day
+       of the period.
 
-       The default valuation commodity is the one referenced in the latest ap-
-       plicable market price dated on or before the valuation date.  Typically
-       your P declarations or currency exchange transactions reference a  sin-
-       gle base currency, and -V will pick that.
+   Market prices
+       (experimental)
 
-       The  default valuation date is today for single period reports (equiva-
-       lent to --value=now), or the last day of each subperiod for multiperiod
-       reports (equivalent to --value=end).
+       To  convert  a  commodity A to its market value in another commodity B,
+       hledger looks for a suitable market price (exchange rate)  as  follows,
+       in this order of preference :
 
-       An example:
+       1. A  declared market price or inferred market price: A's latest market
+          price in B on or before the valuation date as declared by a P direc-
+          tive,  or (if the --infer-value flag is used) inferred from transac-
+          tion prices.
 
+       2. A reverse market price: the inverse of a declared or inferred market
+          price from B to A.
+
+       3. A  chained  market  price: a synthetic price formed by combining the
+          shortest chain of market prices (any of  the  above  types)  leading
+          from A to B.
+
+       Amounts for which no applicable market price can be found, are not con-
+       verted.
+
+   --infer-value: market prices from transactions
+       (experimental)
+
+       Normally, market value in hledger is fully controlled by, and requires,
+       P directives in your journal.  Since adding and updating those can be a
+       chore, and since transactions usually take place  at  close  to  market
+       value, why not use the recorded transaction prices as additional market
+       prices (as Ledger does) ?  We could produce value reports without need-
+       ing P directives at all.
+
+       Adding  the  --infer-value  flag to -V, -X or --value enables this.  So
+       for example, hledger bs -V --infer-value will get  market  prices  both
+       from P directives and from transactions.
+
+       There is a downside: value reports can sometimes be affected in confus-
+       ing/undesired ways by your journal entries.  If this  happens  to  you,
+       read all of this Valuation section carefully, and try adding --debug or
+       --debug=2 to troubleshoot.
+
+       --infer-value can infer market prices from:
+
+       o multicommodity transactions with explicit prices (@/@@)
+
+       o multicommodity transactions with implicit prices (no @, two  commodi-
+         ties,  unbalanced).   (With  these,  the  order  of postings matters.
+         hledger print -x can be useful for troubleshooting.)
+
+       o but not, currently, from "more correct"  multicommodity  transactions
+         (no @, multiple commodities, balanced).
+
+   Valuation commodity
+       (experimental)
+
+       When you specify a valuation commodity (-X COMM or --value TYPE,COMM):
+       hledger  will convert all amounts to COMM, wherever it can find a suit-
+       able market price (including by reversing or chaining prices).
+
+       When you leave the  valuation  commodity  unspecified  (-V  or  --value
+       TYPE):
+       For  each  commodity  A, hledger picks a default valuation commodity as
+       follows, in this order of preference:
+
+       1. The price commodity from the latest P-declared market price for A on
+          or before valuation date.
+
+       2. The price commodity from the latest P-declared market price for A on
+          any date.  (Allows conversion to proceed  when  there  are  inferred
+          prices before the valuation date.)
+
+       3. If  there are no P directives at all (any commodity or date) and the
+          --infer-value flag is used: the  price  commodity  from  the  latest
+          transaction-inferred price for A on or before valuation date.
+
+       This means:
+
+       o If  you  have  P directives, they determine which commodities -V will
+         convert, and to what.
+
+       o If you have no P directives, and use the --infer-value flag, transac-
+         tion prices determine it.
+
+       Amounts  for  which  no  valuation  commodity can be found are not con-
+       verted.
+
+   Simple valuation examples
+       Here are some quick examples of -V:
+
               ; one euro is worth this many dollars from nov 1
               P 2016/11/01 EUR $1.10
 
@@ -1239,42 +1332,13 @@
               $ hledger -f t.j bal -N euros -V -e 2016/11/4
                            $110.00  assets:euros
 
-       What  are they worth after 2016/12/21 ?  (no report end date specified,
+       What are they worth after 2016/12/21 ?  (no report end date  specified,
        defaults to today)
 
               $ hledger -f t.j bal -N euros -V
                            $103.00  assets:euros
 
-   -X: Market value in specified commodity
-       The -X/--exchange option is like -V, except  it  specifies  the  target
-       commodity  you  would  like  to  convert  to.   (It  is  equivalent  to
-       --value=now,COMM or --value=end,COMM.)
-
-   Market prices
-       To convert a commodity A to commodity B, hledger looks for  a  suitable
-       market  price  (exchange  rate) in the following ways, in this order of
-       preference:
-
-       1. a declared market price - the latest P directive specifying the  ex-
-          change rate from A to B, dated on or before the valuation date.
-
-       2. a  transaction-implied  market  price  - a market price matching the
-          transaction price used in the latest transaction  where  A  is  con-
-          verted  to B, dated on or before the valuation date.  (since hledger
-          1.18; experimental)
-
-       3. a reverse declared market price - calculated by inverting a declared
-          market price from B to A.
-
-       4. a reverse transaction-implied market price - calculated by inverting
-          a transaction-implied market price from B to A.
-
-       5. an indirect market price -  calculated  by  combining  the  shortest
-          chain of market prices (any of the above types) leading from A to B.
-
    --value: Flexible valuation
-       (experimental, added 201905)
-
        -B, -V and -X are special cases of the more general --value option:
 
                --value=TYPE[,COMM]  TYPE is cost, then, end, now or YYYY-MM-DD.
@@ -1286,52 +1350,39 @@
                                     - default valuation commodity (or COMM) using current market prices
                                     - default valuation commodity (or COMM) using market prices at some date
 
-       The TYPE part basically selects either "cost", or "market value" plus a
-       valuation date:
+       The TYPE part selects cost or value and valuation date:
 
        --value=cost
-              Convert amounts to cost, using the prices recorded  in  transac-
+              Convert  amounts  to cost, using the prices recorded in transac-
               tions.
 
        --value=then
-              Convert amounts to their value in a default valuation commodity,
-              using market prices on each posting's date.  This  is  currently
-              supported only by the print and register commands.
+              Convert amounts to their value in the default valuation  commod-
+              ity,  using  market prices on each posting's date.  This is cur-
+              rently supported only by the print and register commands.
 
        --value=end
-              Convert amounts to their value in a default valuation commodity,
-              using market prices on the last day of the report period (or  if
-              unspecified, the journal's end date); or in multiperiod reports,
-              market prices on the last day of each subperiod.
+              Convert amounts to their value in the default valuation  commod-
+              ity,  using  market  prices on the last day of the report period
+              (or if unspecified, the journal's end date); or  in  multiperiod
+              reports, market prices on the last day of each subperiod.
 
        --value=now
-              Convert amounts to their value in  default  valuation  commodity
-              using current market prices (as of when report is generated).
+              Convert  amounts to their value in the default valuation commod-
+              ity using current market prices (as of  when  report  is  gener-
+              ated).
 
        --value=YYYY-MM-DD
-              Convert  amounts  to  their value in default valuation commodity
-              using market prices on this date.
-
-       The default valuation commodity is the commodity mentioned in the  most
-       recent applicable market price declaration.  When all your price decla-
-       rations lead to a single home currency, this will usually do  what  you
-       want.
+              Convert  amounts to their value in the default valuation commod-
+              ity using market prices on this date.
 
        To select a different valuation commodity, add the optional ,COMM part:
-       a comma, then the  target  commodity's  symbol.   Eg:  --value=now,EUR.
-       hledger will do its best to convert amounts to this commodity, using:
-
-       o declared prices (from source commodity to valuation commodity)
-
-       o reverse  prices  (declared prices from valuation to source commodity,
-         inverted)
-
-       o indirect prices (prices calculated from the  shortest  chain  of  de-
-         clared or reverse prices from source to valuation commodity)
-
-       in that order.
+       a  comma,  then  the  target  commodity's symbol.  Eg: --value=now,EUR.
+       hledger will do its best to convert amounts to this commodity, deducing
+       market prices as described above.
 
-       Here  are  some  examples  showing  the  effect of --value as seen with
+   More valuation examples
+       Here  are  some  examples  showing  the effect of --value, as seen with
        print:
 
               P 2000-01-01 A  1 B
@@ -1438,12 +1489,12 @@
                   a           0.50A
                   b          -0.50A
 
-   Effect of --value on reports
-       Here is a reference for how --value  currently  affects  each  part  of
-       hledger's  reports.  It's work in progress, but may be useful for trou-
-       bleshooting or reporting bugs.  See also the definitions and notes  be-
-       low.   If  you find problems, please report them, ideally with a repro-
-       ducible example.  Related: #329, #1083.
+   Effect of valuation on reports
+       Here is a reference for how valuation is supposed to affect  each  part
+       of  hledger's  reports  (and  a  glossary).  (It's wide, you'll have to
+       scroll sideways.) It may be useful when troubleshooting.  If  you  find
+       problems, please report them, ideally with a reproducible example.  Re-
+       lated: #329, #1083.
 
        Report type    -B,            -V, -X         --value=then    --value=end    --value=DATE,
                       --value=cost                                                 --value=now
@@ -1492,9 +1543,6 @@
        (with report   postings be-   fore  report                   fore  report   report start
        interval and   fore  report   start                          start
        -H)            start
-
-
-
        budget         like    bal-   like    bal-   not supported   like    bal-   like balances
        amounts with   ances          ances                          ances
        --budget
@@ -1514,7 +1562,7 @@
                       totals         totals                         totals         tals
 
 
-       Additional notes
+       Glossary:
 
        cost   calculated using price(s) recorded in the transaction(s).
 
@@ -3231,4 +3279,4 @@
 
 
 
-hledger 1.18                       June 2020                        hledger(1)
+hledger 1.18.1                     June 2020                        hledger(1)
