Skip to content

Instantly share code, notes, and snippets.

@DJTB
Created April 29, 2020 00:20
Show Gist options
  • Save DJTB/10d5485ee6c3610dca8bc1b4845df354 to your computer and use it in GitHub Desktop.
Save DJTB/10d5485ee6c3610dca8bc1b4845df354 to your computer and use it in GitHub Desktop.
Calculate discount or premium to NTA for an LIC
/* 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