diff --git a/src/routes/crypto/[tickerID]/stats/+page.svelte b/src/routes/crypto/[tickerID]/stats/+page.svelte index 4145379d..8aa936e5 100644 --- a/src/routes/crypto/[tickerID]/stats/+page.svelte +++ b/src/routes/crypto/[tickerID]/stats/+page.svelte @@ -1,7 +1,7 @@ @@ -156,79 +133,118 @@ {#if Object?.keys(quantStats)?.length !== 0} + + + +
+
+ +
+
+ YTD Return +
+
+ {$cryptoTicker} + + {#if quantStats[$cryptoTicker?.toUpperCase()]["YTD %"] >=0} + +{quantStats[$cryptoTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {:else} + {quantStats[$cryptoTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["YTD %"] >=0} + +{quantStats['SPY']["YTD %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["YTD %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + +
+
+ 1-Year Return +
+
+ {$cryptoTicker} + + {#if quantStats[$cryptoTicker?.toUpperCase()]["1Y %"] >=0} + +{quantStats[$cryptoTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {:else} + {quantStats[$cryptoTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["1Y %"] >=0} + +{quantStats['SPY']["1Y %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["1Y %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + +
+
+ 3-Year Return +
+
+ {$cryptoTicker} + + {#if quantStats[$cryptoTicker?.toUpperCase()]["3Y (ann.) %"] >=0} + +{quantStats[$cryptoTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats[$cryptoTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["3Y (ann.) %"] >=0} + +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + + +
+
+ + + +
-
- - - - - {#if $screenWidth <= 550} - - - {:else} - - - - - {/if} - - - - {#if $screenWidth < 640} - - - {:else} - - - - - {/if} - - -
- 1-Day Range - -
-
- {dayLow} - {dayHigh} -
-
- -
-
-
- 1-Day Range - - {dayLow} - - - - - {dayHigh} -
- 1-Year Range - -
-
- {yearLow} - {yearHigh} -
-
- -
-
-
- 1-Year Range - - {yearLow} - - - - {yearHigh} -
-
+ @@ -237,7 +253,7 @@ -
+
@@ -267,18 +283,12 @@ - - - - - - -
EPS{eps}PE{pe}
- + + {#if $cryptoTicker in quantStats && Object.keys(quantStats[$cryptoTicker]).length > 0} @@ -363,14 +373,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Cumulative Return %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Cumulative Return %"]}% + +{abbreviateNumber(quantStats[$cryptoTicker?.toUpperCase()]["Cumulative Return %"])}% {:else} - {quantStats[$cryptoTicker?.toUpperCase()]["Cumulative Return %"]}% + {abbreviateNumber(quantStats[$cryptoTicker?.toUpperCase()]["Cumulative Return %"])}% {/if} {#if quantStats['SPY']["Cumulative Return %"] >=0} - +{quantStats['SPY']["Cumulative Return %"]}% + +{quantStats['SPY']["Cumulative Return %"]}% {:else} {quantStats['SPY']["Cumulative Return %"]}% {/if} @@ -383,14 +393,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["CAGR %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["CAGR %"]}% + +{quantStats[$cryptoTicker?.toUpperCase()]["CAGR %"]}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["CAGR %"]}% {/if} {#if quantStats['SPY']["CAGR %"] >=0} - +{quantStats['SPY']["CAGR %"]}% + +{quantStats['SPY']["CAGR %"]}% {:else} {quantStats['SPY']["CAGR %"]}% {/if} @@ -427,14 +437,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Max Drawdown"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Max Drawdown"]}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Max Drawdown"]}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Max Drawdown"]}% {/if} {#if quantStats['SPY']["Max Drawdown"] >=0} - +{quantStats['SPY']["Max Drawdown"]}% + +{quantStats['SPY']["Max Drawdown"]}% {:else} {quantStats['SPY']["Max Drawdown"]}% {/if} @@ -535,14 +545,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Daily %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Daily %"]}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Daily %"]}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Expected Daily %"]}% {/if} {#if quantStats['SPY']["Expected Daily %"] >=0} - +{quantStats['SPY']["Expected Daily %"]}% + +{quantStats['SPY']["Expected Daily %"]}% {:else} {quantStats['SPY']["Expected Daily %"]}% {/if} @@ -555,14 +565,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Monthly %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Monthly %"]}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Monthly %"]}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Expected Monthly %"]}% {/if} {#if quantStats['SPY']["Expected Monthly %"] >=0} - +{quantStats['SPY']["Expected Monthly %"]}% + +{quantStats['SPY']["Expected Monthly %"]}% {:else} {quantStats['SPY']["Expected Monthly %"]}% {/if} @@ -575,14 +585,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Yearly %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Yearly %"]}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Yearly %"]}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Expected Yearly %"]}% {/if} {#if quantStats['SPY']["Expected Yearly %"] >=0} - +{quantStats['SPY']["Expected Yearly %"]}% + +{quantStats['SPY']["Expected Yearly %"]}% {:else} {quantStats['SPY']["Expected Yearly %"]}% {/if} @@ -619,14 +629,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Daily Value-at-Risk %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Daily Value-at-Risk %"] >=0} - +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% + +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% {/if} @@ -639,14 +649,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Expected Shortfall (cVaR) %"] >=0} - +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {/if} @@ -655,10 +665,10 @@ - + Max Consecutive Wins - + {quantStats[$cryptoTicker?.toUpperCase()]["Max Consecutive Wins"]} @@ -667,10 +677,10 @@ - + Max Consecutive Losses - + {quantStats[$cryptoTicker?.toUpperCase()]["Max Consecutive Losses"]} @@ -682,7 +692,7 @@ Gain/Pain Ratio - + {quantStats[$cryptoTicker?.toUpperCase()]["Gain/Pain Ratio"]?.toFixed(2)} @@ -752,19 +762,19 @@ - + MTD - + {#if quantStats[$cryptoTicker?.toUpperCase()]["MTD %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["MTD %"] >=0} - +{quantStats['SPY']["MTD %"]?.toFixed(2)}% + +{quantStats['SPY']["MTD %"]?.toFixed(2)}% {:else} {quantStats['SPY']["MTD %"]?.toFixed(2)}% {/if} @@ -777,14 +787,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["3M %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["3M %"] >=0} - +{quantStats['SPY']["3M %"]?.toFixed(2)}% + +{quantStats['SPY']["3M %"]?.toFixed(2)}% {:else} {quantStats['SPY']["3M %"]?.toFixed(2)}% {/if} @@ -797,79 +807,20 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["6M %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["6M %"] >=0} - +{quantStats['SPY']["6M %"]?.toFixed(2)}% + +{quantStats['SPY']["6M %"]?.toFixed(2)}% {:else} {quantStats['SPY']["6M %"]?.toFixed(2)}% {/if} - - - YTD - - - {#if quantStats[$cryptoTicker?.toUpperCase()]["YTD %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% - {/if} - - - {#if quantStats['SPY']["YTD %"] >=0} - +{quantStats['SPY']["YTD %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["YTD %"]?.toFixed(2)}% - {/if} - - - - - - 1Y - - - {#if quantStats[$cryptoTicker?.toUpperCase()]["1Y %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% - {/if} - - - {#if quantStats['SPY']["1Y %"] >=0} - +{quantStats['SPY']["1Y %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["1Y %"]?.toFixed(2)}% - {/if} - - - - - - 3Y (ann.) - - - {#if quantStats[$cryptoTicker?.toUpperCase()]["3Y (ann.) %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% - {/if} - - - {#if quantStats['SPY']["3Y (ann.) %"] >=0} - +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% - {/if} - - @@ -877,14 +828,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Best Day %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Best Day %"] >=0} - +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% + +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Best Day %"]?.toFixed(2)}% {/if} @@ -897,14 +848,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Worst Day %"] >=0} - +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% {/if} @@ -916,17 +867,17 @@ Best Month - {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {#if quantStats[$cryptoTicker?.toUpperCase()]["Best Month %"] >=0} + +{quantStats[$cryptoTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% {:else} - {quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {quantStats[$cryptoTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% {/if} - {#if quantStats['SPY']["Worst Day %"] >=0} - +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {#if quantStats['SPY']["Best Month %"] >=0} + +{quantStats['SPY']["Best Month %"]?.toFixed(2)}% {:else} - {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {quantStats['SPY']["Best Month %"]?.toFixed(2)}% {/if} @@ -937,14 +888,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Month %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Worst Month %"] >=0} - +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Month %"]?.toFixed(2)}% {/if} @@ -957,14 +908,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Best Year %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Best Year %"] >=0} - +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% + +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Best Year %"]?.toFixed(2)}% {/if} @@ -977,14 +928,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Year %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Worst Year %"] >=0} - +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Year %"]?.toFixed(2)}% {/if} @@ -992,19 +943,19 @@ - + Avg. Drawdown - + {#if quantStats[$cryptoTicker?.toUpperCase()]["Avg. Drawdown"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Avg. Drawdown"] >=0} - +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% {/if} @@ -1049,19 +1000,19 @@ - + Avg. Up Month - + {#if quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Avg. Up Month %"] >=0} - +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% {/if} @@ -1074,14 +1025,14 @@ {#if quantStats[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"] >=0} - +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% {:else} {quantStats[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Avg. Down Month %"] >=0} - +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% {/if} diff --git a/src/routes/etf/[tickerID]/stats/+page.svelte b/src/routes/etf/[tickerID]/stats/+page.svelte index 2f7778e8..e28112f6 100644 --- a/src/routes/etf/[tickerID]/stats/+page.svelte +++ b/src/routes/etf/[tickerID]/stats/+page.svelte @@ -12,10 +12,7 @@ let marketCap = '-'; - let yearHigh = '-'; - let yearLow = '-'; - let dayHigh = '-'; - let dayLow = '-'; + let currentPrice = 0; let previousClose = '-'; @@ -78,10 +75,6 @@ */ marketCap = '-'; - yearHigh = '-'; - yearLow = '-'; - dayHigh = '-'; - dayLow = '-'; currentPrice = '-'; previousClose = '-'; @@ -103,11 +96,6 @@ beta = stockQuote?.beta; - dayLow = stockQuote?.dayLow?.toFixed(2); - dayHigh = stockQuote?.dayHigh?.toFixed(2); - yearLow = stockQuote?.yearLow?.toFixed(2); - yearHigh = stockQuote?.yearHigh?.toFixed(2); - alpha = quantStats[$etfTicker?.toUpperCase()]?.Alpha; /* @@ -130,7 +118,6 @@ - @@ -138,7 +125,6 @@ - @@ -146,7 +132,7 @@
-
+

Fundamental Data @@ -158,79 +144,118 @@

{#if Object?.keys(quantStats)?.length !== 0} + + + +
+
+ +
+
+ YTD Return +
+
+ {$etfTicker} + + {#if quantStats[$etfTicker?.toUpperCase()]["YTD %"] >=0} + +{quantStats[$etfTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {:else} + {quantStats[$etfTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["YTD %"] >=0} + +{quantStats['SPY']["YTD %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["YTD %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + +
+
+ 1-Year Return +
+
+ {$etfTicker} + + {#if quantStats[$etfTicker?.toUpperCase()]["1Y %"] >=0} + +{quantStats[$etfTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {:else} + {quantStats[$etfTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["1Y %"] >=0} + +{quantStats['SPY']["1Y %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["1Y %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + +
+
+ 3-Year Return +
+
+ {$etfTicker} + + {#if quantStats[$etfTicker?.toUpperCase()]["3Y (ann.) %"] >=0} + +{quantStats[$etfTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats[$etfTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["3Y (ann.) %"] >=0} + +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + + +
+
+ + + +
-
- - - - - {#if $screenWidth <= 550} - - - {:else} - - - - - {/if} - - - - {#if $screenWidth < 640} - - - {:else} - - - - - {/if} - - -
- 1-Day Range - -
-
- {dayLow} - {dayHigh} -
-
- -
-
-
- 1-Day Range - - {dayLow} - - - - - {dayHigh} -
- 1-Year Range - -
-
- {yearLow} - {yearHigh} -
-
- -
-
-
- 1-Year Range - - {yearLow} - - - - {yearHigh} -
-
+ @@ -241,30 +266,30 @@
- + - - - - + + + + - - - - - + + + + + - - + - - + @@ -272,7 +297,7 @@ - + @@ -280,45 +305,48 @@
Mkt Cap ${marketCap}Volume{volume}Mkt Cap ${marketCap}Volume{volume}
Price${currentPrice}Prev. Close${previousClose}
Price${currentPrice}Prev. Close${previousClose}
Alpha + Alpha {typeof alpha !== 'undefined' ? alpha : '-'} Beta + Beta {typeof beta !== 'undefined' && !isNaN(beta) ? beta?.toFixed(2) : '-'}
EPS{eps}{eps?.toFixed(2)} PE {pe}
- + + {#if $etfTicker in quantStats && Object.keys(quantStats[$etfTicker]).length > 0}

Worst 10 Drawdowns of {$etfTicker}

- - - - - - - - - - - {#each quantStats[$etfTicker?.toUpperCase()]['Worst 10 Drawdowns'] as item} - - - - - +
+
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']} -
+ + + + + + - {/each} - -
StartedRecoveredDrawdownDays
+ + + {#each quantStats[$etfTicker?.toUpperCase()]['Worst 10 Drawdowns'] as item} + + + {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']} + + + {/each} + + +

@@ -326,11 +354,11 @@ S&P500

-

+

Comparison of company stats against the S&P500 Index.

- + Time Period between {new Date(quantStats[$etfTicker?.toUpperCase()]["Start Period"]).toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} - {new Date(quantStats[$etfTicker?.toUpperCase()]["End Period"]).toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} @@ -341,36 +369,36 @@ -
+
- - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -530,19 +558,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/routes/stocks/[tickerID]/stats/+page.svelte b/src/routes/stocks/[tickerID]/stats/+page.svelte index f485b5d9..2ae518b4 100644 --- a/src/routes/stocks/[tickerID]/stats/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/+page.svelte @@ -12,10 +12,7 @@ let stockQuote; let marketCap = '-'; -let yearHigh = '-'; -let yearLow = '-'; -let dayHigh = '-'; -let dayLow = '-'; + let currentPrice = 0; let previousClose = '-'; @@ -78,10 +75,6 @@ if (progressYearPriceValue < currentPrice) { */ marketCap = '-'; -yearHigh = '-'; -yearLow = '-'; -dayHigh = '-'; -dayLow = '-'; currentPrice = '-'; previousClose = '-'; @@ -103,11 +96,6 @@ pe = stockQuote?.pe; beta = stockQuote?.beta; -dayLow = stockQuote?.dayLow?.toFixed(2); -dayHigh = stockQuote?.dayHigh?.toFixed(2); -yearLow = stockQuote?.yearLow?.toFixed(2); -yearHigh = stockQuote?.yearHigh?.toFixed(2); - alpha = quantStats[$stockTicker?.toUpperCase()]?.Alpha; /* @@ -156,79 +144,118 @@ updateYearRange() {#if Object?.keys(quantStats)?.length !== 0} + + + +
+
+ +
+
+ YTD Return +
+
+ {$stockTicker} + + {#if quantStats[$stockTicker?.toUpperCase()]["YTD %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["YTD %"] >=0} + +{quantStats['SPY']["YTD %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["YTD %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + +
+
+ 1-Year Return +
+
+ {$stockTicker} + + {#if quantStats[$stockTicker?.toUpperCase()]["1Y %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["1Y %"] >=0} + +{quantStats['SPY']["1Y %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["1Y %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + +
+
+ 3-Year Return +
+
+ {$stockTicker} + + {#if quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% + {/if} + +
+
+ vs. +
+
+ SPY + + {#if quantStats['SPY']["3Y (ann.) %"] >=0} + +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {:else} + {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% + {/if} + +
+
+
+
+ + + +
+
+ + + +
-
-
+
Metric + {$etfTicker} + S&P500
+ Cumulative Return + {#if quantStats[$etfTicker?.toUpperCase()]["Cumulative Return %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Cumulative Return %"]}% + +{abbreviateNumber(quantStats[$etfTicker?.toUpperCase()]["Cumulative Return %"])}% {:else} - {quantStats[$etfTicker?.toUpperCase()]["Cumulative Return %"]}% + {abbreviateNumber(quantStats[$etfTicker?.toUpperCase()]["Cumulative Return %"])}% {/if} + {#if quantStats['SPY']["Cumulative Return %"] >=0} - +{quantStats['SPY']["Cumulative Return %"]}% + +{quantStats['SPY']["Cumulative Return %"]}% {:else} {quantStats['SPY']["Cumulative Return %"]}% {/if} @@ -378,19 +406,19 @@
+ Compound Annual Growth Rate (CAGR) + {#if quantStats[$etfTicker?.toUpperCase()]["CAGR %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["CAGR %"]}% + +{quantStats[$etfTicker?.toUpperCase()]["CAGR %"]}% {:else} {quantStats[$etfTicker?.toUpperCase()]["CAGR %"]}% {/if} + {#if quantStats['SPY']["CAGR %"] >=0} - +{quantStats['SPY']["CAGR %"]}% + +{quantStats['SPY']["CAGR %"]}% {:else} {quantStats['SPY']["CAGR %"]}% {/if} @@ -398,43 +426,43 @@
+ Sharpe + {quantStats[$etfTicker?.toUpperCase()]["Sharpe"]?.toFixed(2)} + {quantStats['SPY']["Sharpe"]?.toFixed(2)}
+ Sortino + {quantStats[$etfTicker?.toUpperCase()]["Sortino"]?.toFixed(2)} + {quantStats['SPY']["Sortino"]?.toFixed(2)}
+ Max Drawdown + {#if quantStats[$etfTicker?.toUpperCase()]["Max Drawdown"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Max Drawdown"]}% + +{quantStats[$etfTicker?.toUpperCase()]["Max Drawdown"]}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Max Drawdown"]}% {/if} + {#if quantStats['SPY']["Max Drawdown"] >=0} - +{quantStats['SPY']["Max Drawdown"]}% + +{quantStats['SPY']["Max Drawdown"]}% {:else} {quantStats['SPY']["Max Drawdown"]}% {/if} @@ -442,87 +470,87 @@
+ Longest Drawdown Days + {quantStats[$etfTicker?.toUpperCase()]["Longest DD Days"]} + {quantStats['SPY']["Longest DD Days"]}
+ Volatility (ann.) + {quantStats[$etfTicker?.toUpperCase()]["Volatility (ann.) %"]}% + {quantStats['SPY']["Volatility (ann.) %"]}%
+ Correlation + {quantStats[$etfTicker?.toUpperCase()]["Correlation"]}% + {quantStats['SPY']["Correlation"]}
+ R^2 + {quantStats[$etfTicker?.toUpperCase()]["R^2"]} + {quantStats['SPY']["R^2"]}
+ Calmar + {quantStats[$etfTicker?.toUpperCase()]["Calmar"]} + {quantStats['SPY']["Calmar"]}
+ Skew + {quantStats[$etfTicker?.toUpperCase()]["Skew"]?.toFixed(2)} + {quantStats['SPY']["Skew"]?.toFixed(2)}
+ Kurtosis + {quantStats[$etfTicker?.toUpperCase()]["Kurtosis"]?.toFixed(2)} + {quantStats['SPY']["Kurtosis"]?.toFixed(2)}
+ Expected Daily + {#if quantStats[$etfTicker?.toUpperCase()]["Expected Daily %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Expected Daily %"]}% + +{quantStats[$etfTicker?.toUpperCase()]["Expected Daily %"]}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Expected Daily %"]}% {/if} + {#if quantStats['SPY']["Expected Daily %"] >=0} - +{quantStats['SPY']["Expected Daily %"]}% + +{quantStats['SPY']["Expected Daily %"]}% {:else} {quantStats['SPY']["Expected Daily %"]}% {/if} @@ -550,19 +578,19 @@
+ Expected Monthly + {#if quantStats[$etfTicker?.toUpperCase()]["Expected Monthly %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Expected Monthly %"]}% + +{quantStats[$etfTicker?.toUpperCase()]["Expected Monthly %"]}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Expected Monthly %"]}% {/if} + {#if quantStats['SPY']["Expected Monthly %"] >=0} - +{quantStats['SPY']["Expected Monthly %"]}% + +{quantStats['SPY']["Expected Monthly %"]}% {:else} {quantStats['SPY']["Expected Monthly %"]}% {/if} @@ -570,19 +598,19 @@
+ Expected Yearly + {#if quantStats[$etfTicker?.toUpperCase()]["Expected Yearly %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Expected Yearly %"]}% + +{quantStats[$etfTicker?.toUpperCase()]["Expected Yearly %"]}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Expected Yearly %"]}% {/if} + {#if quantStats['SPY']["Expected Yearly %"] >=0} - +{quantStats['SPY']["Expected Yearly %"]}% + +{quantStats['SPY']["Expected Yearly %"]}% {:else} {quantStats['SPY']["Expected Yearly %"]}% {/if} @@ -590,43 +618,43 @@
+ Kelly Criterion + {quantStats[$etfTicker?.toUpperCase()]["Kelly Criterion %"]}% + {quantStats['SPY']["Kelly Criterion %"]}%
+ Risk of Ruin + {quantStats[$etfTicker?.toUpperCase()]["Risk of Ruin %"]}% + {quantStats['SPY']["Risk of Ruin %"]}%
+ Daily Value-at-Risk + {#if quantStats[$etfTicker?.toUpperCase()]["Daily Value-at-Risk %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Daily Value-at-Risk %"] >=0} - +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% + +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% {/if} @@ -634,19 +662,19 @@
+ Expected Shortfall (cVaR) + {#if quantStats[$etfTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Expected Shortfall (cVaR) %"] >=0} - +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {/if} @@ -655,116 +683,116 @@
+ Max Consecutive Wins + {quantStats[$etfTicker?.toUpperCase()]["Max Consecutive Wins"]} + {quantStats['SPY']["Max Consecutive Wins"]}
+ Max Consecutive Losses + {quantStats[$etfTicker?.toUpperCase()]["Max Consecutive Losses"]} + {quantStats['SPY']["Max Consecutive Losses"]}
+ Gain/Pain Ratio + {quantStats[$etfTicker?.toUpperCase()]["Gain/Pain Ratio"]?.toFixed(2)} + {quantStats['SPY']["Gain/Pain Ratio"]?.toFixed(2)}
+ Gain/Pain (1M) + {quantStats[$etfTicker?.toUpperCase()]["Gain/Pain (1M)"]?.toFixed(2)} + {quantStats['SPY']["Gain/Pain (1M)"]?.toFixed(2)}
+ Payoff Ratio + {quantStats[$etfTicker?.toUpperCase()]["Payoff Ratio"]?.toFixed(2)} + {quantStats['SPY']["Payoff Ratio"]?.toFixed(2)}
+ Profit Factor + {quantStats[$etfTicker?.toUpperCase()]["Profit Factor"]?.toFixed(2)} + {quantStats['SPY']["Profit Factor"]?.toFixed(2)}
+ Outlier Win Ratio + {quantStats[$etfTicker?.toUpperCase()]["Outlier Win Ratio"]?.toFixed(2)} + {quantStats['SPY']["Outlier Win Ratio"]?.toFixed(2)}
+ Outlier Loss Ratio + {quantStats[$etfTicker?.toUpperCase()]["Outlier Loss Ratio"]?.toFixed(2)} + {quantStats['SPY']["Outlier Loss Ratio"]?.toFixed(2)}
+ MTD + {#if quantStats[$etfTicker?.toUpperCase()]["MTD %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["MTD %"] >=0} - +{quantStats['SPY']["MTD %"]?.toFixed(2)}% + +{quantStats['SPY']["MTD %"]?.toFixed(2)}% {:else} {quantStats['SPY']["MTD %"]?.toFixed(2)}% {/if} @@ -772,19 +800,19 @@
+ 3M + {#if quantStats[$etfTicker?.toUpperCase()]["3M %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["3M %"] >=0} - +{quantStats['SPY']["3M %"]?.toFixed(2)}% + +{quantStats['SPY']["3M %"]?.toFixed(2)}% {:else} {quantStats['SPY']["3M %"]?.toFixed(2)}% {/if} @@ -792,99 +820,40 @@
+ 6M + {#if quantStats[$etfTicker?.toUpperCase()]["6M %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["6M %"] >=0} - +{quantStats['SPY']["6M %"]?.toFixed(2)}% + +{quantStats['SPY']["6M %"]?.toFixed(2)}% {:else} {quantStats['SPY']["6M %"]?.toFixed(2)}% {/if}
- YTD - - {#if quantStats[$etfTicker?.toUpperCase()]["YTD %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% - {/if} - - {#if quantStats['SPY']["YTD %"] >=0} - +{quantStats['SPY']["YTD %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["YTD %"]?.toFixed(2)}% - {/if} -
- 1Y - - {#if quantStats[$etfTicker?.toUpperCase()]["1Y %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% - {/if} - - {#if quantStats['SPY']["1Y %"] >=0} - +{quantStats['SPY']["1Y %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["1Y %"]?.toFixed(2)}% - {/if} -
- 3Y (ann.) - - {#if quantStats[$etfTicker?.toUpperCase()]["3Y (ann.) %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% - {/if} - - {#if quantStats['SPY']["3Y (ann.) %"] >=0} - +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% - {/if} -
+ Best Day {#if quantStats[$etfTicker?.toUpperCase()]["Best Day %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Best Day %"] >=0} - +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% + +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Best Day %"]?.toFixed(2)}% {/if} @@ -892,19 +861,19 @@
+ Worst Day + {#if quantStats[$etfTicker?.toUpperCase()]["Worst Day %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Worst Day %"] >=0} - +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% {/if} @@ -912,39 +881,39 @@
+ Best Month - {#if quantStats[$etfTicker?.toUpperCase()]["Worst Day %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + + {#if quantStats[$etfTicker?.toUpperCase()]["Best Month %"] >=0} + +{quantStats[$etfTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% {:else} - {quantStats[$etfTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {quantStats[$etfTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% {/if} - {#if quantStats['SPY']["Worst Day %"] >=0} - +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + + {#if quantStats['SPY']["Best Month %"] >=0} + +{quantStats['SPY']["Best Month %"]?.toFixed(2)}% {:else} - {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {quantStats['SPY']["Best Month %"]?.toFixed(2)}% {/if}
+ Worst Month + {#if quantStats[$etfTicker?.toUpperCase()]["Worst Month %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Worst Month %"] >=0} - +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Month %"]?.toFixed(2)}% {/if} @@ -952,19 +921,19 @@
+ Best Year + {#if quantStats[$etfTicker?.toUpperCase()]["Best Year %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Best Year %"] >=0} - +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% + +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Best Year %"]?.toFixed(2)}% {/if} @@ -972,19 +941,19 @@
+ Worst Year + {#if quantStats[$etfTicker?.toUpperCase()]["Worst Year %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Worst Year %"] >=0} - +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Year %"]?.toFixed(2)}% {/if} @@ -992,19 +961,19 @@
+ Avg. Drawdown + {#if quantStats[$etfTicker?.toUpperCase()]["Avg. Drawdown"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Avg. Drawdown"] >=0} - +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% {/if} @@ -1012,56 +981,56 @@
+ Avg. Drawdown Days + {quantStats[$etfTicker?.toUpperCase()]["Avg. Drawdown Days"]} + {quantStats['SPY']["Avg. Drawdown Days"]}
+ Recovery Factor + {quantStats[$etfTicker?.toUpperCase()]["Recovery Factor"]?.toFixed(2)} + {quantStats['SPY']["Recovery Factor"]?.toFixed(2)}
+ Ulcer Index + {quantStats[$etfTicker?.toUpperCase()]["Ulcer Index"]?.toFixed(2)} + {quantStats['SPY']["Ulcer Index"]?.toFixed(2)}
+ Avg. Up Month + {#if quantStats[$etfTicker?.toUpperCase()]["Avg. Up Month %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Avg. Up Month %"] >=0} - +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% {/if} @@ -1069,19 +1038,19 @@
+ Avg. Down Month + {#if quantStats[$etfTicker?.toUpperCase()]["Avg. Down Month %"] >=0} - +{quantStats[$etfTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + +{quantStats[$etfTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% {:else} {quantStats[$etfTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% {/if} + {#if quantStats['SPY']["Avg. Down Month %"] >=0} - +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% {/if} @@ -1090,49 +1059,49 @@
+ Win Days + {quantStats[$etfTicker?.toUpperCase()]["Win Days %"]?.toFixed(2)}% + {quantStats['SPY']["Win Days %"]?.toFixed(2)}%
+ Win Month + {quantStats[$etfTicker?.toUpperCase()]["Win Month %"]?.toFixed(2)}% + {quantStats['SPY']["Win Month %"]?.toFixed(2)}%
+ Win Quarter + {quantStats[$etfTicker?.toUpperCase()]["Win Quarter %"]?.toFixed(2)}% + {quantStats['SPY']["Win Quarter %"]?.toFixed(2)}%
+ Win Year + {quantStats[$etfTicker?.toUpperCase()]["Win Year %"]?.toFixed(2)}% + {quantStats['SPY']["Win Year %"]?.toFixed(2)}%
- - - - {#if $screenWidth <= 550} - - - {:else} - - - - - {/if} - - - - {#if $screenWidth < 640} - - - {:else} - - - - - {/if} - - -
- 1-Day Range - -
-
- {dayLow} - {dayHigh} -
-
- -
-
-
- 1-Day Range - - {dayLow} - - - - - {dayHigh} -
- 1-Year Range - -
-
- {yearLow} - {yearHigh} -
-
- -
-
-
- 1-Year Range - - {yearLow} - - - - {yearHigh} -
-
+ @@ -278,7 +305,8 @@ updateYearRange()
- + + {#if $stockTicker in quantStats && Object.keys(quantStats[$stockTicker]).length > 0} @@ -363,14 +391,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"] >=0} - +{abbreviateNumber(quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"])}% + +{abbreviateNumber(quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"])}% {:else} {abbreviateNumber(quantStats[$stockTicker?.toUpperCase()]["Cumulative Return %"])}% {/if} {#if quantStats['SPY']["Cumulative Return %"] >=0} - +{quantStats['SPY']["Cumulative Return %"]}% + +{quantStats['SPY']["Cumulative Return %"]}% {:else} {quantStats['SPY']["Cumulative Return %"]}% {/if} @@ -383,14 +411,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["CAGR %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["CAGR %"]}% + +{quantStats[$stockTicker?.toUpperCase()]["CAGR %"]}% {:else} {quantStats[$stockTicker?.toUpperCase()]["CAGR %"]}% {/if} {#if quantStats['SPY']["CAGR %"] >=0} - +{quantStats['SPY']["CAGR %"]}% + +{quantStats['SPY']["CAGR %"]}% {:else} {quantStats['SPY']["CAGR %"]}% {/if} @@ -427,14 +455,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"]}% + +{quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"]}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Max Drawdown"]}% {/if} {#if quantStats['SPY']["Max Drawdown"] >=0} - +{quantStats['SPY']["Max Drawdown"]}% + +{quantStats['SPY']["Max Drawdown"]}% {:else} {quantStats['SPY']["Max Drawdown"]}% {/if} @@ -535,14 +563,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"]}% + +{quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"]}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Expected Daily %"]}% {/if} {#if quantStats['SPY']["Expected Daily %"] >=0} - +{quantStats['SPY']["Expected Daily %"]}% + +{quantStats['SPY']["Expected Daily %"]}% {:else} {quantStats['SPY']["Expected Daily %"]}% {/if} @@ -555,14 +583,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"]}% + +{quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"]}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Expected Monthly %"]}% {/if} {#if quantStats['SPY']["Expected Monthly %"] >=0} - +{quantStats['SPY']["Expected Monthly %"]}% + +{quantStats['SPY']["Expected Monthly %"]}% {:else} {quantStats['SPY']["Expected Monthly %"]}% {/if} @@ -575,14 +603,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"]}% + +{quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"]}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Expected Yearly %"]}% {/if} {#if quantStats['SPY']["Expected Yearly %"] >=0} - +{quantStats['SPY']["Expected Yearly %"]}% + +{quantStats['SPY']["Expected Yearly %"]}% {:else} {quantStats['SPY']["Expected Yearly %"]}% {/if} @@ -619,14 +647,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Daily Value-at-Risk %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Daily Value-at-Risk %"] >=0} - +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% + +{quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Daily Value-at-Risk %"]?.toFixed(2)}% {/if} @@ -639,14 +667,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Expected Shortfall (cVaR) %"] >=0} - +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% + +{quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Expected Shortfall (cVaR) %"]?.toFixed(2)}% {/if} @@ -757,14 +785,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["MTD %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["MTD %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["MTD %"] >=0} - +{quantStats['SPY']["MTD %"]?.toFixed(2)}% + +{quantStats['SPY']["MTD %"]?.toFixed(2)}% {:else} {quantStats['SPY']["MTD %"]?.toFixed(2)}% {/if} @@ -777,14 +805,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["3M %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["3M %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["3M %"] >=0} - +{quantStats['SPY']["3M %"]?.toFixed(2)}% + +{quantStats['SPY']["3M %"]?.toFixed(2)}% {:else} {quantStats['SPY']["3M %"]?.toFixed(2)}% {/if} @@ -797,79 +825,20 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["6M %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["6M %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["6M %"] >=0} - +{quantStats['SPY']["6M %"]?.toFixed(2)}% + +{quantStats['SPY']["6M %"]?.toFixed(2)}% {:else} {quantStats['SPY']["6M %"]?.toFixed(2)}% {/if} - - - YTD - - - {#if quantStats[$stockTicker?.toUpperCase()]["YTD %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% - {:else} - {quantStats[$stockTicker?.toUpperCase()]["YTD %"]?.toFixed(2)}% - {/if} - - - {#if quantStats['SPY']["YTD %"] >=0} - +{quantStats['SPY']["YTD %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["YTD %"]?.toFixed(2)}% - {/if} - - - - - - 1Y - - - {#if quantStats[$stockTicker?.toUpperCase()]["1Y %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% - {:else} - {quantStats[$stockTicker?.toUpperCase()]["1Y %"]?.toFixed(2)}% - {/if} - - - {#if quantStats['SPY']["1Y %"] >=0} - +{quantStats['SPY']["1Y %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["1Y %"]?.toFixed(2)}% - {/if} - - - - - - 3Y (ann.) - - - {#if quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% - {:else} - {quantStats[$stockTicker?.toUpperCase()]["3Y (ann.) %"]?.toFixed(2)}% - {/if} - - - {#if quantStats['SPY']["3Y (ann.) %"] >=0} - +{quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% - {:else} - {quantStats['SPY']["3Y (ann.) %"]?.toFixed(2)}% - {/if} - - @@ -877,14 +846,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Best Day %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Best Day %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Best Day %"] >=0} - +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% + +{quantStats['SPY']["Best Day %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Best Day %"]?.toFixed(2)}% {/if} @@ -897,14 +866,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Worst Day %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Worst Day %"] >=0} - +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% {/if} @@ -916,17 +885,17 @@ updateYearRange() Best Month - {#if quantStats[$stockTicker?.toUpperCase()]["Worst Day %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {#if quantStats[$stockTicker?.toUpperCase()]["Best Month %"] >=0} + +{quantStats[$stockTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% {:else} - {quantStats[$stockTicker?.toUpperCase()]["Worst Day %"]?.toFixed(2)}% + {quantStats[$stockTicker?.toUpperCase()]["Best Month %"]?.toFixed(2)}% {/if} - {#if quantStats['SPY']["Worst Day %"] >=0} - +{quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {#if quantStats['SPY']["Best Month %"] >=0} + +{quantStats['SPY']["Best Month %"]?.toFixed(2)}% {:else} - {quantStats['SPY']["Worst Day %"]?.toFixed(2)}% + {quantStats['SPY']["Best Month %"]?.toFixed(2)}% {/if} @@ -937,14 +906,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Worst Month %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Worst Month %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Worst Month %"] >=0} - +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Month %"]?.toFixed(2)}% {/if} @@ -957,14 +926,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Best Year %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Best Year %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Best Year %"] >=0} - +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% + +{quantStats['SPY']["Best Year %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Best Year %"]?.toFixed(2)}% {/if} @@ -977,14 +946,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Worst Year %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Worst Year %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Worst Year %"] >=0} - +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% + +{quantStats['SPY']["Worst Year %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Worst Year %"]?.toFixed(2)}% {/if} @@ -997,14 +966,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Avg. Drawdown"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Avg. Drawdown"] >=0} - +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Drawdown"]?.toFixed(2)}% {/if} @@ -1054,14 +1023,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Avg. Up Month %"] >=0} - +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Up Month %"]?.toFixed(2)}% {/if} @@ -1074,14 +1043,14 @@ updateYearRange() {#if quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"] >=0} - +{quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + +{quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% {:else} {quantStats[$stockTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% {/if} {#if quantStats['SPY']["Avg. Down Month %"] >=0} - +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% + +{quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% {:else} {quantStats['SPY']["Avg. Down Month %"]?.toFixed(2)}% {/if}