diff --git a/src/lib/components/BuyTrade.svelte b/src/lib/components/BuyTrade.svelte index 8a8eb1f0..8b45af6d 100644 --- a/src/lib/components/BuyTrade.svelte +++ b/src/lib/components/BuyTrade.svelte @@ -185,7 +185,7 @@
- +
{$displayCompanyName?.length > 35 ? $displayCompanyName?.slice(0, 35) + "..." : $displayCompanyName} diff --git a/src/lib/components/SellTrade.svelte b/src/lib/components/SellTrade.svelte index 76521a37..3f7f073b 100644 --- a/src/lib/components/SellTrade.svelte +++ b/src/lib/components/SellTrade.svelte @@ -181,7 +181,7 @@ $: {
- +
{$displayCompanyName?.length > 30 ? $displayCompanyName?.slice(0, 30) + "..." : $displayCompanyName} diff --git a/src/routes/crypto/[tickerID]/+layout.svelte b/src/routes/crypto/[tickerID]/+layout.svelte index ee48e22b..4216601f 100644 --- a/src/routes/crypto/[tickerID]/+layout.svelte +++ b/src/routes/crypto/[tickerID]/+layout.svelte @@ -558,12 +558,12 @@ $: { -
+
-
- -
-
+
+ +
+
diff --git a/src/routes/crypto/[tickerID]/+page.svelte b/src/routes/crypto/[tickerID]/+page.svelte index c7b35deb..af99ce88 100644 --- a/src/routes/crypto/[tickerID]/+page.svelte +++ b/src/routes/crypto/[tickerID]/+page.svelte @@ -718,12 +718,12 @@ afterUpdate(async () => {
-
+
-
+
diff --git a/src/routes/crypto/[tickerID]/congress-trading/+page.svelte b/src/routes/crypto/[tickerID]/congress-trading/+page.svelte index c3387942..cb6cbd4a 100644 --- a/src/routes/crypto/[tickerID]/congress-trading/+page.svelte +++ b/src/routes/crypto/[tickerID]/congress-trading/+page.svelte @@ -297,7 +297,7 @@ isLoaded = true; {#each senateTradingList as item} - goto(`/politicians/${item?.id}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#0F0F0F] border-b-[#0F0F0F] cursor-pointer"> + goto(`/politicians/${item?.id}`)} class="odd:bg-[#202020] sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#0F0F0F] border-b-[#0F0F0F] cursor-pointer">
diff --git a/src/routes/crypto/[tickerID]/stats/+page.svelte b/src/routes/crypto/[tickerID]/stats/+page.svelte index f52d969d..28d49152 100644 --- a/src/routes/crypto/[tickerID]/stats/+page.svelte +++ b/src/routes/crypto/[tickerID]/stats/+page.svelte @@ -20,35 +20,61 @@ let currentPrice = 0; let previousClose = '-'; let volume = '-'; - let eps = '-'; - let pe = '-'; let alpha = '-'; let beta = '-'; + // Function to check if a date is today or yesterday, adjusting for weekends + function ongoingDD(dateString) { + const date = new Date(dateString); + const today = new Date(); + const yesterday = new Date(today); + yesterday.setDate(yesterday.getDate() - 1); -// Function to check if a date is today or yesterday, adjusting for weekends -function ongoingDD(dateString) { - const date = new Date(dateString); - const today = new Date(); - const yesterday = new Date(today); - yesterday.setDate(yesterday.getDate() - 1); - - // Adjust today to Friday if it's Saturday or Sunday - if (today.getDay() === 6) { // Saturday - today.setDate(today.getDate() - 1); // Set to Friday - } else if (today.getDay() === 0) { // Sunday - today.setDate(today.getDate() - 2); // Set to Friday + // Adjust today to Friday if it's Saturday or Sunday + if (today.getDay() === 6) { // Saturday + today.setDate(today.getDate() - 1); // Set to Friday + } else if (today.getDay() === 0) { // Sunday + today.setDate(today.getDate() - 2); // Set to Friday + } + + return date.getDate() === today.getDate() && + date.getMonth() === today.getMonth() && + date.getFullYear() === today.getFullYear() || + date.getDate() === yesterday.getDate() && + date.getMonth() === yesterday.getMonth() && + date.getFullYear() === yesterday.getFullYear(); } - - return date.getDate() === today.getDate() && - date.getMonth() === today.getMonth() && - date.getFullYear() === today.getFullYear() || - date.getDate() === yesterday.getDate() && - date.getMonth() === yesterday.getMonth() && - date.getFullYear() === yesterday.getFullYear(); -} - - + + /* + let progressDayPriceValue = 0; + let progressYearPriceValue = 0; + let totalDuration = 500; + + async function updateDayRange() { + + const interval = 10; // interval between each update in ms + const increment = (currentPrice / (totalDuration / interval)); + + if (progressDayPriceValue < currentPrice) { + progressDayPriceValue = progressDayPriceValue + increment; + setTimeout(updateDayRange, interval); + } + }; + + + async function updateYearRange() { + + const interval = 10; // interval between each update in ms + const increment = (currentPrice / (totalDuration / interval)); + + if (progressYearPriceValue < currentPrice) { + progressYearPriceValue = progressYearPriceValue + increment; + setTimeout(updateYearRange, interval); + } + }; + + */ + marketCap = '-'; yearHigh = '-'; yearLow = '-'; @@ -58,8 +84,6 @@ function ongoingDD(dateString) { currentPrice = '-'; previousClose = '-'; volume = '-'; - eps = '-'; - pe = '-'; alpha = '-'; beta = '-'; @@ -70,8 +94,6 @@ function ongoingDD(dateString) { volume = abbreviateNumber(stockQuote?.volume); currentPrice = stockQuote?.price; previousClose = stockQuote?.previousClose; - eps = stockQuote?.eps; - pe = stockQuote?.pe; beta = stockQuote?.beta; @@ -117,15 +139,12 @@ function ongoingDD(dateString) { -
-
-
-
-
-

- Fundamental Data -

- +
+
+
+

+ Fundamental Data +

@@ -139,12 +158,12 @@ function ongoingDD(dateString) { - + {#if $screenWidth <= 550} - - {:else} - - - - {/if} @@ -174,7 +193,7 @@ function ongoingDD(dateString) { {#if $screenWidth < 640} - {:else} -
+ 1-Day Range +
{dayLow} @@ -156,17 +175,17 @@ function ongoingDD(dateString) {
+ 1-Day Range + {dayLow} + + {dayHigh}
+ 1-Year Range @@ -189,7 +208,7 @@ function ongoingDD(dateString) { + 1-Year Range @@ -218,47 +237,32 @@ function ongoingDD(dateString) { - - - - - + + + + + - - - - - + + + + + - - - + + - - + - - - - - - -
Market Cap ${marketCap}Volume{volume}
Mkt Cap ${marketCap}Volume{volume}
Price${currentPrice}Prev. Close${previousClose}
Price${currentPrice}Prev. Close${previousClose?.toFixed(2)}
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 ?? '-'}
@@ -272,30 +276,30 @@ function ongoingDD(dateString) { - - - - - + + + + + {#each quantStats[$cryptoTicker?.toUpperCase()]['Worst 10 Drawdowns'] as item} - - + - - - @@ -313,668 +317,809 @@ function ongoingDD(dateString) { Comparison of company stats against the S&P500 Index.

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

+

{/if} @@ -1001,5 +1146,4 @@ function ongoingDD(dateString) { {/if} - - \ No newline at end of file + \ No newline at end of file
+
Avg. Up Month - {quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + + {#if quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"] >=0} + +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Up Month %"]?.toFixed(2)}% + {:else} + {quantStats[$cryptoTicker?.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[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + + {#if quantStats[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"] >=0} + +{quantStats[$cryptoTicker?.toUpperCase()]["Avg. Down Month %"]?.toFixed(2)}% + {:else} + {quantStats[$cryptoTicker?.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[$cryptoTicker?.toUpperCase()]["Win Days %"]?.toFixed(2)}% + {quantStats['SPY']["Win Days %"]?.toFixed(2)}%
+
Win Month + {quantStats[$cryptoTicker?.toUpperCase()]["Win Month %"]?.toFixed(2)}% + {quantStats['SPY']["Win Month %"]?.toFixed(2)}%
+
Win Quarter + {quantStats[$cryptoTicker?.toUpperCase()]["Win Quarter %"]?.toFixed(2)}% + {quantStats['SPY']["Win Quarter %"]?.toFixed(2)}%
+
Win Year + {quantStats[$cryptoTicker?.toUpperCase()]["Win Year %"]?.toFixed(2)}% + {quantStats['SPY']["Win Year %"]?.toFixed(2)}%