[GNC] Working with compound interest on varying amounts

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[GNC] Working with compound interest on varying amounts

Tango
For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.

I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.

There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.

I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."

But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.

Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?


Thank you!


Hal
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

GnuCash - User mailing list
Hal,
Most such calculations are devilishly difficult to represent with 100% accuracy, which is why I have always opted to base my transactions on the statement, rather than try to anticipate what the finance company is going to come up with. 
David T 

 
 
  On Mon, Dec 3, 2018 at 12:10, Hal Vaughan<[hidden email]> wrote:   For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.

I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.

There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.

I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."

But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.

Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?


Thank you!


Hal
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.  
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Tango
So GnuCash doesn’t do this kind of thing?

If it’s off by a cent or two, I can deal with it, but the problem is I use one credit line for multiple projects at a time, so I have to be able to easily work out the interest for each individual project.

Hal

> On Dec 3, 2018, at 7:03 AM, David T. <[hidden email]> wrote:
>
> Hal,
>
> Most such calculations are devilishly difficult to represent with 100% accuracy, which is why I have always opted to base my transactions on the statement, rather than try to anticipate what the finance company is going to come up with.
>
> David T
>
>
> On Mon, Dec 3, 2018 at 12:10, Hal Vaughan
> <[hidden email]> wrote:
> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>
> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>
> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>
> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>
> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>
> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>
>
> Thank you!
>
>
> Hal
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Stephen M. Butler
On 12/3/18 6:02 AM, Hal Vaughan wrote:
> So GnuCash doesn’t do this kind of thing?
>
> If it’s off by a cent or two, I can deal with it, but the problem is I use one credit line for multiple projects at a time, so I have to be able to easily work out the interest for each individual project.
>
> Hal

Not automatically.  Remember that you can enter formulas instead of
values into the debit/credit fields.  However, even here the values you
want to use are not represented by symbolic variables. That is, GNC has
nothing to which the current balance of the account is assigned.  And,
your interest rate varies along with the number of days between
transactions.  However, you could enter the values and let GNC calculate
the results.  You may have to enter extra transactions on the dates so
you can pick up the new balance to use for the next transaction date. 
In general, the interest amount to add to the outstanding balance is: 
old-balance * annual-interest-rate * #daysbetween / 360 (or 365
depending on your bank.

January 1 - withdraw $50,000 from zero balance giving a loan balance of
$50,000

January 15 - calc interest @3% for 14 days -- $50,000 * .03 * 14 / 365 
(grab the value GNC calculates and put it on the Interest Expense for
the project).  May need to round it up/down from $57.534246.  Lets call
it $57.53

January 15 - withdraw another $10,000 giving new balance of $60,057.53

January 31 - cal additional interest for past 16 days: $60,057.53 * .03
* 16 / 365 = =$78.979765479 (round it up to $78.98).

This will get more complicated if the $50,000 was for the purchase of
one house but the $10,000 was for the roof of another house.

So, this will take more typing -- but GNC can do the calculations -- you
just need to remember the formula.

As David indicated, it will be easier to take the values from the
statement and enter them after the fact.  Again, more complicated if you
have more than one project in a given month.

If your bank allows you to download the transactions as a QFX (or
related) file, that would be the simplest.  Simply override which
project gets the expense side of the transaction -- including the
interest transactions.

--Steve

>> On Dec 3, 2018, at 7:03 AM, David T. <[hidden email]> wrote:
>>
>> Hal,
>>
>> Most such calculations are devilishly difficult to represent with 100% accuracy, which is why I have always opted to base my transactions on the statement, rather than try to anticipate what the finance company is going to come up with.
>>
>> David T
>>
>>
>> On Mon, Dec 3, 2018 at 12:10, Hal Vaughan
>> <[hidden email]> wrote:
>> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>>
>> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>>
>> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>>
>> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>>
>> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>>
>> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>>
>>
>> Thank you!
>>
>>
>> Hal

--
Stephen M Butler, PMP, PSM
[hidden email]
[hidden email]
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Dale Alspach-2
I am assuming that the credit line is actually using daily compounding.
In that case the calculations in the response from Steve are not correct.

An alternate approach is to consider is the following.

Warning: I tried this with a toy example. It seems to work but there may
be some downsides that I have not noticed. There may be better choices
for the types of accounts or a way to use a fake currency that will make
some things more intuitive.

Create a liability account for the credit line. Name it Restorations.

