Spaces:
Running
Running
0.2.0 - updated vline and hline logic
Browse files
app/app.R
CHANGED
@@ -1351,11 +1351,13 @@ server <- function(input, output) {
|
|
1351 |
) +
|
1352 |
scale_x_continuous(breaks = breaks_pretty(5)) +
|
1353 |
scale_y_continuous(breaks = breaks_pretty(5)) +
|
1354 |
-
geom_vline(aes(xintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed") +
|
1355 |
-
geom_hline(aes(yintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed") +
|
1356 |
xlab("\nAverage TC") +
|
1357 |
ylab("\nAverage CORRv2")
|
1358 |
|
|
|
|
|
|
|
|
|
1359 |
# Convert to Plotly
|
1360 |
ggplotly(p_avg, tooltip = "text")
|
1361 |
|
@@ -1391,11 +1393,13 @@ server <- function(input, output) {
|
|
1391 |
) +
|
1392 |
scale_x_continuous(breaks = breaks_pretty(5)) +
|
1393 |
scale_y_continuous(breaks = breaks_pretty(5)) +
|
1394 |
-
geom_vline(aes(xintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed") +
|
1395 |
-
geom_hline(aes(yintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed") +
|
1396 |
xlab("\nSharpe Ratio of TC") +
|
1397 |
ylab("\nSharpe Ratio of CORRv2")
|
1398 |
|
|
|
|
|
|
|
|
|
1399 |
# Convert to Plotly
|
1400 |
ggplotly(p_sharpe, tooltip = "text")
|
1401 |
|
|
|
1351 |
) +
|
1352 |
scale_x_continuous(breaks = breaks_pretty(5)) +
|
1353 |
scale_y_continuous(breaks = breaks_pretty(5)) +
|
|
|
|
|
1354 |
xlab("\nAverage TC") +
|
1355 |
ylab("\nAverage CORRv2")
|
1356 |
|
1357 |
+
# Add vline and hline if needed
|
1358 |
+
if (min(d_pref$avg_corrV2) <0) p_avg <- p_avg + geom_hline(aes(yintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed")
|
1359 |
+
if (min(d_pref$avg_tc) <0) p_avg <- p_avg + geom_vline(aes(xintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed")
|
1360 |
+
|
1361 |
# Convert to Plotly
|
1362 |
ggplotly(p_avg, tooltip = "text")
|
1363 |
|
|
|
1393 |
) +
|
1394 |
scale_x_continuous(breaks = breaks_pretty(5)) +
|
1395 |
scale_y_continuous(breaks = breaks_pretty(5)) +
|
|
|
|
|
1396 |
xlab("\nSharpe Ratio of TC") +
|
1397 |
ylab("\nSharpe Ratio of CORRv2")
|
1398 |
|
1399 |
+
# Add vline and hline if needed
|
1400 |
+
if (min(d_pref$sharpe_corrV2) <0) p_sharpe <- p_sharpe + geom_hline(aes(yintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed")
|
1401 |
+
if (min(d_pref$sharpe_tc) <0) p_sharpe <- p_sharpe + geom_vline(aes(xintercept = 0), linewidth = 0.25, color = "grey", linetype = "dashed")
|
1402 |
+
|
1403 |
# Convert to Plotly
|
1404 |
ggplotly(p_sharpe, tooltip = "text")
|
1405 |
|