gs_quant.datetime.point.point_sort_order — gs_quant 0.1 documentation

# gs_quant.datetime.point.point_sort_order

`point_sort_order`(point, ref_date=datetime.date(2021, 1, 5))

  Calculates a number that can be used to sort Mkt Points by it.

  Parameters

    - point (`str`) – The point string from MarketDataCoordinate.

    - ref_date (`date`) – Reference date, normally the pricing date.

  Return type

    `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())