Create a (internal to your gnucash account) security CDOLL (compounded
dollar). Use the Price editor to initiate the value at $1.00. This
security will represent the value of a dollar after compounding since
Day 1. So if the daily interest rate is constant r, CDOLL has price
(1+r)^n on Day n+1. (Below I use CDOLL(n) to denote the value on Day n.)
If the daily rate fluctuates, then an external table, spreadsheet or
calculator will be needed to track this.

For each restoration project create a stock subaccount of Restorations
with shares in the security CDOLL.
Suppose one such account is named House 1.

Suppose it is Day 10 and $50,000 is used to purchase the property. Enter
a transaction in account House 1 with share price CDOLL on Day 10, i.e.,
CDOLL(10), and Sell (Cost) $50,000. Gnucash will compute the number of
shares as $50,000/CDOLL(10). (The Sell may seem strange but this is to
cause an increase in liabilty. Total shares and value will be negative
as well.)

It is now Day 15. To get the portion of the credit line for House 1
enter the current value (Day 15 value) of CDOLL using the Price editor.
The (negative) value in dollars of House 1 will show the result of
50,000/CDOLL(10)*CDOLL(15) which is $50,000 plus interest accumulated
for the Days 11 to 15. Note that every project will reflect its current
value after this one entry with the Price editor. The value of
Restorations will show the total liability from all of the projects.

Every time there is an additional borrowing or a repayment is made the
value of CDOLL on that day should be used as the share price and the
Sell or Buy should be the actual dollar amount.

Dale




On 12/3/18 12:52 PM, Stephen M. Butler wrote:

> On 12/3/18 6:02 AM, Hal Vaughan wrote:
>> So GnuCash doesn’t do this kind of thing?
>>
>> If it’s off by a cent or two, I can deal with it, but the problem is I
>> use one credit line for multiple projects at a time, so I have to be
>> able to easily work out the interest for each individual project.
>>
>> Hal
>
> Not automatically.  Remember that you can enter formulas instead of
> values into the debit/credit fields.  However, even here the values you
> want to use are not represented by symbolic variables. That is, GNC has
> nothing to which the current balance of the account is assigned.  And,
> your interest rate varies along with the number of days between
> transactions.  However, you could enter the values and let GNC calculate
> the results.  You may have to enter extra transactions on the dates so
> you can pick up the new balance to use for the next transaction date. 
> In general, the interest amount to add to the outstanding balance is: 
> old-balance * annual-interest-rate * #daysbetween / 360 (or 365
> depending on your bank.
>
> January 1 - withdraw $50,000 from zero balance giving a loan balance of
> $50,000
>
> January 15 - calc interest @3% for 14 days -- $50,000 * .03 * 14 / 365 
> (grab the value GNC calculates and put it on the Interest Expense for
> the project).  May need to round it up/down from $57.534246.  Lets call
> it $57.53
>
> January 15 - withdraw another $10,000 giving new balance of $60,057.53
>
> January 31 - cal additional interest for past 16 days: $60,057.53 * .03
> * 16 / 365 = =$78.979765479 (round it up to $78.98).
>
> This will get more complicated if the $50,000 was for the purchase of
> one house but the $10,000 was for the roof of another house.
>
> So, this will take more typing -- but GNC can do the calculations -- you
> just need to remember the formula.
>
> As David indicated, it will be easier to take the values from the
> statement and enter them after the fact.  Again, more complicated if you
> have more than one project in a given month.
>
> If your bank allows you to download the transactions as a QFX (or
> related) file, that would be the simplest.  Simply override which
> project gets the expense side of the transaction -- including the
> interest transactions.
>
> --Steve
>
>>> On Dec 3, 2018, at 7:03 AM, David T. <[hidden email]> wrote:
>>>
>>> Hal,
>>>
>>> Most such calculations are devilishly difficult to represent with
>>> 100% accuracy, which is why I have always opted to base my
>>> transactions on the statement, rather than try to anticipate what the
>>> finance company is going to come up with.
>>>
>>> David T
>>>
>>>
>>> On Mon, Dec 3, 2018 at 12:10, Hal Vaughan
>>> <[hidden email]> wrote:
>>> For the past few years, for my business that is mostly about
>>> renovating or restoring houses and reselling them (not flipping -
>>> this work takes time), I’ve used a Python library I wrote myself to
>>> handle accounting.  It was basically made up mostly of stuff I had,
>>> with a few new things added in.
>>>
>>> I would like to switch over to GnuCash.  Luckily, since I’m at a slow
>>> point and between projects, I can do that without worrying about
>>> converting old data for older LLCs and projects.
>>>
>>> There’s one issue I’m not sure can be handled by GnuCash, so I’d like
>>> to find out about it before trying to switch over.
>>>
>>> I use a line of credit.  Luckily the interest rate is basically
>>> constant.  (There’s a slight flux, but not much.)  The problem is its
>>> compounded and, of course, every time I withdraw money from the
>>> credit line or pay any back, the principal amount changes.  I’m
>>> hoping, at this point, people are saying, "Oh, yeah, just do this…."
>>>
>>> But just in case there’s a need for clarification, if I withdraw
>>> $50,000 to purchase a house on January 1, then, on the 15th, withdraw
>>> $10,000 for roofing work, need to figure out the total owed to that
>>> credit line on 1/31, and the interest rate is 3%, then I have to
>>> figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I
>>> have to add $10,000 to that amount to calculate the interest on the
>>> $50,000 plus 15 days of interest, plus $10,000, plus the interest
>>> from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>>>
>>> Can I have this done automatically on an account?  If not, how can I
>>> easily keep track of this in GnuCash?
>>>
>>>
>>> Thank you!
>>>
>>>
>>> Hal
>
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Derek Atkins
In reply to this post by Tango
Hal,

