|
|
Calculating Interest by Day
Every month I get a file showing customer balances by day that looks
something like this.
CustID Date Balance
1 1/1/2010 100
1 1/2/2010 150
1 1/5/2010 100
2 1/1/2010 200
2 1/2/2010 250
2 1/5/2010 200
I need to calculate simple interest by day, which is easy, just take
the rate / 365 days times the balance above.
The problem I have, is the file I get excludes weekends and holidays,
but we need to charge interest for balances carried over those days.
In my example above you see the 1/3 & 1/4 are skipped (assuming they
are a Sat & Sun). But for customer 1, their $150 balance on 1/2 was
carried over on 1/3 & 1/4.
I'm at a loss as to how to calculate the interest for those missing days.
Any hints or ideas on how I could accomplish this?
|
|
0
|
|
|
|
Reply
|
douga (5)
|
3/16/2010 1:49:02 PM |
|
Doug Anderson <douga@fcstone.com> wrote:
> Every month I get a file showing customer balances by day that looks
> something like this.
>
> CustID Date Balance
> 1 1/1/2010 100
> 1 1/2/2010 150
> 1 1/5/2010 100
> 2 1/1/2010 200
> 2 1/2/2010 250
> 2 1/5/2010 200
>
> I need to calculate simple interest by day, which is easy, just take
> the rate / 365 days times the balance above.
>
> The problem I have, is the file I get excludes weekends and holidays,
> but we need to charge interest for balances carried over those days.
Any number of days can be calculated very easy with a number result
calculation date_2 - date_1.
You may try to get that second date - a date that says when this
particular balance started or when it ended - into each record. From
this moment on, every record is a balance period with its own number of
days, interest rate, and interest.
There are various ways to get there. There are two pitfalls: make sure
the periods to not overlap. And that there are no gaps.
--
http://clk.ch
|
|
0
|
|
|
|
Reply
|
clk
|
3/16/2010 5:49:47 PM
|
|
|
1 Replies
290 Views
(page loaded in 0.026 seconds)
Similiar Articles: Multiple Auto Expire Script - comp.lang.javascript... retrieve the day, etc. In other words, if it will only be used to calculate time spans, it's fine. I have code that fixes this and will post if there is any interest. Sunrise/Sunset Algorithm - comp.arch.embedded... the best approach to this is to continually calculate the ... Thus, if he period of interest is 30 minutes, then the ... Naval Observatory Washington, DC 20392 Inputs: day ... code speed moving from fortran 77 compiler to f2003 compiler ...... and reads the file until it finds the record of interest. ... was the premier 32 bit compiler in > it's day but ... etc - up to 1,000 components), we will > calculate how ... /var size? - comp.unix.solarisSunSolve document 80249 might be of interest. -- Tony ... of the image..Size my image is 240*320 . i calculate mean... ... /var size is increasing day by day - The UNIX and ... '?'s in Rom Firmware Kernal dumps - comp.sys.cbm... pecentage of that fraction has still any interest left ... the line of paying bills > and living a day by day ... But calculating branch offsets by hand was a bitch. New computer justification - comp.cad.solidworksat the end of the day, this will add up. maybe ... assembly drawings, so it's mostly of academic interest ... How to calculate the Medial Axis and the Skeleton - comp.soft ... How best to detect duplicate values in a column? - comp.databases ...If nobody finds a coding mistake in a day or two ... to invest in some answer as guage of their interest ... "Pray tell" how to calculate the total MySQL storage used by a ... Amplitude Time Ave. w/o Rectification - comp.dspSign isn't of interest here. The goal is to determine if ... time domain you could measure peak to peak and calculate ... Don't give up your day job, Cahill. An angle of 180 ... improve strlen - comp.lang.asm.x86... and ecx, -4 sub ecx, eax ; calculate any ... times already, etc... if I'm wrong and you have interest ... that if you wait long enough, someone one day will ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... Day count convention - Wikipedia, the free encyclopediaFigure representing the amount of the CouponRate to apply in calculating Interest. It is often expressed as "days in the accrual period / days in the year". Calculating Interest - Math tutorials, resources, help, resources ...To do so, you will not count the day the money is borrowed or the day the ... how to calculate interest formula; simple interest 7/30/2012 3:40:54 PM
|
|
|
|
|
|
|
|
|