예제 #1
0
파일: core.py 프로젝트: rainscut/gs-quant
def __risk_measure_with_doc_string(
    doc: str,
    measure_type: RiskMeasureType,
    asset_class: Optional[AssetClass] = None,
    unit: Optional[RiskMeasureUnit] = None
) -> RiskMeasure:
    measure = RiskMeasure(measure_type=measure_type, asset_class=asset_class, unit=unit)
    measure.__doc__ = doc
    return measure
예제 #2
0
def __risk_measure_with_doc_string(
        doc: str,
        measureType: RiskMeasureType,
        assetClass: AssetClass = None,
        unit: RiskMeasureUnit = None) -> RiskMeasure:
    measure = RiskMeasure(measureType=measureType,
                          assetClass=assetClass,
                          unit=unit)
    measure.__doc__ = doc
    return measure