Hal Vaughan <[hidden email]> writes:

> So GnuCash doesn’t do this kind of thing?
>
> If it’s off by a cent or two, I can deal with it, but the problem is I
> use one credit line for multiple projects at a time, so I have to be
> able to easily work out the interest for each individual project.

I'm afraid that GnuCash really does NOT have the capability to deal with
this today.  It does not have a "Balance-as-of-date" function necessary
to do what you need.   So unfortunately you'll need to write a bunch of
code to support what you're looking for.

> Hal

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Tango
In reply to this post by Tango
Let me add another thought to this.  I’m putting it on the original thread, since it really would be something I’m tempted to ask in response to several answers.

I already have routines, in Python, that do this in my own ledger program.  However, I’m really trying to move away from doing any development work on software I use for professional work.  (In other words, for my own sanity, I’m trying to draw a line and keep programming for hobby stuff now and not do any programming for my real estate and investment work.)

I think I’ve read that the GnuCash ledger is in XML or an open format.  How hard would it be to add transactions to the ledger?  And is it possible to call, say, a Python script from any extension menu in the program?  I’m on an iMac and can always run the Python script on my own if needed.

(I’m wondering if I researched this before.  I’m asking now just to know if it’s possible - if it is, I’ll be glad to dig in and find what I need, but I’d rather know if it’s worth exploring before trying to jump in.)


Thank you!

Hal

> On Dec 3, 2018, at 1:38 AM, Hal Vaughan <[hidden email]> wrote:
>
> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>
> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>
> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>
> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>
> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>
> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>
>
> Thank you!
>
>
> Hal
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Stephen M. Butler
On 12/4/18 6:56 AM, Hal Vaughan wrote:
> Let me add another thought to this.  I’m putting it on the original thread, since it really would be something I’m tempted to ask in response to several answers.
>
> I already have routines, in Python, that do this in my own ledger program.  However, I’m really trying to move away from doing any development work on software I use for professional work.  (In other words, for my own sanity, I’m trying to draw a line and keep programming for hobby stuff now and not do any programming for my real estate and investment work.)


While I have not used them (yet), I understand that there is an API
available to handle most transactions and all back-end interaction to
the data store.

I haven't found the API documentation yet.

> I think I’ve read that the GnuCash ledger is in XML or an open format.  How hard would it be to add transactions to the ledger?  And is it possible to call, say, a Python script from any extension menu in the program?  I’m on an iMac and can always run the Python script on my own if needed.


XML is the default storage (compressed).  Options include some database
environments.

> (I’m wondering if I researched this before.  I’m asking now just to know if it’s possible - if it is, I’ll be glad to dig in and find what I need, but I’d rather know if it’s worth exploring before trying to jump in.)
>
>
> Thank you!
>
> Hal
>
>> On Dec 3, 2018, at 1:38 AM, Hal Vaughan <[hidden email]> wrote:
>>
>> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>>
>> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>>
>> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>>
>> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>>
>> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>>
>> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>>
>>
>> Thank you!
>>
>>
>> Hal
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


--
Stephen M Butler, PMP, PSM
[hidden email]
[hidden email]
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

Tango

