diff --git a/src/lib/components/IPOChart.svelte b/src/lib/components/IPOChart.svelte new file mode 100644 index 00000000..79a1ac3f --- /dev/null +++ b/src/lib/components/IPOChart.svelte @@ -0,0 +1,211 @@ + + +

+ {year} Initial Public Offerings +

+ +
+ {#if year === currentYear} + There have been 64 IPOs so far in {year}. + {:else} + There have been {filteredData?.length?.toLocaleString("en-US")} IPOs in {year}. + The most was in {monthDict[maxMonth]} with {maxCount?.toLocaleString( + "en-US", + )}, the least was in {monthDict[minMonth]} with + {minCount}. + {/if} +
+ +
diff --git a/src/routes/ipos/+layout.svelte b/src/routes/ipos/+layout.svelte index ce388a9e..6ebc59aa 100644 --- a/src/routes/ipos/+layout.svelte +++ b/src/routes/ipos/+layout.svelte @@ -35,6 +35,10 @@ title: "Recent", path: "/ipos", }, + { + title: "Statistics", + path: "/ipos/statistics", + }, { title: "IPO News", path: "/ipos/news", @@ -46,8 +50,10 @@ // Subscribe to the $page store to reactively update the activeIdx based on the URL $: if ($page.url.pathname === "/ipos") { activeIdx = 0; - } else if ($page.url.pathname.startsWith("/ipos/news")) { + } else if ($page.url.pathname.startsWith("/ipos/statistics")) { activeIdx = 1; + } else if ($page.url.pathname.startsWith("/ipos/news")) { + activeIdx = 2; } diff --git a/src/routes/ipos/+page.svelte b/src/routes/ipos/+page.svelte index d5b50ba5..f2d50d0b 100644 --- a/src/routes/ipos/+page.svelte +++ b/src/routes/ipos/+page.svelte @@ -5,7 +5,6 @@ export let data; let ipoNews = data?.getNews; - console.log(ipoNews); let rawData = data?.getIPOCalendar?.slice(0, 200) ?? []; const excludedRules = new Set([ "volume", diff --git a/src/routes/ipos/statistics/+page.svelte b/src/routes/ipos/statistics/+page.svelte new file mode 100644 index 00000000..8af96655 --- /dev/null +++ b/src/routes/ipos/statistics/+page.svelte @@ -0,0 +1,246 @@ + + + + +
+
+
+
+
+
+
+ This page provides statistics and charts on initial public + offerings (IPOs) in the U.S. stock market. Annual data is + available from 2015 to 2025, with monthly data starting from 2019. +
+ +

+ Number of IPOs by Year +

+ +
+ There have been {data?.getIPOCalendar?.length?.toLocaleString( + "en-US", + )} IPOs between 2015 and 2025. The least was in {minYear} with only + {minCount}. The full year {maxYear} was an all-time record with {maxCount?.toLocaleString( + "en-US", + )} IPOs. +
+ +
+ + {#each yearList as year} + + + + {/each} +
+
+
+ +
+
+
diff --git a/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte b/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte index c23168cf..90746ed4 100644 --- a/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte +++ b/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte @@ -350,12 +350,12 @@

Revenue History