Skip to content

Commit 7469f7f

Browse files
committed
Fix quotes
1 parent f56df9f commit 7469f7f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

investing_algorithm_framework/app/reporting/tables/key_metrics_table.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pandas as pd
22

3-
from .utils import safe_format, safe_format_date, safe_format_percentage
3+
from .utils import safe_format, safe_format_percentage
44

55

66
def highlight_sharpe_and_sortino(row):
@@ -153,7 +153,10 @@ def create_html_key_metrics_table(results, report):
153153
format_str = "{:.2f}"
154154

155155
# Format some values to percentages and floats
156-
copy_results['Total Return'] = f"{safe_format(copy_results["total_net_gain"], format_str)} ({safe_format_percentage(copy_results['total_net_gain_percentage'], format_str)}%)"
156+
copy_results['Total Return'] = (
157+
f"{safe_format(copy_results['total_net_gain'], format_str)} "
158+
f"({safe_format_percentage(copy_results['total_net_gain_percentage'], format_str)}%)"
159+
)
157160
copy_results['CAGR'] = f"{safe_format_percentage(copy_results['cagr'],format_str)}%"
158161
copy_results['Sharpe Ratio'] = safe_format(copy_results['sharpe_ratio'], format_str)
159162
copy_results['Sortino Ratio'] = safe_format(copy_results['sortino_ratio'], format_str)

0 commit comments

Comments
 (0)