This gave me enough to tell me it’s worth it to take time to look into this.  (I’ve found so many times I can spend hours or more just looking into questions on some programs only to find out I can’t do anything close to what I want or need to do.)  Often I find it helps to just ask a community, "Can I do this with this program?"  It can be tough to dive into a new API or system just to find out if a task is even doable.  (Or if it can be done without months of work!)

I found GnuCash does have an API with Python bindings, but on the iMac, I would have to access it through MacPorts.  I’ve used MacPorts before and like a lot of what it offers, but I’ve also had it really mess a few things up.  (For instance the MacPorts Perl, Python and other scripting languages pre-empt the native versions on macOS.  I’ve had that create serious problems with system and library updates in the past.)  I refuse to use MacPorts because it’s caused me significant problems in the past.

But even knowing that the ledger is in XML and that the entries can be edited outside of the program tells me all I need to know.  I’ll be following up on the appropriate GnuCash mailing list.

Thanks for that info!


> On Dec 4, 2018, at 4:47 PM, Stephen M. Butler <[hidden email]> wrote:
>
> On 12/4/18 6:56 AM, Hal Vaughan wrote:
>> Let me add another thought to this.  I’m putting it on the original thread, since it really would be something I’m tempted to ask in response to several answers.
>>
>> I already have routines, in Python, that do this in my own ledger program.  However, I’m really trying to move away from doing any development work on software I use for professional work.  (In other words, for my own sanity, I’m trying to draw a line and keep programming for hobby stuff now and not do any programming for my real estate and investment work.)
>
>
> While I have not used them (yet), I understand that there is an API available to handle most transactions and all back-end interaction to the data store.
>
> I haven't found the API documentation yet.

I did find a little on the API.  I’d be working in Python, since my simple ledger libraries are in Python.  But Python bindings, on an iMac, are in MacPorts.  My comments at the top address MacPorts.

>> I think I’ve read that the GnuCash ledger is in XML or an open format.  How hard would it be to add transactions to the ledger?  And is it possible to call, say, a Python script from any extension menu in the program?  I’m on an iMac and can always run the Python script on my own if needed.
>
>
> XML is the default storage (compressed).  Options include some database environments.

That’s a big help.  XML can easily be worked with, so it’s not hard to study or find the format info so I can add entries if I need to.

Thanks for the info!


Hal


> (I’m wondering if I researched this before.  I’m asking now just to know if it’s possible - if it is, I’ll be glad to dig in and find what I need, but I’d rather know if it’s worth exploring before trying to jump in.)
>>
>>
>> Thank you!
>>
>> Hal
>>
>>> On Dec 3, 2018, at 1:38 AM, Hal Vaughan <[hidden email]> wrote:
>>>
>>> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>>>
>>> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>>>
>>> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>>>
>>> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>>>
>>> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>>>
>>> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>>>
>>>
>>> Thank you!
>>>
>>>
>>> Hal
>> _______________________________________________
>> gnucash-user mailing list
>> [hidden email]
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
>
> --
> Stephen M Butler, PMP, PSM
> [hidden email]
> [hidden email]
> 253-350-0166
> -------------------------------------------
> GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

John Ralls
In reply to this post by Stephen M. Butler
The API documentation is at https://code.gnucash.org/docs/MAINT <https://code.gnucash.org/docs/MAINT>. It’s for the C/C++ API but the python bindings follow that pretty closely; there’s some python-specific documentation at https://code.gnucash.org/docs/MAINT/python_bindings_page.html <https://code.gnucash.org/docs/MAINT/python_bindings_page.html> and some more information at https://wiki.gnucash.org/wiki/Python_Bindings <https://wiki.gnucash.org/wiki/Python_Bindings>.

Sébastien will come along and suggest piecash (https://github.com/sdementen/piecash <https://github.com/sdementen/piecash>) so I’ll save him the trouble ;-). Note that piecash doesn’t implement any of GnuCash’s business logic so it’s up to the user to ensure that everything is in balance. Note as well that piecash works only with SQLite3, not XML.

Regards,
John Ralls


> On Dec 5, 2018, at 6:47 AM, Stephen M. Butler <[hidden email]> wrote:
>
> On 12/4/18 6:56 AM, Hal Vaughan wrote:
>> Let me add another thought to this.  I’m putting it on the original thread, since it really would be something I’m tempted to ask in response to several answers.
>>
>> I already have routines, in Python, that do this in my own ledger program.  However, I’m really trying to move away from doing any development work on software I use for professional work.  (In other words, for my own sanity, I’m trying to draw a line and keep programming for hobby stuff now and not do any programming for my real estate and investment work.)
>
>
> While I have not used them (yet), I understand that there is an API available to handle most transactions and all back-end interaction to the data store.
>
> I haven't found the API documentation yet.
>
>> I think I’ve read that the GnuCash ledger is in XML or an open format.  How hard would it be to add transactions to the ledger? And is it possible to call, say, a Python script from any extension menu in the program?  I’m on an iMac and can always run the Python script on my own if needed.
>
>
> XML is the default storage (compressed).  Options include some database environments.
>
>> (I’m wondering if I researched this before.  I’m asking now just to know if it’s possible - if it is, I’ll be glad to dig in and find what I need, but I’d rather know if it’s worth exploring before trying to jump in.)
>>
>>
>> Thank you!
>>
>> Hal
>>
>>> On Dec 3, 2018, at 1:38 AM, Hal Vaughan <[hidden email]> wrote:
>>>
>>> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>>>
>>> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>>>
>>> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>>>
>>> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes. I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>>>
>>> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>>>
>>> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>>>
>>>
>>> Thank you!
>>>
>>>
>>> Hal
>> _______________________________________________
>> gnucash-user mailing list
>> [hidden email]
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
>
> --
> Stephen M Butler, PMP, PSM
> [hidden email] <mailto:[hidden email]>
> [hidden email] <mailto:[hidden email]>
> 253-350-0166
> -------------------------------------------
> GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email] <mailto:[hidden email]>
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user <https://lists.gnucash.org/mailman/listinfo/gnucash-user>
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists <https://wiki.gnucash.org/wiki/Mailing_Lists> for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

John Ralls
In reply to this post by Tango
GnuCash requires Python3 for the python bindings, and in order for them to work in the bundle I’d have to add python3 to it. It’s too big to burden the 99% of users who aren’t interested in Python bindings so it’s not in the bundle.

If you’re comfortable building software you can also build your own stand-alone GnuCash with the Python bindings enabled, see https://wiki.gnucash.org/wiki/MacOS/Quartz.

Regards,
John Ralls

> On Dec 5, 2018, at 8:58 AM, Hal Vaughan <[hidden email]> wrote:
>
>
> This gave me enough to tell me it’s worth it to take time to look into this.  (I’ve found so many times I can spend hours or more just looking into questions on some programs only to find out I can’t do anything close to what I want or need to do.)  Often I find it helps to just ask a community, "Can I do this with this program?"  It can be tough to dive into a new API or system just to find out if a task is even doable.  (Or if it can be done without months of work!)
>
> I found GnuCash does have an API with Python bindings, but on the iMac, I would have to access it through MacPorts.  I’ve used MacPorts before and like a lot of what it offers, but I’ve also had it really mess a few things up.  (For instance the MacPorts Perl, Python and other scripting languages pre-empt the native versions on macOS.  I’ve had that create serious problems with system and library updates in the past.)  I refuse to use MacPorts because it’s caused me significant problems in the past.
>
> But even knowing that the ledger is in XML and that the entries can be edited outside of the program tells me all I need to know. I’ll be following up on the appropriate GnuCash mailing list.
>
> Thanks for that info!
>
>
>> On Dec 4, 2018, at 4:47 PM, Stephen M. Butler <[hidden email]> wrote:
>>
>> On 12/4/18 6:56 AM, Hal Vaughan wrote:
>>> Let me add another thought to this.  I’m putting it on the original thread, since it really would be something I’m tempted to ask in response to several answers.
>>>
>>> I already have routines, in Python, that do this in my own ledger program.  However, I’m really trying to move away from doing any development work on software I use for professional work.  (In other words, for my own sanity, I’m trying to draw a line and keep programming for hobby stuff now and not do any programming for my real estate and investment work.)
>>
>>
>> While I have not used them (yet), I understand that there is an API available to handle most transactions and all back-end interaction to the data store.
>>
>> I haven't found the API documentation yet.
>
> I did find a little on the API.  I’d be working in Python, since my simple ledger libraries are in Python.  But Python bindings, on an iMac, are in MacPorts.  My comments at the top address MacPorts.
>
>>> I think I’ve read that the GnuCash ledger is in XML or an open format.  How hard would it be to add transactions to the ledger? And is it possible to call, say, a Python script from any extension menu in the program?  I’m on an iMac and can always run the Python script on my own if needed.
>>
>>
>> XML is the default storage (compressed).  Options include some database environments.
>
> That’s a big help.  XML can easily be worked with, so it’s not hard to study or find the format info so I can add entries if I need to.
>
> Thanks for the info!
>
>
> Hal
>
>
>> (I’m wondering if I researched this before.  I’m asking now just to know if it’s possible - if it is, I’ll be glad to dig in and find what I need, but I’d rather know if it’s worth exploring before trying to jump in.)
>>>
>>>
>>> Thank you!
>>>
>>> Hal
>>>
>>>> On Dec 3, 2018, at 1:38 AM, Hal Vaughan <[hidden email]> wrote:
>>>>
>>>> For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>>>>
>>>> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>>>>
>>>> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>>>>
>>>> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes. I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>>>>
>>>> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>>>>
>>>> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>>>>
>>>>
>>>> Thank you!
>>>>
>>>>
>>>> Hal
>>> _______________________________________________
>>> gnucash-user mailing list
>>> [hidden email]
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>>> -----
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>>
>>
>> --
>> Stephen M Butler, PMP, PSM
>> [hidden email]
>> [hidden email]
>> 253-350-0166
>> -------------------------------------------
>> GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8
>>
>> _______________________________________________
>> gnucash-user mailing list
>> [hidden email]
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email] <mailto:[hidden email]>
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user <https://lists.gnucash.org/mailman/listinfo/gnucash-user>
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists <https://wiki.gnucash.org/wiki/Mailing_Lists> for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
prl
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Working with compound interest on varying amounts

