Created
April 29, 2020 00:20
-
-
Save DJTB/10d5485ee6c3610dca8bc1b4845df354 to your computer and use it in GitHub Desktop.
Calculate discount or premium to NTA for an LIC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Calculate whether a LIC is trading at a Premium or Discount */ | |
function calcNtaDiscountPercentage( | |
lastAsx200: number, | |
currentAsx200: number, | |
lastNta: number, | |
currentPrice: number | |
) { | |
const estimatedNta = (currentAsx200 / lastAsx200) * lastNta; | |
const result = (estimatedNta - currentPrice) / estimatedNta; | |
return +(result * 100).toFixed(3); | |
} | |
// console.log(calcNtaDiscountPercentage(5076.8, 5313, 1.89, 1.995)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment