• Here's a little test harness. It's a simplification of your problem - all you have to play with is the accrual date and the delta you want to apply to it.

    It won't meet your requirement, but it will help you to describe your issue to us:

    WITH SampleData AS (

    SELECT TOP 1000 [AccrualDate] = CAST(DATEADD(d,ABS(checksum(NEWID())) % 100,GETDATE()) AS DATE)

    FROM sys.columns

    )

    SELECT

    AccrualDate,

    delta1,

    DATEADD(d,delta1,AccrualDate),

    delta2,

    DATEADD(d,delta2,AccrualDate)

    FROM (

    SELECT

    [AccrualDate],

    [delta1] = 0-DENSE_RANK() OVER(ORDER BY [AccrualDate] DESC),

    [delta2] = 0-ROW_NUMBER() OVER(ORDER BY [AccrualDate] DESC)

    FROM SampleData

    ) g

    ORDER BY [AccrualDate] DESC

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden