gs_quant.datetime.point.point_sort_order¶
- point_sort_order(point, ref_date=None)[source]¶
Calculates a number that can be used to sort Mkt Points by it.
- Parameters:
point (
str
) – The point string from MarketDataCoordinate.ref_date (
Optional
[date
]) – Reference date, normally the pricing date.
- Return type:
Optional
[float
]- Returns:
The number of days from the reference date to the date specified by the point string
Examples
>>> import datetime as dt >>> days = point_sort_order(point = 'Dec20', ref_date=dt.date.today())