Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Days count calculation for loan

Aqureshi025
8 - Asteroid

Hi Everyone,

 

I am struggling to write the formula for the days count basis. 

 

Below is my data. Based on the calculation of date basis, my interest income / expense should be calculated on that basis. Means if the date basis is actual / 365 then the formulae should calculate the actual number of days in 201X year divide by 365

 But if it is Actual / Actual, then it should calculate the actual number of days of loan in that year / actual number of days of that 201X year. for e.g 2015 has 364 days then 2014 it should be 364 days of 2015 has 365 days then divide by 365. Also 30/360 factor.

 

Can any one help. Below is the extract from my original data

 

 

NumberCurrencyAmountNominal RateStart date of loanMaturity Date of loanDate BasisYearEnd
AGBP500000000.7527/10/202025/01/2021Actual/36531/12/2020
BCHF100000001.3522/09/201714/03/202030E/360 EOM31/12/2017
CMXN1000000001.9521/12/201821/12/202130E/36031/12/2018
DUSD200000002.5516/03/202014/04/2020Actual/36031/12/2020
EEUR-500000003.1519/01/201719/01/2032Actual/Actual (1)31/12/2017
FEUR-1230000003.7512/06/201930/06/202930/36031/12/2019
GAUD-1400000004.3504/02/201604/02/2026Actual/Actual (2)31/12/2016
HCNY10000000004.9516/07/202028/06/2021Actual+/Actual ISDA31/12/2020
ICNY10000000005.5504/03/202003/03/2021Actual/Actual ISDA31/12/2020
5 REPLIES 5
AngelosPachis
16 - Nebula

Hi @Aqureshi025 ,

 

I've seen a couple of questions in the community similar to this one but unfortunately, most of them have gone unanswered because the outcome is not very clear.

 

Could you help us assist you by giving a more representative example of the calculations needed? The 2014-2015 example seems a bit confusing to me.

Aqureshi025
8 - Asteroid

Hi

 

it is clear that i need to calculate based on the actual days count basis mentioned in the table

jdunkerley79
ACE Emeritus
ACE Emeritus

You would need to build something like:

jdunkerley79_0-1606240097742.png

 

The easy one ACT/<constant> is correct at the top.

The 30/360 is nearly correct but you will need to handle the 30E where last day in Feb moves to 30th

Actual/Actual is the most painful as you need to model the payment and fit it in but the attached is a reasonable approximation where 12 months is added.

 

If these are something people need I am happy to build them out fully as part of the Abacus function I support

 

The above workflow is attached as a starting point

 

Aqureshi025
8 - Asteroid

Hi

 

Many thanks. It almost resolve the problem, but there is one small thing to resolve which I am trying to do.

 

See in Actual / 365

 

The years column 2 row is 1.78082 means it accumulate the days of the prior year. Each year day count should be independent from the prior year. Same error is in all three buckets

Aqureshi025_0-1606247660479.png

 

See the year column it adding 1 each year before decimal

Aqureshi025_1-1606247744378.png

 

 

jdunkerley79
ACE Emeritus
ACE Emeritus

Have attached a new version.

 

Was measuring from Start of Loan until YearEnd

 

Have now added an extra formula which computes YearStart as max of Start and 1st Jan in YearEnd

And YearEnd will be truncated to Maturity date if in it.

 

 

Labels