prl
In reply to this post by GnuCash - User mailing list
As David said.

In Australia, mortgage accounts can be quite complicated to represent.
They are often variable-rate; it's common to pay at 4-weekly intervals
while interest is calculated daily, but debited from the account at the
end of the calendar month; and advance payments (and sometimes
withdrawals against advance payments) are allowed.

It's also common for mortgage offset accounts to be attached to
mortgages, which, instead of paying interest, the offset account's
balance is subtracted from the mortgage accounts balance when the daily
mortgage interest is being calculated. This gives an effective interest
rate for the offset account equal to the mortgage interest rate, and is
tax free, because no money is actually paid.

It all meant that when I had mortgage account, the interest calculation
was way beyond my ability to convince GnuCash to calculate (and I didn't
even use an offset account).

Instead, I ran a spreadsheet that calculated estimated interest due, and
used that to make sure there weren't any gross errors in the bank's
calculations. I simply copied the actual interest in the monthly bank
statement into GnuCash, so that GunCash's balance would reconcile.

I do something similar for our on-call higher-interest savings accounts.
The interest on our current account is so pitiful it's not worth
calculating.

That's probably good enough for personal finances, but may not be good
enough for your business use.

Peter

On 3/12/2018 23:03, David T. via gnucash-user wrote:

> Hal,
> Most such calculations are devilishly difficult to represent with 100% accuracy, which is why I have always opted to base my transactions on the statement, rather than try to anticipate what the finance company is going to come up with.
> David T
>
>  
>  
>    On Mon, Dec 3, 2018 at 12:10, Hal Vaughan<[hidden email]> wrote:   For the past few years, for my business that is mostly about renovating or restoring houses and reselling them (not flipping - this work takes time), I’ve used a Python library I wrote myself to handle accounting.  It was basically made up mostly of stuff I had, with a few new things added in.
>
> I would like to switch over to GnuCash.  Luckily, since I’m at a slow point and between projects, I can do that without worrying about converting old data for older LLCs and projects.
>
> There’s one issue I’m not sure can be handled by GnuCash, so I’d like to find out about it before trying to switch over.
>
> I use a line of credit.  Luckily the interest rate is basically constant.  (There’s a slight flux, but not much.)  The problem is its compounded and, of course, every time I withdraw money from the credit line or pay any back, the principal amount changes.  I’m hoping, at this point, people are saying, "Oh, yeah, just do this…."
>
> But just in case there’s a need for clarification, if I withdraw $50,000 to purchase a house on January 1, then, on the 15th, withdraw $10,000 for roofing work, need to figure out the total owed to that credit line on 1/31, and the interest rate is 3%, then I have to figure compound interest on $50,000 at 3% from 1/1 to 1/15.  Then I have to add $10,000 to that amount to calculate the interest on the $50,000 plus 15 days of interest, plus $10,000, plus the interest from the 15th to the 30th, at 3%, to get a clear number for what I owe.
>
> Can I have this done automatically on an account?  If not, how can I easily keep track of this in GnuCash?
>
>
> Thank you!
>
>
> Hal
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.