Well if it's just 1 asset, have you considered doing a Journal entry each month and avoid having to write a script? You can create a memorial transaction (like a macro) and run it monthly.
And if you need to do this to several assets in future, you may just want to consider FAM bundle - customization/ scripts break over time - especially with the updates that NS continually makes.