Open hieronx opened 1 week ago
YTM calculation: https://github.com/centrifuge/apps/blob/main/centrifuge-app/src/pages/Loan/TransactionTable.tsx#L86
type AssetTransaction @entity { .. yieldToMaturity: BigInt # REPAID transactions only } type Asset @entity { .. weightedPurchaseYTM: BigInt # weighted average of asset transactions currentYTM: BigInt # based on current face value and date }
YTM calculation: https://github.com/centrifuge/apps/blob/main/centrifuge-app/src/pages/Loan/TransactionTable.tsx#L86