This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have compiled a table like below (data is attached as well)
The table is based on the 4 criteria on the very top.
Accrual amt = beginning amount * actual yield * 1/4
net payment = principal amount * face rate * 1/4 (except for the last pmt which pay the net payment + principal amount together)
Ending amount = Beginning Amount + Accrual Amt - Net Payment
Theultimate goalis to get the ending amount equals to zero to find out atarget actual yieldwhich right now equals to 10% (in excel then we use goal seek function but I want to replicate this process in alteryx):
I have searched previous posts regarding goal seek replication, and it seems that with the table set up I can run some R script to solve a function. A regular alteryx workflow would be best, but I would assume a r script solution would be easier and neat.
Here post something i tried. i have very limited coding experience, and the below script is based on some research i did.
However, the result is close but not correct:
see the expected result tab in the attached excel, second tab, the target yield calculated should be 9.88%, could someone point out what went wrong with my code? have been struggling on this for days.