diff --git a/src/routes/crypto/+page.server.ts b/src/routes/crypto/+page.server.ts deleted file mode 100644 index 3073addf..00000000 --- a/src/routes/crypto/+page.server.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const load = async ({ locals }) => { - const getCryptoList = async () => { - const { apiKey, apiURL } = locals; - const response = await fetch(apiURL + "/all-crypto-tickers", { - method: "GET", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - }); - - const output = (await response.json())?.sort( - (a, b) => b?.marketCap - a?.marketCap - ); - - return output; - }; - - // Make sure to return a promise - return { - getCryptoList: await getCryptoList(), - }; -}; diff --git a/src/routes/crypto/+page.svelte b/src/routes/crypto/+page.svelte deleted file mode 100644 index 61fff519..00000000 --- a/src/routes/crypto/+page.svelte +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} List - of All Crypto Ticker Symbols ยท Stocknear - - - - - - - - - - - - - - - - -
- - -
-
-
-
-
-
- -
-
-

- Crypto Symbols -

-
- - - Collection of all Crypto Symbols available - - -
- - - - - -
-
- -
- -
-
- - {rawData?.length} Cryptos - -
- -
- -
- - - - - - - - - - - - {#each symbolList as item, index} - goto("/crypto/" + item?.symbol)} - class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] shake-ticker cursor-pointer" - > - - - - - - - - - - - {/each} - -
SymbolNameMarketCapCirculating SupplyMax Supply
- {item?.symbol} - - {item?.name?.length > charNumber - ? item?.name?.slice(0, charNumber) + "..." - : item?.name} - - {item?.marketCap !== null - ? abbreviateNumber(item?.marketCap, true) - : "-"} - - {item?.circulatingSupply !== null - ? abbreviateNumber(item?.circulatingSupply, true) - : "-"} - - {item?.maxSupply !== "Uncapped" - ? abbreviateNumber(item?.maxSupply, true) - : "Uncapped"} -
-
-
-
-
- -
-
-
-
diff --git a/src/routes/crypto/[tickerID]/+layout.server.ts b/src/routes/crypto/[tickerID]/+layout.server.ts deleted file mode 100644 index 0b3f0b57..00000000 --- a/src/routes/crypto/[tickerID]/+layout.server.ts +++ /dev/null @@ -1,88 +0,0 @@ -export const config = { - runtime: "nodejs20.x", -}; - -let companyName; - -const fetchData = async (apiURL, apiKey, endpoint, ticker) => { - const postData = { - ticker: ticker, - }; - - const response = await fetch(apiURL + endpoint, { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - - if (endpoint === "/crypto-profile") { - companyName = output?.name; - } - - return output; -}; - -const fetchWatchlist = async (pb, userId) => { - let output; - try { - output = await pb.collection("watchlist").getFullList({ - filter: `user="${userId}"`, - }); - } catch (e) { - //console.log(e) - output = []; - } - return output; -}; - -/* -async function fetchPortfolio(fastifyURL, userId) -{ - const postData = {'userId': userId}; - - const response = await fetch(fastifyURL+'/get-portfolio-data', { - method: 'POST', - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify(postData) - }); - - const output = (await response.json())?.items; - - return output -} -*/ - -export const load = async ({ params, locals, setHeaders }) => { - const { apiURL, apiKey, pb, user } = locals; - - const promises = [ - fetchData(apiURL, apiKey, "/crypto-profile", params.tickerID), - fetchData(apiURL, apiKey, "/stock-quote", params.tickerID), - fetchData(apiURL, apiKey, "/one-day-price", params.tickerID), - fetchWatchlist(pb, user?.id), - //fetchPortfolio(fastifyURL, locals?.user?.id) - ]; - - const [getCryptoProfile, getStockQuote, getOneDayPrice, getUserWatchlist] = - await Promise.all(promises); - - setHeaders({ - "cache-control": "public, max-age=300", - }); - - return { - getCryptoProfile, - getStockQuote, - getOneDayPrice, - getUserWatchlist, - companyName, - getParams: params.tickerID, - }; -}; diff --git a/src/routes/crypto/[tickerID]/+layout.svelte b/src/routes/crypto/[tickerID]/+layout.svelte deleted file mode 100644 index 616b1644..00000000 --- a/src/routes/crypto/[tickerID]/+layout.svelte +++ /dev/null @@ -1,1171 +0,0 @@ - - - - -
-
-
-
-
- -
- -
- - -
-
- -
-
- - -
- - - - - -
-
- -
- -
- -
- - {$cryptoTicker?.toUpperCase()} - - - {$displayCompanyName?.length > charNumber - ? $displayCompanyName?.slice(0, charNumber) + - "..." - : $displayCompanyName} - -
-
- - - - -
-
- - - - - - - - - - -
-
- - - - - -
-
-
-
-
-
-
- - - -{#if LoginPopup} - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/routes/crypto/[tickerID]/+page.server.ts b/src/routes/crypto/[tickerID]/+page.server.ts deleted file mode 100644 index 61857823..00000000 --- a/src/routes/crypto/[tickerID]/+page.server.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { error, fail, redirect } from "@sveltejs/kit"; -import { validateData } from "$lib/utils"; -import { loginUserSchema, registerUserSchema } from "$lib/schemas"; - -export const actions = { - login: async ({ request, locals }) => { - const { formData, errors } = await validateData( - await request.formData(), - loginUserSchema, - ); - - if (errors) { - return fail(400, { - data: formData, - errors: errors.fieldErrors, - }); - } - - try { - await locals.pb - .collection("users") - .authWithPassword(formData.email, formData.password); - - /* - if (!locals.pb?.authStore?.model?.verified) { - locals.pb.authStore.clear(); - return { - notVerified: true, - }; - } - */ - } catch (err) { - console.log("Error: ", err); - error(err.status, err.message); - } - - redirect(302, "/"); - }, - - register: async ({ locals, request }) => { - const { formData, errors } = await validateData( - await request.formData(), - registerUserSchema, - ); - - if (errors) { - return fail(400, { - data: formData, - errors: errors.fieldErrors, - }); - } - - try { - let newUser = await locals.pb.collection("users").create(formData); - /* -await locals.pb?.collection('users').update( - newUser?.id, { - 'freeTrial' : true, - 'tier': 'Pro', //Give new users a free trial for the Pro Subscription - }); -*/ - await locals.pb.collection("users").requestVerification(formData.email); - } catch (err) { - console.log("Error: ", err); - error(err.status, err.message); - } - - try { - await locals.pb - .collection("users") - .authWithPassword(formData.email, formData.password); - } catch (err) { - console.log("Error: ", err); - error(err.status, err.message); - } - - redirect(303, "/"); - }, - - oauth2: async ({ url, locals, request, cookies }) => { - const authMethods = (await locals?.pb - ?.collection("users") - ?.listAuthMethods())?.oauth2; - - - const data = await request?.formData(); - const providerSelected = data?.get("provider"); - - if (!authMethods) { - return { - authProviderRedirect: "", - authProviderState: "", - }; - } - const redirectURL = `${url.origin}/oauth`; - - const targetItem = authMethods?.providers?.findIndex( - (item) => item?.name === providerSelected, - ); - //console.log("==================") - //console.log(authMethods.authProviders) - //console.log('target item is: ', targetItem) - - const provider = authMethods.providers[targetItem]; - const authProviderRedirect = `${provider.authUrl}${redirectURL}`; - const state = provider.state; - const verifier = provider.codeVerifier; - - - - cookies.set("state", state, { - httpOnly: true, - sameSite: "lax", - secure: true, - path: "/", - maxAge: 60 * 60, - }); - - cookies.set("verifier", verifier, { - httpOnly: true, - sameSite: "lax", - secure: true, - path: "/", - maxAge: 60 * 60, - }); - - cookies.set("provider", providerSelected, { - httpOnly: true, - sameSite: "lax", - secure: true, - path: "/", - maxAge: 60 * 60, - }); - - cookies.set("path", "/", { - httpOnly: true, - sameSite: "lax", - secure: true, - path: "/", - maxAge: 60, - }); - - redirect(302, authProviderRedirect); - }, -}; - diff --git a/src/routes/crypto/[tickerID]/+page.svelte b/src/routes/crypto/[tickerID]/+page.svelte deleted file mode 100644 index c0ad99ca..00000000 --- a/src/routes/crypto/[tickerID]/+page.svelte +++ /dev/null @@ -1,1355 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$cryptoTicker}) Stock Price, Quote & News ยท - stocknear - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - -
-
-
- {#if $isCrosshairMoveActive} - {displayLegend?.close} - {:else if !$isCrosshairMoveActive && $realtimePrice !== null} - {$realtimePrice} - {:else} - {displayLegend?.close} - {/if} - - {#if $priceIncrease === true} -
- {:else if $priceIncrease === false} -
- {/if} -
- -
- {#if displayLegend?.change >= 0} - - +{displayLegend?.change}% - {:else if displayLegend?.change < 0} - - {displayLegend?.change}% - - {/if} - - {displayLegend?.date} -
-
-
- - -
- - - - diff --git a/src/routes/crypto/[tickerID]/congress-trading/+page.server.ts b/src/routes/crypto/[tickerID]/congress-trading/+page.server.ts deleted file mode 100644 index 8fa115a0..00000000 --- a/src/routes/crypto/[tickerID]/congress-trading/+page.server.ts +++ /dev/null @@ -1,28 +0,0 @@ -export const load = async ({ locals, params }) => { - const getSenateTrading = async () => { - const { apiKey, apiURL } = locals; - - const postData = { - ticker: params.tickerID, - }; - - // make the POST request to the endpoint - const response = await fetch(apiURL + "/congress-trading-ticker", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - - return output; - }; - - // Make sure to return a promise - return { - getSenateTrading: await getSenateTrading(), - }; -}; diff --git a/src/routes/crypto/[tickerID]/congress-trading/+page.svelte b/src/routes/crypto/[tickerID]/congress-trading/+page.svelte deleted file mode 100644 index 7b0987e2..00000000 --- a/src/routes/crypto/[tickerID]/congress-trading/+page.svelte +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$cryptoTicker}) US Congress & Senate Trading ยท - stocknear - - - - - - - - - - - - - - - - -
-
-
-
-
-

- Congress Trading -

- -
- - Get detailed insights of Corrupt US Politician ๐Ÿ‡บ๐Ÿ‡ธ who bought or sold - {$displayCompanyName} and the amounts involved! -
-
- {#if isLoaded} - {#if senateTradingList?.length !== 0} -

- Congress Statistics -

- -
-
- -
-
- Buy/Sell - - {buySellRatio?.toFixed(3)} - -
- -
- - - - - - = 0 - ? 100 - (buySellRatio * 100)?.toFixed(2) - : 0} - > - - - -
- {buySellRatio?.toFixed(2)} -
-
- -
- - -
-
- Dem/Rep - - {partyRatio?.toFixed(3)} - -
- -
- - - - - - = 0 - ? 100 - (partyRatio * 100)?.toFixed(2) - : 0} - > - - - -
- {partyRatio?.toFixed(2)} -
-
- -
- -
-
- - - - - {#if displayStructure === "Card"} -
- - - - - - - - - - - {#each senateTradingList as item} - - - - - - - - - {/each} - -
- Person - - Transaction Date - - Amount - Type
-
-
- -
- -
- -
- {new Date(item?.transactionDate)?.toLocaleString( - "en-US", - { - month: "short", - day: "numeric", - year: "numeric", - daySuffix: "2-digit", - }, - )} - - {item?.amount} - - {#if item?.type === "Bought"} - Bought - {:else if item?.type === "Sold"} - Sold - {:else if item?.type === "Exchange"} - Exchange - {/if} -
-
- {:else} -
- {#each senateTradingList as item} -
-
- {#if item?.party === "Republican"} - - {:else if item?.party === "Democratic"} - - {:else} - - {/if} -
-
- -
- - {item?.representative?.replace("_", " ")} - - - {item?.party ?? "n/a"} / {district[ - item?.representative - ] ?? "n/a"} - -
- -
-
- Owner - - {item?.owner?.length !== 0 ? item?.owner : "-"} - -
-
- -
- -
-
- Transaction Date - - {new Date(item?.transactionDate)?.toLocaleString( - "en-US", - { - month: "short", - day: "numeric", - year: "numeric", - daySuffix: "2-digit", - }, - )} - -
- -
- Disclosure Date - - {new Date(item?.disclosureDate)?.toLocaleString( - "en-US", - { - month: "short", - day: "numeric", - year: "numeric", - daySuffix: "2-digit", - }, - )} - -
-
- -
- -
-
- Amount - - {item?.amount?.replace( - "$1,000,001 - $5,000,000", - "$1Mio - $5Mio", - )} - -
- -
- Type - - {#if item?.type === "Bought"} - Bought - {:else if item?.type === "Sold"} - Sold - {:else if item?.type === "Exchange"} - Exchange - {/if} - -
-
-
-
- {/each} -
- - {#if rawData?.length >= 20} - - {/if} - {/if} - {:else} -

- No trading history available for {$displayCompanyName}. Likely no - corrupt politican has interest in this stock. -

- {/if} - {:else} -
-
- -
-
- {/if} -
-
-
-
diff --git a/src/routes/crypto/[tickerID]/forecast/+layout.svelte b/src/routes/crypto/[tickerID]/forecast/+layout.svelte deleted file mode 100644 index 020f1034..00000000 --- a/src/routes/crypto/[tickerID]/forecast/+layout.svelte +++ /dev/null @@ -1,85 +0,0 @@ - - -
-
- -
-
- - diff --git a/src/routes/crypto/[tickerID]/forecast/+page.server.ts b/src/routes/crypto/[tickerID]/forecast/+page.server.ts deleted file mode 100644 index c3096e0e..00000000 --- a/src/routes/crypto/[tickerID]/forecast/+page.server.ts +++ /dev/null @@ -1,54 +0,0 @@ -export const load = async ({ locals, params }) => { - const { apiURL, apiKey } = locals; - const postData = { - ticker: params.tickerID, - }; - const getAnalystInsight = async () => { - const response = await fetch(apiURL + "/analyst-insight", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - return output; - }; - - const getPriceAnalysis = async () => { - const response = await fetch(apiURL + "/price-analysis", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - return output; - }; - - const getSentimentAnalysis = async () => { - const response = await fetch(apiURL + "/sentiment-analysis", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - return output; - }; - - // Make sure to return a promise - return { - getAnalystInsight: await getAnalystInsight(), - getPriceAnalysis: await getPriceAnalysis(), - getSentimentAnalysis: await getSentimentAnalysis(), - }; -}; diff --git a/src/routes/crypto/[tickerID]/forecast/+page.svelte b/src/routes/crypto/[tickerID]/forecast/+page.svelte deleted file mode 100644 index 16c46d6b..00000000 --- a/src/routes/crypto/[tickerID]/forecast/+page.svelte +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Forecast AI ยท Stocknear - - - - - - - - - - - - - - - - -
-
-
-
- -
- -
-
- - -
- -
-
- - -
- -
-
-
-
-
-
diff --git a/src/routes/crypto/[tickerID]/news/+page.server.ts b/src/routes/crypto/[tickerID]/news/+page.server.ts deleted file mode 100644 index fec97bd6..00000000 --- a/src/routes/crypto/[tickerID]/news/+page.server.ts +++ /dev/null @@ -1,28 +0,0 @@ -export const load = async ({ locals, params }) => { - const getStockNews = async () => { - const { apiKey, apiURL } = locals; - - const postData = { - ticker: params.tickerID, - }; - - // make the POST request to the endpoint - const response = await fetch(apiURL + "/stock-news", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - - return output; - }; - - // Make sure to return a promise - return { - getStockNews: await getStockNews(), - }; -}; diff --git a/src/routes/crypto/[tickerID]/news/+page.svelte b/src/routes/crypto/[tickerID]/news/+page.svelte deleted file mode 100644 index 9f54c3e6..00000000 --- a/src/routes/crypto/[tickerID]/news/+page.svelte +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$cryptoTicker}) latest Stock Market News and - Breaking Stories ยท Stocknear - - - - - - - - - - - - - - - - -
-
-
-
-
-

News

-
- - {#if newsList?.length !== 0} -
- {#each newsList as item} -
- {#if (videoId = checkIfYoutubeVideo(item.url))} - - {:else} - -
- news image -
-
- {/if} -
-

- {item?.site} ยท {formatDate(item?.publishedDate)} ago -

- - - {item?.title} -

- {item?.text} -

-
-
-
- -
- {/each} -
- {#if newsList?.length !== rawNews?.length} - - {/if} - {:else} -
- - No news article published yet! -
- {/if} -
-
-
-
diff --git a/src/routes/crypto/[tickerID]/stats/+page.server.ts b/src/routes/crypto/[tickerID]/stats/+page.server.ts deleted file mode 100644 index 734b08b6..00000000 --- a/src/routes/crypto/[tickerID]/stats/+page.server.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const load = async ({ locals, params }) => { - const getQuantStats = async () => { - const { apiKey, apiURL } = locals; - const postData = { - ticker: params.tickerID, - }; - - // make the POST request to the endpoint - const response = await fetch(apiURL + "/get-quant-stats", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - - return output; - }; - - // Make sure to return a promise - return { - getQuantStats: await getQuantStats(), - }; -}; diff --git a/src/routes/crypto/[tickerID]/stats/+page.svelte b/src/routes/crypto/[tickerID]/stats/+page.svelte deleted file mode 100644 index bd5b4d3d..00000000 --- a/src/routes/crypto/[tickerID]/stats/+page.svelte +++ /dev/null @@ -1,1746 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$cryptoTicker}) Statistics & Valuation Metrics ยท - stocknear - - - - - - - - - - - - - - - - -
-
-
-

- Fundamental Data -

- -
- - Get detailed Fundamental insights of {$displayCompanyName} and compare it - to the S&P500. -
- - {#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 $cryptoTicker in quantStats && Object.keys(quantStats[$cryptoTicker]).length > 0} -

- Worst 10 Drawdowns of {$cryptoTicker} -

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

- {$cryptoTicker} vs. S&P500 -

- -

- 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 -
- Cumulative Return - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Cumulative Return %"] >= 0} - +{abbreviateNumber( - quantStats[$cryptoTicker?.toUpperCase()][ - "Cumulative Return %" - ], - )}% - {:else} - {abbreviateNumber( - quantStats[$cryptoTicker?.toUpperCase()][ - "Cumulative Return %" - ], - )}% - - {/if} - - {#if quantStats["SPY"]["Cumulative Return %"] >= 0} - +{quantStats["SPY"]["Cumulative Return %"]}% - {:else} - {quantStats["SPY"]["Cumulative Return %"]}% - - {/if} -
- Compound Annual Growth Rate (CAGR) - - {#if quantStats[$cryptoTicker?.toUpperCase()]["CAGR %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "CAGR %" - ]}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()]["CAGR %"]}% - - {/if} - - {#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 - - {#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)} -
- Expected Daily - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Daily %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "Expected Daily %" - ]}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "Expected Daily %" - ]}% - - {/if} - - {#if quantStats["SPY"]["Expected Daily %"] >= 0} - +{quantStats["SPY"]["Expected Daily %"]}% - {:else} - {quantStats["SPY"]["Expected Daily %"]}% - - {/if} -
- Expected Monthly - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Monthly %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "Expected Monthly %" - ]}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "Expected Monthly %" - ]}% - - {/if} - - {#if quantStats["SPY"]["Expected Monthly %"] >= 0} - +{quantStats["SPY"]["Expected Monthly %"]}% - {:else} - {quantStats["SPY"]["Expected Monthly %"]}% - - {/if} -
- Expected Yearly - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Expected Yearly %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "Expected Yearly %" - ]}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "Expected Yearly %" - ]}% - - {/if} - - {#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 - - {#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} - - {#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) - - {#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} - - {#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 - - {#if quantStats[$cryptoTicker?.toUpperCase()]["MTD %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "MTD %" - ]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "MTD %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["MTD %"] >= 0} - +{quantStats["SPY"]["MTD %"]?.toFixed(2)}% - {:else} - {quantStats["SPY"]["MTD %"]?.toFixed(2)}% - - {/if} -
- 3M - - {#if quantStats[$cryptoTicker?.toUpperCase()]["3M %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "3M %" - ]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "3M %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["3M %"] >= 0} - +{quantStats["SPY"]["3M %"]?.toFixed(2)}% - {:else} - {quantStats["SPY"]["3M %"]?.toFixed(2)}% - - {/if} -
- 6M - - {#if quantStats[$cryptoTicker?.toUpperCase()]["6M %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "6M %" - ]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "6M %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["6M %"] >= 0} - +{quantStats["SPY"]["6M %"]?.toFixed(2)}% - {:else} - {quantStats["SPY"]["6M %"]?.toFixed(2)}% - - {/if} -
- Best Day - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Best Day %"] >= 0} - +{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)}% - {:else} - {quantStats["SPY"]["Best Day %"]?.toFixed(2)}% - - {/if} -
- Worst Day - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Day %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Worst Day %"]?.toFixed(2)}% - - {/if} -
- Best Month - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Best Month %"] >= 0} - +{quantStats[$cryptoTicker?.toUpperCase()][ - "Best Month %" - ]?.toFixed(2)}% - {:else} - {quantStats[$cryptoTicker?.toUpperCase()][ - "Best Month %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["Best Month %"] >= 0} - +{quantStats["SPY"]["Best Month %"]?.toFixed( - 2, - )}% - {:else} - {quantStats["SPY"]["Best Month %"]?.toFixed(2)}% - - {/if} -
- Worst Month - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Month %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Worst Month %"]?.toFixed(2)}% - - {/if} -
- Best Year - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Best Year %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Best Year %"]?.toFixed(2)}% - - {/if} -
- Worst Year - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Worst Year %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Worst Year %"]?.toFixed(2)}% - - {/if} -
- Avg. Drawdown - - {#if quantStats[$cryptoTicker?.toUpperCase()]["Avg. Drawdown"] >= 0} - +{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, - )}% - {: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)} -
- Avg. Up Month - - {#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} - - {#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 - - {#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} - - {#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)}% -
-
- {:else} -

- -

- {/if} -
- {:else} -

- No data available -

- {/if} -
-
-
diff --git a/src/routes/etf/[tickerID]/stats/+page.server.ts b/src/routes/etf/[tickerID]/stats/+page.server.ts deleted file mode 100644 index b3fbd2dd..00000000 --- a/src/routes/etf/[tickerID]/stats/+page.server.ts +++ /dev/null @@ -1,28 +0,0 @@ -export const load = async ({ locals, params }) => { - const getQuantStats = async () => { - const { apiKey, apiURL } = locals; - - const postData = { - ticker: params.tickerID, - }; - - // make the POST request to the endpoint - const response = await fetch(apiURL + "/get-quant-stats", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-KEY": apiKey, - }, - body: JSON.stringify(postData), - }); - - const output = await response.json(); - - return output; - }; - - // Make sure to return a promise - return { - getQuantStats: await getQuantStats(), - }; -}; diff --git a/src/routes/etf/[tickerID]/stats/+page.svelte b/src/routes/etf/[tickerID]/stats/+page.svelte deleted file mode 100644 index 7c36b17a..00000000 --- a/src/routes/etf/[tickerID]/stats/+page.svelte +++ /dev/null @@ -1,1742 +0,0 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$etfTicker}) Statistics & Valuation Metrics ยท - stocknear - - - - - - - - - - - - - - - - -
-
-
-

- Fundamental Data -

- -
- - Get detailed Fundamental insights of {$displayCompanyName} and compare it - to the S&P500. -
- - {#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 $etfTicker in quantStats && Object.keys(quantStats[$etfTicker]).length > 0} -

- Worst 10 Drawdowns of {$etfTicker} -

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

- {$etfTicker} vs. 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", - })} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Metric - - {$etfTicker} - - S&P500 -
- Cumulative Return - - {#if quantStats[$etfTicker?.toUpperCase()]["Cumulative Return %"] >= 0} - +{abbreviateNumber( - quantStats[$etfTicker?.toUpperCase()][ - "Cumulative Return %" - ], - )}% - {:else} - {abbreviateNumber( - quantStats[$etfTicker?.toUpperCase()][ - "Cumulative Return %" - ], - )}% - - {/if} - - {#if quantStats["SPY"]["Cumulative Return %"] >= 0} - +{quantStats["SPY"]["Cumulative Return %"]}% - {:else} - {quantStats["SPY"]["Cumulative Return %"]}% - - {/if} -
- Compound Annual Growth Rate (CAGR) - - {#if quantStats[$etfTicker?.toUpperCase()]["CAGR %"] >= 0} - +{quantStats[$etfTicker?.toUpperCase()][ - "CAGR %" - ]}% - {:else} - {quantStats[$etfTicker?.toUpperCase()]["CAGR %"]}% - - {/if} - - {#if quantStats["SPY"]["CAGR %"] >= 0} - +{quantStats["SPY"]["CAGR %"]}% - {:else} - {quantStats["SPY"]["CAGR %"]}% - - {/if} -
- 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" - ]}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "Max Drawdown" - ]}% - - {/if} - - {#if quantStats["SPY"]["Max Drawdown"] >= 0} - +{quantStats["SPY"]["Max Drawdown"]}% - {:else} - {quantStats["SPY"]["Max Drawdown"]}% - - {/if} -
- 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 %" - ]}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "Expected Daily %" - ]}% - - {/if} - - {#if quantStats["SPY"]["Expected Daily %"] >= 0} - +{quantStats["SPY"]["Expected Daily %"]}% - {:else} - {quantStats["SPY"]["Expected Daily %"]}% - - {/if} -
- Expected Monthly - - {#if quantStats[$etfTicker?.toUpperCase()]["Expected Monthly %"] >= 0} - +{quantStats[$etfTicker?.toUpperCase()][ - "Expected Monthly %" - ]}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "Expected Monthly %" - ]}% - - {/if} - - {#if quantStats["SPY"]["Expected Monthly %"] >= 0} - +{quantStats["SPY"]["Expected Monthly %"]}% - {:else} - {quantStats["SPY"]["Expected Monthly %"]}% - - {/if} -
- Expected Yearly - - {#if quantStats[$etfTicker?.toUpperCase()]["Expected Yearly %"] >= 0} - +{quantStats[$etfTicker?.toUpperCase()][ - "Expected Yearly %" - ]}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "Expected Yearly %" - ]}% - - {/if} - - {#if quantStats["SPY"]["Expected Yearly %"] >= 0} - +{quantStats["SPY"]["Expected Yearly %"]}% - {:else} - {quantStats["SPY"]["Expected Yearly %"]}% - - {/if} -
- 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)}% - {: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)}% - {:else} - {quantStats["SPY"]["Daily Value-at-Risk %"]?.toFixed( - 2, - )}% - - {/if} -
- Expected Shortfall (cVaR) - - {#if quantStats[$etfTicker?.toUpperCase()]["Expected Shortfall (cVaR) %"] >= 0} - +{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)}% - {:else} - {quantStats["SPY"][ - "Expected Shortfall (cVaR) %" - ]?.toFixed(2)}% - - {/if} -
- 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)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "MTD %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["MTD %"] >= 0} - +{quantStats["SPY"]["MTD %"]?.toFixed(2)}% - {:else} - {quantStats["SPY"]["MTD %"]?.toFixed(2)}% - - {/if} -
- 3M - - {#if quantStats[$etfTicker?.toUpperCase()]["3M %"] >= 0} - +{quantStats[$etfTicker?.toUpperCase()][ - "3M %" - ]?.toFixed(2)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "3M %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["3M %"] >= 0} - +{quantStats["SPY"]["3M %"]?.toFixed(2)}% - {:else} - {quantStats["SPY"]["3M %"]?.toFixed(2)}% - - {/if} -
- 6M - - {#if quantStats[$etfTicker?.toUpperCase()]["6M %"] >= 0} - +{quantStats[$etfTicker?.toUpperCase()][ - "6M %" - ]?.toFixed(2)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "6M %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["6M %"] >= 0} - +{quantStats["SPY"]["6M %"]?.toFixed(2)}% - {:else} - {quantStats["SPY"]["6M %"]?.toFixed(2)}% - - {/if} -
- Best Day - - {#if quantStats[$etfTicker?.toUpperCase()]["Best Day %"] >= 0} - +{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)}% - {:else} - {quantStats["SPY"]["Best Day %"]?.toFixed(2)}% - - {/if} -
- Worst Day - - {#if quantStats[$etfTicker?.toUpperCase()]["Worst Day %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Worst Day %"]?.toFixed(2)}% - - {/if} -
- Best Month - - {#if quantStats[$etfTicker?.toUpperCase()]["Best Month %"] >= 0} - +{quantStats[$etfTicker?.toUpperCase()][ - "Best Month %" - ]?.toFixed(2)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "Best Month %" - ]?.toFixed(2)}% - - {/if} - - {#if quantStats["SPY"]["Best Month %"] >= 0} - +{quantStats["SPY"]["Best Month %"]?.toFixed( - 2, - )}% - {:else} - {quantStats["SPY"]["Best Month %"]?.toFixed(2)}% - - {/if} -
- Worst Month - - {#if quantStats[$etfTicker?.toUpperCase()]["Worst Month %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Worst Month %"]?.toFixed(2)}% - - {/if} -
- Best Year - - {#if quantStats[$etfTicker?.toUpperCase()]["Best Year %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Best Year %"]?.toFixed(2)}% - - {/if} -
- Worst Year - - {#if quantStats[$etfTicker?.toUpperCase()]["Worst Year %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Worst Year %"]?.toFixed(2)}% - - {/if} -
- Avg. Drawdown - - {#if quantStats[$etfTicker?.toUpperCase()]["Avg. Drawdown"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Avg. Drawdown"]?.toFixed(2)}% - - {/if} -
- 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)}% - {:else} - {quantStats[$etfTicker?.toUpperCase()][ - "Avg. Up Month %" - ]?.toFixed(2)}% - - {/if} - - {#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 - - {#if quantStats[$etfTicker?.toUpperCase()]["Avg. Down Month %"] >= 0} - +{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, - )}% - {:else} - {quantStats["SPY"]["Avg. Down Month %"]?.toFixed(2)}% - - {/if} -
- 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)}% -
-
- {:else} -

- -

- {/if} -
- {:else} -

- No data available -

- {/if} -
-
-