I haven't found any information on this so here goes: Is there any general formula for calculating future value of an annuity (recurring deposit) when the interval of interest compounding is variable? For example if a recurring deposit P is made weekly and interest is accumulated at a rate r, how much will the future value be after 15 weeks IF interest is compounded on only the 5th week, 9th week, 12th week, 14th week and 15th week? I know that for the purposes of this example you can easily just calculate the future value by writing out the terms but I was wondering if there's a general way to handle this type of problem.
Thanks