diff --git a/src/routes/stocks/[tickerID]/forecast/+page.svelte b/src/routes/stocks/[tickerID]/forecast/+page.svelte index 7101ecdb..119ad786 100644 --- a/src/routes/stocks/[tickerID]/forecast/+page.svelte +++ b/src/routes/stocks/[tickerID]/forecast/+page.svelte @@ -117,6 +117,91 @@ >
+
+
+
+
+

Stock Price Forecast

+ +
+

+ The 15 analysts with 12-month price forecasts for SMCI stock + have an average target of 74.53, with a low estimate of 32.5 + and a high estimate of 135. The average target predicts an + increase of 125.37% from the current stock price of 33.07. +

+
+
+
+ +
+
+ Analyst Consensus: Buy +
+
+
+
+
+ +
+
+ + + + + + + + + + + + + +
Target LowAverageMedianHigh
Price$32.5 $74.53 $67.5$135
Change-1.72%+125.37%+104.11%+308.22%
+
+
+
+

Financial Forecast this Year

diff --git a/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte b/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte index c9b74e76..02678120 100644 --- a/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte +++ b/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte @@ -3,7 +3,6 @@ numberOfUnreadNotification, displayCompanyName, stockTicker, - currentPortfolioPrice, } from "$lib/store"; import InfoModal from "$lib/components/InfoModal.svelte"; import { onMount } from "svelte"; @@ -19,7 +18,6 @@ let numOfAnalyst = 0; let consensusRating = "n/a"; let changesPercentage = 0; - let isLoaded = false; const tabs = [ { @@ -44,7 +42,7 @@ consensusRating = analystRating?.consensusRating; changesPercentage = analystRating?.priceTarget !== ("n/a" && 0) - ? ((priceTarget / $currentPortfolioPrice - 1) * 100)?.toFixed(2) + ? ((priceTarget / data?.getStockQuote?.price - 1) * 100)?.toFixed(2) : "-"; } if (activeIdx === 1) { @@ -87,11 +85,9 @@ return differenceInDays <= 4; } - onMount(async () => { - isLoaded = false; - changeTab(0); - isLoaded = true; + changeTab(0); + onMount(() => { window.addEventListener("scroll", handleScroll); return () => { window.removeEventListener("scroll", handleScroll); @@ -145,370 +141,295 @@ >
-

- Analyst Ratings -

+
+

+ {$displayCompanyName} Analyst Ratings +

+
+ +
+
+ {#each tabs as item, i} + + {/each} +
+
+
+
- {#if isLoaded} -
-
- -
- {numOfAnalyst} -
-
-
- - -
- {consensusRating} -
-
-
- - -
- {priceTarget} -
+
+
+
+ Total Analysts
- - -
- {changesPercentage > 0 ? "+" : ""}{changesPercentage} -
+ {numOfAnalyst}
- -

- Ratings History -

- -
- +
+ Consensus Rating +
+
- In previous years, Wall Street analysts have given {$displayCompanyName} - a total of {data?.getAnalystTickerHistory?.length} ratings. + {consensusRating} +
+
+
+ Price Target +
+
+ ${priceTarget} +
+
+
+
+ Upside +
+
+ {changesPercentage}% +
+
+
-
- - -
-
+
+ - {#each tabs as item, i} - + + + + + + + {#each data?.user?.tier === "Pro" ? historyList : historyList?.slice(0, 3) as item, index} + - {item.title} - - - {/each} - - - - - {#if rawData?.length !== 0} -
-
-
AnalystRatingDate
- - - - - - - - {#each data?.user?.tier === "Pro" ? historyList : historyList?.slice(0, 3) as item, index} - - - - + {/each} - + + - - {/each} - -
AnalystRatingDate
-
- {item?.analyst_name} - - {item?.analyst?.length > 15 - ? item?.analyst?.slice(0, 15) + "..." - : item?.analyst} +
+ {item?.analyst_name} + + {item?.analyst?.length > 15 + ? item?.analyst?.slice(0, 15) + "..." + : item?.analyst} -
- {#each Array.from({ length: 5 }) as _, i} - {#if i < Math.floor(item?.analystScore)} - - {:else} - - {/if} - {/each} - - - ({item?.analystScore !== null - ? item?.analystScore - : 0}) - -
-
-
-
- - {item?.rating_current} - - {item?.action_company?.replace( - "Initiates Coverage On", - "Initiates", - )} -
- {#if Math?.ceil(item?.adjusted_pt_prior) !== 0} - ${Math?.ceil(item?.adjusted_pt_prior)} +
+ {#each Array.from({ length: 5 }) as _, i} + {#if i < Math.floor(item?.analystScore)} - ${Math?.ceil( - item?.adjusted_pt_current, - )} - {:else if Math?.ceil(item?.adjusted_pt_current) !== 0} - ${Math?.ceil( - item?.adjusted_pt_current, - )} + + {:else} + {/if} -
-
-
-
- {#if latestInfoDate(item?.date)} -
+ +
+
+ + {item?.rating_current} + + {item?.action_company?.replace( + "Initiates Coverage On", + "Initiates", + )} +
+ {#if Math?.ceil(item?.adjusted_pt_prior) !== 0} + ${Math?.ceil(item?.adjusted_pt_prior)} + + ${Math?.ceil(item?.adjusted_pt_current)} + {:else if Math?.ceil(item?.adjusted_pt_current) !== 0} + ${Math?.ceil(item?.adjusted_pt_current)} - New - {/if} - {new Date(item?.date).toLocaleString("en-US", { - month: "short", - day: "numeric", - year: "numeric", - daySuffix: "2-digit", - })}
-
-
-
- {:else if activeIdx === 1} -
-
- - There are no top analyst ratings available for the past 12 months - for {$displayCompanyName} -
-
- {/if} +
+ - {#if rawData?.length !== 0} - - {/if} - {:else} -
-
- + +
+ {#if latestInfoDate(item?.date)} + + {/if} + {new Date(item?.date).toLocaleString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + })} +
+ + + {/each} + +
+ {:else if activeIdx === 1} +
+
+ + There are no top analyst ratings available for the past 12 months for + {$displayCompanyName} +
+
+ {/if} + + {#if rawData?.length !== 0} + {/if}