Actually in this case, January isn't forecasting at all because it is the 
current month. Yearly amounts should only forecast on Jan 1 of the year, so 
since it is forecasting for Feb 1 and March 1, the yearly amount should not 
be calculated in the totals. Furthermore, if you run the forecast out to 
say '2016/02/01' you'll see that the $500 becomes a forecast transaction of 
it's own on 2016/01/01 followed by the 2016/01/01 Monthly forecast 
transaction.  So in this case, due to the date the forecast is run, the 
Yearly amount should not be considered.

On Wednesday, January 6, 2016 at 5:06:33 AM UTC-7, Jim Robinson wrote:
>
> I'm sorry if this is me being dense, but how is the math wrong?  Isn't 
> ledger just applying the $500.00 expense right away?
>
> Jan: 2000.00 - 500.00 - 100.00 - 12.50 = 1387.50
> Feb: 1387.50 + 2000.00 - 100.00 = 3287.50
>
> On Tuesday, January 5, 2016 at 11:09:50 AM UTC-8, Chris wrote:
>>
>> I have noticed an interesting phenomenon when using ledger-cli to 
>> forecast my accounts.  
>>
>> Using the ledger file below:
>> ~ Yearly
>>     Expenses:Auto                                    $500.00
>>     Assets:Checking
>>
>> ~ Monthly
>>     Income:Timberline                               -$2000.00
>>     Expenses:Dining                                  $100.00
>>     Assets:Checking
>>
>> 2016/01/04 TACO BELL
>>     Expenses:Dining                                   $12.50
>>     Assets:Checking
>>
>> And this command:
>> ledger reg Checking -f .\test.dat --forecast "d<[2016/03/02]"
>>
>> I get the following output:
>> 16-Jan-04 TACO BELL             Assets:Checking             $-12.50     
>>  $-12.50
>> 16-Feb-01 Forecast transaction  Assets:Checking            $1900.00     
>> $1387.50
>> 16-Mar-01 Forecast transaction  Assets:Checking            $1900.00     
>> $3287.50
>>
>> Notice the incorrect math in the totals column.  If, however, I remove 
>> the ~Yearly section, like this:
>> ~ Monthly
>>     Income:Timberline                               -$2000.00
>>     Expenses:Dining                                  $100.00
>>     Assets:Checking
>>
>> 2016/01/04 TACO BELL
>>     Expenses:Dining                                   $12.50
>>     Assets:Checking
>>
>> And the same command, I get the following output:
>> 16-Jan-04 TACO BELL             Assets:Checking             $-12.50     
>>  $-12.50
>> 16-Feb-01 Forecast transaction  Assets:Checking            $1900.00     
>> $1887.50
>> 16-Mar-01 Forecast transaction  Assets:Checking            $1900.00     
>> $3787.50
>>
>> Notice the math is correct.  For some reason, adding seperate budget 
>> groups such as Yearly or Quarterly cause the math to be incorrect for 
>> monthly forecasts by the totals in those groups.
>>
>> Any ideas?
>>
>> Thanks for any insight you can share!
>>
>>
>>
>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to