Skip to content

Commit

Permalink
Chore: Make release 1.0.71
Browse files Browse the repository at this point in the history
  • Loading branch information
martinroberson authored and DominicCYK committed Mar 28, 2024
1 parent 312e082 commit 8d099ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gs_quant/api/gs/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ def get_field_types(cls, field_names: Union[str, List[str]]):
for field in fields:
field_name = field.name
field_type = field.type_
field_format = field.parameters.get('format')
field_format = field.parameters.get('format') if field.parameters else None
field_types[field_name] = field_format or field_type
return field_types
return {}
Expand Down
9 changes: 9 additions & 0 deletions gs_quant/markets/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,15 @@ def get_factor_pnl(self,
aum_df = format_aum_for_return_calculation(performance_report, start_date, end_date)

total_data = [d for d in factor_data if d.get('factor') == 'Total']
# Total pnl must be retieved when using smoothening to calculate Pnl %
if len(total_data) == 0:
total_data = self.get_results(mode=mode,
factors=['Total'],
start_date=start_date,
end_date=end_date,
currency=currency,
return_format=ReturnFormat.JSON,
unit=FactorRiskUnit.Notional)

smoothened_factor_data = {}
for factor_name in factor_names:
Expand Down

0 comments on commit 8d099ed

Please sign in to comment.