From 304b6e1a552960df6be1dc31401ea94d54a64a23 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 12 Jun 2024 20:16:33 +0200 Subject: [PATCH] ui fixes --- src/lib/components/AnalystEstimate.svelte | 9 +- .../stocks/[tickerID]/stats/+page.svelte | 960 ++++++++++-------- 2 files changed, 547 insertions(+), 422 deletions(-) diff --git a/src/lib/components/AnalystEstimate.svelte b/src/lib/components/AnalystEstimate.svelte index 9615ca7c..bcf258bc 100644 --- a/src/lib/components/AnalystEstimate.svelte +++ b/src/lib/components/AnalystEstimate.svelte @@ -239,7 +239,7 @@ $: {
-
+
- - - {:else} -

- No data available - -

{/if} {:else} diff --git a/src/routes/stocks/[tickerID]/stats/+page.svelte b/src/routes/stocks/[tickerID]/stats/+page.svelte index 340331f4..36323e7f 100644 --- a/src/routes/stocks/[tickerID]/stats/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/+page.svelte @@ -110,7 +110,6 @@ yearHigh = stockQuote?.yearHigh?.toFixed(2); alpha = quantStats[$stockTicker?.toUpperCase()]?.Alpha; -console.log(quantStats) /* updateDayRange() updateYearRange() @@ -165,12 +164,12 @@ updateYearRange() - + {#if $screenWidth <= 550} - - {:else} - - - - {/if} @@ -200,7 +199,7 @@ updateYearRange() {#if $screenWidth < 640} - {:else} -
+ 1-Day Range +
{dayLow} @@ -182,17 +181,17 @@ updateYearRange()
+ 1-Day Range + {dayLow} + + {dayHigh}
+ 1-Year Range @@ -215,7 +214,7 @@ updateYearRange() + 1-Year Range @@ -244,46 +243,38 @@ updateYearRange() - - - - - + + + + + - - - - - + + + + + - - - + + - - + - - - - - + + + + +
Market Cap ${marketCap}Volume{volume}
Mkt Cap ${marketCap}Volume{volume}
Price${currentPrice}Prev. Close${previousClose}
Price${currentPrice}Prev. Close${previousClose}
Alpha - {#if typeof alpha !== 'undefined'} - {alpha} - {:else} - - - {/if} +
Alpha + {typeof alpha !== 'undefined' ? alpha : '-'} Beta - {#if typeof beta !== 'undefined' && !isNaN(beta)} - {beta?.toFixed(2)} - {:else} - - - {/if} + Beta + {typeof beta !== 'undefined' && !isNaN(beta) ? beta?.toFixed(2) : '-'}
EPS{eps}PE{pe}
EPS{eps}PE{pe}
@@ -298,30 +289,30 @@ updateYearRange() - - - - - + + + + + {#each quantStats[$stockTicker?.toUpperCase()]['Worst 10 Drawdowns'] as item} - - + - - - @@ -339,7 +330,7 @@ updateYearRange() Comparison of company stats against the S&P500 Index.

- + Time Period between {new Date(quantStats[$stockTicker?.toUpperCase()]["Start Period"]).toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} - {new Date(quantStats[$stockTicker?.toUpperCase()]["End Period"]).toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} @@ -348,659 +339,800 @@ updateYearRange() -
- - Metric - - - {$stockTicker} - - - S&P500 - -
- -
StartedRecoveredDrawdownDays
StartedRecoveredDrawdownDays
+
{new Date(item['Started']).toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} + {#if ongoingDD(item['Recovered']) === true} continuing {:else} {new Date(item['Recovered']).toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} {/if} + {item['Drawdown']?.toFixed(2)}% + {item['Days']}
+ + + + + + + - - + - - - - + - - - -
+ Metric + + {$stockTicker} + + S&P500 +
+
Cumulative Return - {quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"]}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"]}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"]}% + {/if} - {quantStats['SPY']["Cumulative Return %"]} % + + {#if quantStats['SPY']["Cumulative Return %"] >=0} + +{quantStats['SPY']["Cumulative Return %"]}% + {:else} + {quantStats['SPY']["Cumulative Return %"]}% + {/if}
+
Compound Annual Growth Rate (CAGR) - {quantStats[$stockTicker?.toUpperCase()]["CAGR %"]}% + + {#if quantStats[$stockTicker?.toUpperCase()]["CAGR %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["CAGR %"]}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["CAGR %"]}% + {/if} - {quantStats['SPY']["CAGR %"]}% + + {#if quantStats['SPY']["CAGR %"] >=0} + +{quantStats['SPY']["CAGR %"]}% + {:else} + {quantStats['SPY']["CAGR %"]}% + {/if}
- - - - - + - - - - + - - - - -
+
Sharpe + {quantStats[$stockTicker?.toUpperCase()]["Sharpe"]?.toFixed(2)} + {quantStats['SPY']["Sharpe"]?.toFixed(2)}
+
Sortino + {quantStats[$stockTicker?.toUpperCase()]["Sortino"]?.toFixed(2)} + {quantStats['SPY']["Sortino"]?.toFixed(2)}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - -
- Max Drawdown - - {quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"]}% - - {quantStats['SPY']["Max Drawdown"]}% -
- Longest Drawdown Days - - {quantStats[$stockTicker?.toUpperCase()]["Longest DD Days"]} - - {quantStats['SPY']["Longest DD Days"]} -
- Volatility (ann.) - - {quantStats[$stockTicker?.toUpperCase()]["Volatility (ann.) %"]}% - - {quantStats['SPY']["Volatility (ann.) %"]}% -
- Correlation - - {quantStats[$stockTicker?.toUpperCase()]["Correlation"]}% - - {quantStats['SPY']["Correlation"]} -
- R^2 - - {quantStats[$stockTicker?.toUpperCase()]["R^2"]} - - {quantStats['SPY']["R^2"]} -
- Calmar - - {quantStats[$stockTicker?.toUpperCase()]["Calmar"]} - - {quantStats['SPY']["Calmar"]} -
+ Max Drawdown + + {#if quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"]}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"]}% + {/if} + + {#if quantStats['SPY']["Max Drawdown"] >=0} + +{quantStats['SPY']["Max Drawdown"]}% + {:else} + {quantStats['SPY']["Max Drawdown"]}% + {/if} +
+ Longest Drawdown Days + + {quantStats[$stockTicker?.toUpperCase()]["Longest DD Days"]} + + {quantStats['SPY']["Longest DD Days"]} +
+ Volatility (ann.) + + {quantStats[$stockTicker?.toUpperCase()]["Volatility (ann.) %"]}% + + {quantStats['SPY']["Volatility (ann.) %"]}% +
+ Correlation + + {quantStats[$stockTicker?.toUpperCase()]["Correlation"]}% + + {quantStats['SPY']["Correlation"]} +
+ R^2 + + {quantStats[$stockTicker?.toUpperCase()]["R^2"]} + + {quantStats['SPY']["R^2"]} +
+ Calmar + + {quantStats[$stockTicker?.toUpperCase()]["Calmar"]} + + {quantStats['SPY']["Calmar"]} +
+ Skew + + {quantStats[$stockTicker?.toUpperCase()]["Skew"]?.toFixed(2)} + + {quantStats['SPY']["Skew"]?.toFixed(2)} +
+ Kurtosis + + {quantStats[$stockTicker?.toUpperCase()]["Kurtosis"]?.toFixed(2)} + + {quantStats['SPY']["Kurtosis"]?.toFixed(2)} +
- Skew - - {quantStats[$stockTicker?.toUpperCase()]["Skew"]?.toFixed(2)} - - {quantStats['SPY']["Skew"]?.toFixed(2)} -
- Kurtosis - - {quantStats[$stockTicker?.toUpperCase()]["Kurtosis"]?.toFixed(2)} - - {quantStats['SPY']["Kurtosis"]?.toFixed(2)} -
- - - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - -
+
Expected Daily - {quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"]}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"]}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"]}% + {/if} - {quantStats['SPY']["Expected Daily %"]}% + + {#if quantStats['SPY']["Expected Daily %"] >=0} + +{quantStats['SPY']["Expected Daily %"]}% + {:else} + {quantStats['SPY']["Expected Daily %"]}% + {/if}
+
Expected Monthly - {quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"]}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"]}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"]}% + {/if} - {quantStats['SPY']["Expected Monthly %"]}% + + {#if quantStats['SPY']["Expected Monthly %"] >=0} + +{quantStats['SPY']["Expected Monthly %"]}% + {:else} + {quantStats['SPY']["Expected Monthly %"]}% + {/if}
+
Expected Yearly - {quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"]}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"]}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"]}% + {/if} - {quantStats['SPY']["Expected Yearly %"]}% + + {#if quantStats['SPY']["Expected Yearly %"] >=0} + +{quantStats['SPY']["Expected Yearly %"]}% + {:else} + {quantStats['SPY']["Expected Yearly %"]}% + {/if}
+
Kelly Criterion + {quantStats[$stockTicker?.toUpperCase()]["Kelly Criterion %"]}% + {quantStats['SPY']["Kelly Criterion %"]}%
+
Risk of Ruin + {quantStats[$stockTicker?.toUpperCase()]["Risk of Ruin %"]}% + {quantStats['SPY']["Risk of Ruin %"]}%
+
Daily Value-at-Risk - {quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Daily Value-at-Risk %"] >=0} + +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% + {/if}
+
Expected Shortfall (cVaR) - {quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Expected Shortfall (cVaR) %"] >=0} + +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + {/if}
- - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - -
+
Max Consecutive Wins + {quantStats[$stockTicker?.toUpperCase()]["Max Consecutive Wins"]} + {quantStats['SPY']["Max Consecutive Wins"]}
+
Max Consecutive Losses + {quantStats[$stockTicker?.toUpperCase()]["Max Consecutive Losses"]} + {quantStats['SPY']["Max Consecutive Losses"]}
+
Gain/Pain Ratio + {quantStats[$stockTicker?.toUpperCase()]["Gain/Pain Ratio"]?.toFixed(2)} + {quantStats['SPY']["Gain/Pain Ratio"]?.toFixed(2)}
+
Gain/Pain (1M) + {quantStats[$stockTicker?.toUpperCase()]["Gain/Pain (1M)"]?.toFixed(2)} + {quantStats['SPY']["Gain/Pain (1M)"]?.toFixed(2)}
+
Payoff Ratio + {quantStats[$stockTicker?.toUpperCase()]["Payoff Ratio"]?.toFixed(2)} + {quantStats['SPY']["Payoff Ratio"]?.toFixed(2)}
+
Profit Factor + {quantStats[$stockTicker?.toUpperCase()]["Profit Factor"]?.toFixed(2)} + {quantStats['SPY']["Profit Factor"]?.toFixed(2)}
+
Outlier Win Ratio + {quantStats[$stockTicker?.toUpperCase()]["Outlier Win Ratio"]?.toFixed(2)} + {quantStats['SPY']["Outlier Win Ratio"]?.toFixed(2)}
+
Outlier Loss Ratio + {quantStats[$stockTicker?.toUpperCase()]["Outlier Loss Ratio"]?.toFixed(2)} + {quantStats['SPY']["Outlier Loss Ratio"]?.toFixed(2)}
- - - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - -
+
MTD - {quantStats[$stockTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["MTD %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["MTD %"]?.toFixed(2)}% + + {#if quantStats['SPY']["MTD %"] >=0} + +{quantStats['SPY']["MTD %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["MTD %"]?.toFixed(2)}% + {/if}
+
3M - {quantStats[$stockTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["3M %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["3M %"]?.toFixed(2)}% + + {#if quantStats['SPY']["3M %"] >=0} + +{quantStats['SPY']["3M %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["3M %"]?.toFixed(2)}% + {/if}
+
6M - {quantStats[$stockTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["6M %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["6M %"]?.toFixed(2)}% + + {#if quantStats['SPY']["6M %"] >=0} + +{quantStats['SPY']["6M %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["6M %"]?.toFixed(2)}% + {/if}
+
YTD - {quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["YTD %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["YTD %"]?.toFixed(2)}% + + {#if quantStats['SPY']["YTD %"] >=0} + +{quantStats['SPY']["YTD %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["YTD %"]?.toFixed(2)}% + {/if}
+
1Y - {quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["1Y %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["1Y %"]?.toFixed(2)}% + + {#if quantStats['SPY']["1Y %"] >=0} + +{quantStats['SPY']["1Y %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["1Y %"]?.toFixed(2)}% + {/if}
+
3Y (ann.) - {quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + + {#if quantStats['SPY']["3Y (ann.) %"] >=0} + +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {/if}
- - - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - -
+
Best Day - {quantStats[$stockTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Best Day %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Best Day %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Best Day %"] >=0} + +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Best Day %"]?.toFixed(2)}% + {/if}
+
Worst Day - {quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Worst Day %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Worst Day %"] >=0} + +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {/if}
+
Best Month - {quantStats[$stockTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Worst Day %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Best Month %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Worst Day %"] >=0} + +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {/if}
+
Worst Month - {quantStats[$stockTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Worst Month %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Worst Month %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Worst Month %"] >=0} + +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Worst Month %"]?.toFixed(2)}% + {/if}
+
Best Year - {quantStats[$stockTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Best Year %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Best Year %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Best Year %"] >=0} + +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Best Year %"]?.toFixed(2)}% + {/if}
+
Worst Year - {quantStats[$stockTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Worst Year %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Worst Year %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Worst Year %"] >=0} + +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Worst Year %"]?.toFixed(2)}% + {/if}
- - - - - - + - - - - + - - - - + - - - - + - - - -
+
Avg. Drawdown - {quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% + + {#if quantStats['SPY']["Avg. Drawdown"] >=0} + +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% + {/if}
+
Avg. Drawdown Days + {quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown Days"]} + {quantStats['SPY']["Avg. Drawdown Days"]}
+
Recovery Factor + {quantStats[$stockTicker?.toUpperCase()]["Recovery Factor"]?.toFixed(2)} + {quantStats['SPY']["Recovery Factor"]?.toFixed(2)}
+
Ulcer Index + {quantStats[$stockTicker?.toUpperCase()]["Ulcer Index"]?.toFixed(2)} + {quantStats['SPY']["Ulcer Index"]?.toFixed(2)}
- - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - @@ -1013,7 +1145,7 @@ updateYearRange() {:else} -

+

{/if}
+
Avg. Up Month - {quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Avg. Up Month %"] >=0} + +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% + {/if}
+
Avg. Down Month - {quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + + {#if quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + {/if} - {quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Avg. Down Month %"] >=0} + +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% + {/if}
+
Win Days + {quantStats[$stockTicker?.toUpperCase()]["Win Days %"]?.toFixed(2)}% + {quantStats['SPY']["Win Days %"]?.toFixed(2)}%
+
Win Month + {quantStats[$stockTicker?.toUpperCase()]["Win Month %"]?.toFixed(2)}% + {quantStats['SPY']["Win Month %"]?.toFixed(2)}%
+
Win Quarter + {quantStats[$stockTicker?.toUpperCase()]["Win Quarter %"]?.toFixed(2)}% + {quantStats['SPY']["Win Quarter %"]?.toFixed(2)}%
+
Win Year + {quantStats[$stockTicker?.toUpperCase()]["Win Year %"]?.toFixed(2)}% + {quantStats['SPY']["Win Year %"]?.toFixed(2)}%