Financial interest calculation
saher edris
saher_edris at yahoo.com
Sat Dec 18 14:02:04 EST 2004
Hi Terry,
After testing the Julian day calculation in U.S. Naval observatory website http://aa.usno.navy.mil/data/docs/JulianDate.html
and comparing the results for both formula's i was surprised to get on both of them incorrect
results for the date (24/06/2002) .... using your formula i got "2452408.98" in Julian format
using the other formula i got "2452439.41"
regarding the fin.c code for the financial calculator i went through it several times but the
equations that are not clear to me for example i have a deal that has the following parameters :
financed amount 3076.5
payment term 60 months
future value 4440
no grace period ..... does it affect the calculation if it is existed ?
using the following equations would you mind mapping those parameters to any of them
explaining why you choose specific one that the others
* if PMT*FV >= 0, then PV case what does this condition mean ?
* if PMT*FV < 0, then FV case what does this condition mean ?
How the guessing part is being handled here ?
*
* PV case:
* | n*PMT + PV + FV |
* 16) i[0] = | ----------------|
* | n*PV |
*
* = abs[(n*PMT + PV + FV)/(n*PV)]
*
* FV case:
* a) PV != 0
*
* | FV - n*PMT |
* 17) i[0] = |---------------------------|
* | 3*[PMT*(n-1)^2 + PV - FV] |
*
* = abs[(FV-n*PMT)/(3*(PMT*(n-1)^2+PV-FV))]
* b) PV == 0
*
* | FV + n*PMT |
* 18) i[0] = |---------------------------|
* | 3*[PMT*(n-1)^2 + PV - FV] |
*
* = abs[(FV+n*PMT)/(3*(PMT*(n-1)^2+PV-FV))]
Regards
Saher Edris
Friends <fastsnip-frnds1 at yahoo.com> wrote:
On Saturday 18 December 2004 08:52, saher edris wrote:
> I could like some clarification regarding ... how Newton's Raphson is being
> used in calculating the nominal interest rate from given parameters like
> "p.v. , payment term,f.v."
>
>
> Regards
>
> Saher Edris
Please examine the file "src/calculation/fin.c". In particular read the
comment lines starting at line 475 and continuing to line 528. These lines
explain the calculation of interest from the other four parameters.
I am sure that if you read the comment lines starting at line 24 and
continuing through line 1,130, they will explain most of the questions you
might have about the financial calculator computations. I tried to explain as
much as possible in the comment lines about not only the code, but the logic
behind the code and the financial calculation assumptions. Approximately half
of the file is comments on the financial equations, how they are coded and
their use.
Have you been able to compare your JDN modification against the USNO
computation and/or against the other test dates I sent?
Terry
--
++++++++++++++++++++++++++++++++++++++++++++++++++++++
======================================================
******************************************************
"A human being is part of the whole called by us the
Universe. We experience ourselves, our thoughts and
feelings as something separated from the rest --a kind
of optical delusion of consciousness.
This delusion is a kind of prison for us, restricting
us to our personal desires and to affection for a few
persons nearest us. Our task must be to free ourselves
from this prison by widening our circle of compassion
to embrace all living creatures, and the whole of
nature in its beauty."
Albert Einstein.
"We can't solve problems by using the same kind of
thinking we used when we created them."
--Albert Einstein
******************************************************
We have the best government money can buy, and it has.
Terry Boldt.
******************************************************
You must decide:
Are you a body with a soul or a soul with a body?
Terry Boldt
******************************************************
When you change the way you look at things,
the things you look at change.
******************************************************
Paraphrasing Ben Franklin:
Those who sacrifice freedom for safety, have neither.
The exact quote:
They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety.
Benjamin Franklin (1706 - 1790),
US author, diplomat, inventor, physicist, politician, & printer
Historical Review of Pennsylvania, 1759
******************************************************
A thought often repeated becomes an act, an act often
repeated becomes a habit, a habit often repeated,
a character and a settled character molds the very
destiny of man.
Man is the master of his own destiny.
"The Voice of Babaji", Page 236
******************************************************
What man thinks, that he becomes
Upanishad
******************************************************
Common sense is so very extraordinary
for being for so very uncommon.
Terry Boldt
******************************************************
To say what is real,
Must be exactly what we feel,
To speak of the truth,
And be open this way,
Is to say what you mean,
And mean what you say.
Pearl Boldt
******************************************************
"If you don't know, you cannot teach, except by faith.
And faith implies doubt. Doubt and the resulting
repression of doubt breed fanaticism and intolerance.
Worse, they breed ignorance pretending to infallibility,
which breeds charlatans and blind followers."
"Muddy Tracks", Frank DeMarco, page xxv
******************************************************
"for without time,no thought of anything is possible;
without space, no conception of anything is possible and
without causation no consideration of anything is possible. And
again, time space and causation generally appear inter-related
in our consciousness not dependent of one another.
So the mind lives, moves and has its existence in these
three notions, which are necessarily finite, owing to
their perceptional value and without which we cannot think,
conceive or imagine anything. Deprived of these three,
the constitution of the mind breaks down."
"The Voice of Babaji", Page 442-443
******************************************************
"The definition of and the mystery and meaning of faith,
will open like a flower, only while sitting in silence.
Faith in something greater than oneself is tantamount to
a veil being withdrawn from the depths and distances
glimmering within, and a feeling of eternal hunger for
peace and fullness, for all that the distracted world
of today denies. It is not possible to discover the Real
and abide in it, except by our own experience."
"The Voice of Babaji", Page 444
******************************************************
******************************************************
---------------------------------
Do you Yahoo!?
Meet the all-new My Yahoo! Try it today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20041218/d2afed63/attachment.htm
More information about the gnucash-devel
mailing list