gains for last 7 days?

35 views
Skip to first unread message

lipp f

unread,
Jun 23, 2023, 8:54:28 AM6/23/23
to Ledger
Hi everyone,

 "ledger bal --gain" returns all gains since inception but I would like to get the gains for last week only.

I'm trying 
    ledger bal --gain  -p "last 7 days"
but it does not return anything.

Any chance to make this work? TIA.

Martin Michlmayr

unread,
Jun 23, 2023, 11:35:18 AM6/23/23
to ledge...@googlegroups.com
* lipp f <flip...@gmail.com> [2023-06-23 05:54]:
> "ledger bal --gain" returns all gains since inception but I would like to
> get the gains for last week only.
>
> I'm trying
> ledger bal --gain -p "last 7 days"
> but it does not return anything.

I don't think --gain can be used for this. However, what should be
possible is to value your holding on day 1 and then on day 2 and
calculate the difference (manually).

e.g.
ledger -p "until 2023-01-01" --price-db pricedb/funds.pricedb -V --now 2022-12-31

I think you need both -p and --now

--
Martin Michlmayr
https://www.cyrius.com/
Reply all
Reply to author
Forward
0 new messages