# isValidRollConvention

Industry: Core

## Signature

```ts
isValidRollConvention(convention: unknown): convention is RollConvention
```

Return true when `convention` is a `RollConvention` that `rollDate` implements.

- Valid conventions are `"following"`, `"modifiedFollowing"`, `"preceding"`, `"modifiedPreceding"`, `"endOfMonth"` and `"none"`. The first three are the conventions [ISDA 2006 Definitions §4.12(a)](https://www.isda.org/a/smMDE/Blackline-2000-v-2006-ISDA-Definitions.pdf) defines in (i)–(iii); `"modifiedPreceding"` is FpML's `BusinessDayConventionEnum` `MODPRECEDING`, which §4.12(a) does not define; `"none"` is Strata's `NO_ADJUST`; and `"endOfMonth"` is GMT's own. The camelCase spelling is GMT's — no standard fixes the identifiers, only the behaviour.
- Matching is exact: case, spacing and abbreviations are not normalised.
- Accepts any input type and returns false for non-string values.
- `rollDate` returns `""` for a convention it does not recognise — the same sentinel it returns for a bad date or calendar. Check the convention here to tell a misconfigured contract term apart from bad data.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `convention` | `unknown` | candidate value of any type |

## Returns

boolean indicating validity

## Related types

- [`RollConvention`](/gmt/reference/types/RollConvention/)

## Examples

```ts
import { isValidRollConvention } from "@northguild/gmt/calendar/validate";

isValidRollConvention("modifiedFollowing") // true
```

## Source

[calendar/validate/isValidRollConvention.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/calendar/validate/isValidRollConvention.ts)
