feat(investment): bucket wise report, script rating and non-SLR limits on purchase

This commit is contained in:
2026-10-23 12:38:24 +05:30
parent 7bd880387e
commit 731ab5a0e0
12 changed files with 862 additions and 14 deletions
+77 -1
View File
@@ -1589,8 +1589,80 @@ export interface ScriptMaster {
phone?: string;
fax?: string;
corpCode?: string;
/** Credit rating — long-term for bonds, short-term for CP / CD (Non-SLR and Bond scripts). */
rating?: string;
ratingAgency?: string;
/** Listed on an exchange or proposed to be listed; unlisted ones have their own RBI limit. */
listed?: boolean;
}
/** Credit ratings on the Script Master, best first: long-term for bonds, short-term for CP / CD. */
export const RATING_OPTIONS: Array<{ group: string; values: string[] }> = [
{
group: 'Long-term (bonds)',
values: [
'AAA',
'AA+',
'AA',
'AA-',
'A+',
'A',
'A-',
'BBB+',
'BBB',
'BBB-',
'BB+',
'BB',
'BB-',
'B+',
'B',
'B-',
'C',
'D'
]
},
{
group: 'Short-term (CP / CD)',
values: [
'A1+',
'A1',
'A2+',
'A2',
'A3+',
'A3',
'A4+',
'A4'
]
},
{ group: 'None', values: ['UNRATED'] }
];
/** RBI: bonds rated "A" or higher, CP / CD rated "A2" or higher. */
export const ELIGIBLE_RATINGS: string[] = [
'AAA',
'AA+',
'AA',
'AA-',
'A+',
'A',
'A-',
'A1+',
'A1',
'A2+',
'A2'
];
/** Credit rating agencies registered with SEBI. */
export const RATING_AGENCY_OPTIONS: Array<{ value: string; label: string }> = [
{ value: 'CRISIL', label: 'CRISIL' },
{ value: 'ICRA', label: 'ICRA' },
{ value: 'CARE', label: 'CARE' },
{ value: 'INDIA_RATINGS', label: 'India Ratings' },
{ value: 'ACUITE', label: 'Acuite' },
{ value: 'BRICKWORK', label: 'Brickwork' },
{ value: 'INFOMERICS', label: 'Infomerics' }
];
/** Period between two DD-MM-YYYY dates as years / months / days, as shown on the Script Master. */
export function periodBetween(fromStr?: string, toStr?: string): { years: number; months: number; days: number } {
const none = { years: 0, months: 0, days: 0 };
@@ -2052,7 +2124,11 @@ export const SUBTYPE_MASTER: SubTypeMaster[] = [
{ subTypeCode: '4', subTypeName: 'EQUITY', instrumentType: 'SHARE' },
{ subTypeCode: '5', subTypeName: 'CO-OP SHARE', instrumentType: 'SHARE' },
{ subTypeCode: '6', subTypeName: 'DEBT - OVERNIGHT', instrumentType: 'MUTUAL_FUND' },
{ subTypeCode: '7', subTypeName: 'DEBT - LIQUID', instrumentType: 'MUTUAL_FUND' }
{ subTypeCode: '7', subTypeName: 'DEBT - LIQUID', instrumentType: 'MUTUAL_FUND' },
{ subTypeCode: '8', subTypeName: 'DEBT - MONEY MARKET', instrumentType: 'MUTUAL_FUND' },
{ subTypeCode: '9', subTypeName: 'DEBT - BANKING & PSU', instrumentType: 'MUTUAL_FUND' },
{ subTypeCode: '10', subTypeName: 'DEBT - CORPORATE BOND', instrumentType: 'MUTUAL_FUND' },
{ subTypeCode: '11', subTypeName: 'DEBT - GILT', instrumentType: 'MUTUAL_FUND' }
];
export interface ControlParameter {