hledger icon indicating copy to clipboard operation
hledger copied to clipboard

Forecast with dynamic purchase amount

Open makdisse opened this issue 5 years ago • 2 comments

What I'm trying to achieve: Simulate 2 years in the future while making changes to the valuation of an asset and the purchase power of the currency I use to purchase the asset.

The feature that would allow me to achieve this: Allowing for a periodic transaction notation that will simulate the purchase of a dynamic amount of an asset based on the price of that asset defined in future dates.

I understand that there are ways I can do this now, but they involve copy&pasting multiple entries.

So my expectation is that I would be able to define something like this:

~ Monthly
    Assets:Holdings:Asset      X ASSET
    Assets:BankA:Checking      -100 GBP

P 2020-05-05 BRL 0.15 GBP
P 2020-05-05 ASSET 3 BRL

P 2020-08-05 BRL 0.16 GBP
P 2020-08-05 ASSET 6 BRL

Then by running a forecast report I would be able to see how many assets where purchase on each month taking the P conversions into consideration:

  • Convert GBP to BRL: 100*(1/0.15)
  • 666 BRL can purchase 222 ASSET from May onward (until Aug)
  • In the report I would see 222 ASSET being added to my Assets:Holdings:Asset

makdisse avatar May 05 '20 20:05 makdisse

@simonmichael FYI I've removed the bounty. Thanks

makdisse avatar Mar 21 '22 11:03 makdisse

Thanks @makdisse. I think moving this forward would require writing the specification/docs for it. Do you want to try, or shall we close this for now ?

simonmichael avatar Mar 21 '22 18:03 simonmichael