diff --git a/src/lib/components/ETFSidecard.svelte b/src/lib/components/ETFSidecard.svelte index 237f224b..84f2ad1f 100644 --- a/src/lib/components/ETFSidecard.svelte +++ b/src/lib/components/ETFSidecard.svelte @@ -11,12 +11,10 @@ let topHoldingList = []; let description = ""; let website = "-"; - let snippet; let ipoDate = "n/a"; let assetClass = "-"; let provider = "-"; - let showFullText = false; let totalAssetPercentage = 0; let dividendHistoryList = []; @@ -56,7 +54,6 @@ info?.description ?? "A detailed description of the company is not yet available."; website = info?.website; - snippet = description?.slice(0, 450) + "..."; totalAssetPercentage = topHoldingList ?.slice(0, 5) @@ -71,26 +68,8 @@ About {$etfTicker}

- {#if showFullText} - {description} - {:else} - {snippet} - {/if} + {description}

- {#if description.length !== 0} -
- -
- {/if}
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} About - · stocknear @@ -33,7 +33,7 @@ content="Welcome to Stocknear — a site that aims to be the internet's best source of free stock data and information for small investors." /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Top - Wall Street Stock Analysts · stocknear + Wall Street Stock Analysts · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Top - Wall Street Stock Analysts · stocknear + Wall Street Stock Analysts · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Top - 100 Strong Buy Stocks · stocknear + 100 Strong Buy Stocks · Stocknear - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Changelog - · stocknear - + - + diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte index 39d11655..e1f8701d 100644 --- a/src/routes/contact/+page.svelte +++ b/src/routes/contact/+page.svelte @@ -12,7 +12,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Contact - Us · stocknear + Us · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Latest - Lobbiyng Disclosure Tracker · stocknear + Lobbiyng Disclosure Tracker · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Jim - Carmer Tracker · stocknear + Carmer Tracker · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} List - of All Crypto Ticker Symbols · stocknear + of All Crypto Ticker Symbols · Stocknear { { - import { numberOfUnreadNotification, displayCompanyName, stockTicker, sentimentComponent, priceAnalysisComponent } from "$lib/store"; + import { + numberOfUnreadNotification, + displayCompanyName, + stockTicker, + sentimentComponent, + priceAnalysisComponent, + } from "$lib/store"; import PriceAnalysis from "$lib/components/PriceAnalysis.svelte"; import SentimentAnalysis from "$lib/components/SentimentAnalysis.svelte"; import AnalystInsight from "$lib/components/AnalystInsight.svelte"; @@ -14,47 +20,78 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Forecast AI · stocknear + {$displayCompanyName} ({$stockTicker}) Forecast AI · Stocknear - + - - + + - - + + - - - - -
+
-
+
-
- +
+
-
- +
+
- -
- +
+
diff --git a/src/routes/crypto/[tickerID]/news/+page.svelte b/src/routes/crypto/[tickerID]/news/+page.svelte index 820e7479..0033ee14 100644 --- a/src/routes/crypto/[tickerID]/news/+page.svelte +++ b/src/routes/crypto/[tickerID]/news/+page.svelte @@ -67,7 +67,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} {$displayCompanyName} ({$cryptoTicker}) latest Stock Market News and - Breaking Stories · stocknear + Breaking Stories · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Dividends - Calendar · stocknear + Calendar · Stocknear - + - + - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Earnings - Calendar · stocknear + Calendar · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Worldwide - Economic Calendar · stocknear + Economic Calendar · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} US - Economic Indicator · stocknear + Economic Indicator · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} List - of All ETF Ticker Symbols · stocknear + of All ETF Ticker Symbols · Stocknear + + diff --git a/src/routes/etf/[tickerID]/+page.svelte b/src/routes/etf/[tickerID]/+page.svelte index a61866ad..c013a083 100644 --- a/src/routes/etf/[tickerID]/+page.svelte +++ b/src/routes/etf/[tickerID]/+page.svelte @@ -763,7 +763,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$etfTicker}) Stock Price, Quote & News · stocknear + {$displayCompanyName} ({$etfTicker}) Stock Price, Quote & News · Stocknear - import { numberOfUnreadNotification, displayCompanyName, stockTicker, sentimentComponent, priceAnalysisComponent } from "$lib/store"; + import { + numberOfUnreadNotification, + displayCompanyName, + stockTicker, + sentimentComponent, + priceAnalysisComponent, + } from "$lib/store"; import PriceAnalysis from "$lib/components/PriceAnalysis.svelte"; import SentimentAnalysis from "$lib/components/SentimentAnalysis.svelte"; import AnalystInsight from "$lib/components/AnalystInsight.svelte"; @@ -14,47 +20,78 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Forecast AI · stocknear + {$displayCompanyName} ({$stockTicker}) Forecast AI · Stocknear - + - - + + - - + + - - - - -
+
-
+
-
- +
+
-
- +
+
- -
- +
+
diff --git a/src/routes/etf/[tickerID]/holdings/+page.svelte b/src/routes/etf/[tickerID]/holdings/+page.svelte index a5284765..01ee98dd 100644 --- a/src/routes/etf/[tickerID]/holdings/+page.svelte +++ b/src/routes/etf/[tickerID]/holdings/+page.svelte @@ -39,7 +39,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$etfTicker}) Holdings List · stocknear + {$displayCompanyName} ({$etfTicker}) Holdings List · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} {$displayCompanyName} ({$etfTicker}) latest Stock Market News and Breaking - Stories · stocknear + Stories · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$etfTicker}) Options Activity · stocknear + {$displayCompanyName} ({$etfTicker}) Options Activity · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Largest - ETF Providers by Assets Under Management · stocknear @@ -36,7 +36,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Largest - ETF Providers by Assets Under Management · stocknear + ETF Providers by Assets Under Management · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} {etfProviderData?.length} - {etfProviderName} ETFs - A Complete List · stocknear + {etfProviderName} ETFs - A Complete List · Stocknear diff --git a/src/routes/etf/new-launches/+page.svelte b/src/routes/etf/new-launches/+page.svelte index b860f44a..bbcc6bcd 100644 --- a/src/routes/etf/new-launches/+page.svelte +++ b/src/routes/etf/new-launches/+page.svelte @@ -90,7 +90,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} 100 - Newest ETFs · stocknear + Newest ETFs · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} FDA - Calendar · stocknear + Calendar · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Market - Heatmaps · stocknear @@ -285,7 +285,7 @@ async function exportTreemap() { content="Stock Heatmaps of S&P500, Nasdaq and Dow Jones to see percentage changes of the return for different time periods" /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} All - listed Hedge Funds · stocknear @@ -91,7 +91,7 @@ content="Find all listed Hedge Funds based on the US Market." /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Top - Wall Street Hedge Funds · stocknear + Wall Street Hedge Funds · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Imprint - · stocknear @@ -18,7 +18,7 @@ content="Imprint of Stocknear. Contact Information if you need help." /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Industry - · stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Insider - Tracker · stocknear + Tracker · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} IPOs - Calendar · stocknear @@ -59,7 +59,7 @@ content="A list of upcoming ipos on the US stock market." /> - + - + - import { numberOfUnreadNotification} from '$lib/store'; - import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; - import Katex from "$lib/components/Katex.svelte"; - //import Chart from '$lib/components/Chart.svelte'; - //import greeks from "greeks"; + - export let data; - - - -// Sample option contract parameters -/* -const strikePrice = 100; // Strike price of the option -const timeToExpiration = 30 / 365; // Time to expiration in years (30 days) -const volatility = 0.25; // Volatility of the underlying asset -const riskFreeRate = 0.001; // Risk-free interest rate - -// Generate sample underlying stock prices -const underlyingPrices = Array.from({ length: 50 }, (_, i) => 80 + i); // Sample prices from 80 to 129 - -let testList = []; -for(const price of underlyingPrices) { - testList.push(greeks.getTheta(price, strikePrice, timeToExpiration, volatility, riskFreeRate, "call")) -} - - -const options = { -silent: true, -animation: false, -grid: { - left:'2%', - right: '2%', - bottom:'5%', - containLabel: true - }, - xAxis: { - show: false, // Hide the xAxis - type: 'category', - data: underlyingPrices - }, - yAxis: { - type: 'value', - splitLine: { - show: false, - }, - }, - series: [ - { - data: testList, - showSymbol: false, - type: 'line' - } - ] -}; -*/ - - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} Long Call Options · stocknear - - - - - - - + + + + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Long + Call Options · Stocknear + + + + + + + - - - - - - + + + + + + - - -
- - +
+
+
+ +
+
+ +

+ Long Call Options +

+ -
-
-
- - -
-
- -

- Long Call Options -

- - - - - -
- A call option is one of the two fundamental types of options. The holder of a call option has the option, but not the obligation, to purchase 100 shares of the underlying stock at the strike price in the future. -
-
- It is useful to understand some basic terminology regarding the strike of a call option: -
    -
  1. - In-The-Money (ITM): The stock price is greater than the strike price. -
  2. -
  3. - At-The-Money (ATM): The stock price is equal to the strike price. -
  4. -
  5. - Out-of-the-money (OTM): The stock price is less than the strike price. -
  6. -
-
- - - - - - - ProfitLossStock Price -
- - OTM options expire worthless, whereas ITM options hold value at expiration. However, simply being ITM doesn't guarantee profit. You need to consider the price you paid for the option. For instance, if you paid $5 per contract and the option is in the money by $2, you'd incur a $3 loss. -
-
- Profiting from the option at expiration requires it to be ITM by more than the amount you paid for it; simple as that. -
- -

- What's the Goal -

+ +
+ A call option is one of the two fundamental types of options. The + holder of a call option has the option, but not the obligation, to + purchase 100 shares of the underlying stock at the strike price in + the future. +
+
+ It is useful to understand some basic terminology regarding the strike + of a call option: +
    +
  1. + In-The-Money (ITM): The + stock price is greater than the strike + price. +
  2. +
  3. + At-The-Money (ATM): The + stock price is equal to the strike + price. +
  4. +
  5. + Out-of-the-money (OTM): The + stock price is less than the strike + price. +
  6. +
+
+ + + + + + ProfitLossStock Price +
- -
- To break even at expiration, the underlying stock price must be higher than the strike price plus the premium you paid for the option. -
-
- For example, if you paid $5.00 for a 100 call and the stock is now worth $103, you will still lose money ($2 x 100 = $200) because you must cover the cost of the option. -
-
- Because of this, you really want the stock to go well above your strike price (depending on how much you paid for the option). Otherwise you will constantly be worrying if the stock is going to make it, which often leads to panic selling. -
-
- As a result, you want the stock to rise significantly above your strike price (depending on the amount you paid for the option). Otherwise, you'll be constantly worried about whether the stock will make it, which can lead to panic selling. -
- + OTM options expire worthless, whereas ITM options hold value at + expiration. However, simply being ITM doesn't guarantee profit. + You need to consider the price you paid for the option. For + instance, if you paid $5 per contract and the option is in the + money by $2, you'd incur a $3 loss. +
+
+ Profiting from the option at expiration requires it to be ITM by more + than the amount you paid for it; simple as that. +
+ -

- Effect of Time -

+

+ What's the Goal +

- -
- A call option will lose value as time passes due to theta decay. The rate of this accelerates as expiration approaches, with the majority of the decay happening in the final days or weeks of the option's lifetime. -
-
- Time decay occurs because as time passes, the chance of the stock making a large move decreases. An OTM contract can have plenty of value months before expiration, but as the final days approach, it will rapidly lose value if it is still out of the money. Simply put, when there is less time remaining, there is less of a chance that the stock will be able to move in time, making the price that others are willing to pay for the option less. -
-
- Time decay can be "fought" by other factors. The most obvious of course, is the price of the underlying stock. If the stock moves upwards enough, it can increase the value of the call more than the time decay is taking away from the call. Another factor is implied volatility, which can offset the decay if it increases enough. -
-
- Absent of these factors, a call will lose value as expiration approaches. The final price of a call will depend on how far ITM it is. All OTM calls, which previously were worth something due to the time value, will be worthless at expiration. -
- + +
+ To break even at expiration, the underlying stock price must be + higher than the strike price plus the premium you paid for the + option. +
+
+ For example, if you paid $5.00 for a 100 call and the stock is now + worth $103, you will still lose money ($2 x 100 = $200) because you + must cover the cost of the option. +
+
+ Because of this, you really want the stock to go well above your strike + price (depending on how much you paid for the option). Otherwise you + will constantly be worrying if the stock is going to make it, which + often leads to panic selling. +
+
+ As a result, you want the stock to rise significantly above your strike + price (depending on the amount you paid for the option). Otherwise, + you'll be constantly worried about whether the stock will make it, + which can lead to panic selling. +
+ -

- Effect of Volatility -

- - -
- Volatility is a large unknown when trading options. Like the price of the stock itself, it is one thing that we cannot easily predict. Options will increase in value as implied volatility increases, and decrease when IV decreases. In fact, implied volatility is actually calculated from the price of the option itself compared to the "fair value" price of the option. When other traders are willing to pay more for an option, it increases that gap, which IV represents. -
-
- Why would an investor pay more for an option than the theoretical fair value? There are many reasons, all of which involve real world events that factor into their decision. The most common reason is that an earnings announcement is upcoming. -
-
- Typically, a stock moves either up or down a fair bit when earnings are announced, as the company either beats or doesn't meet earning expectations. You might think this would be the perfect time to buy a call, as there is a chance the stock makes a big move in the coming days. Of course, everyone else in the market also thinks this and wants to get in on the action. Demand from lots of buyers of an option will cause the price of the option to go up. (Just like how lots of demand from home buyers or concert-goers allows for sellers to charge more) It goes the other way too, as option sellers know their worth and aren't going to sell an option that could double in the coming days for cheap. -
-
- Since there's expectation of a price raise, and therefore higher implied volatility, options are going for more than they usually would. However, after the announcement, implied volatility (and the price of the option) rapidly collapse to typical levels. So even if the price raises a lot as a result of the earnings, the call option might be worth less just because the IV is now lower (no more expectations that the price could raise further). -
- - -

- Pros of Long Call Options -

- -
-
    -
  1. - Buying a call is much cheaper than buying 100 shares of the underlying stock, giving you lots of leverage for relatively little capital. -
  2. -
  3. - Like owning shares, a long call has no profit cap. -
  4. -
  5. - You can never lose more than 100% of your investment. (This may sound like a con, but it is a benefit over other option strategies that have uncapped loss potential). -
  6. -
-
- +

+ Effect of Time +

-

- Cons of Long Call Options -

- -
-
    -
  1. - If the stock doesn't reach your breakeven point, you will lose your entire investment. If you owned shares instead, you may only be down a small amount, as the chance of a stock going to zero is slim. (But don't forget about Lehman Brothers) -
  2. -
  3. - Being highly leveraged means that even a small downwards move can send the call plummeting, leaving you with a tough decision to cut your losses or hold out for longer. -
  4. -
-
- + +
+ A call option will lose value as time passes due to theta decay. + The rate of this accelerates as expiration approaches, with the + majority of the decay happening in the final days or weeks of the + option's lifetime. +
+
+ Time decay occurs because as time passes, the chance of the stock making + a large move decreases. An OTM contract can have plenty of value months + before expiration, but as the final days approach, it will rapidly + lose value if it is still out of the money. Simply put, when there + is less time remaining, there is less of a chance that the stock will + be able to move in time, making the price that others are willing to + pay for the option less. +
+
+ Time decay can be "fought" by other factors. The most obvious of course, + is the price of the underlying stock. If the stock moves upwards enough, + it can increase the value of the call more than the time decay is taking + away from the call. Another factor is implied volatility, which can + offset the decay if it increases enough. +
+
+ Absent of these factors, a call will lose value as expiration approaches. + The final price of a call will depend on how far ITM it is. All OTM + calls, which previously were worth something due to the time value, + will be worthless at expiration. +
+ -

- Simple Example -

- -
- When dealing with long call options, it's crucial to understand their value and how they work. At expiration, the value of a call option can be determined using a simple formula, also known as the intrinsic value: - - - -
-
- This formula reflects that if the stock price exceeds the strike price, the option is profitable and worth exercising. For instance, if the strike price is $100 and the stock is trading at $105, the option can be exercised to buy shares at $100, resulting in a profit of $5 per share when sold at the market price. -
-
- The value of a call option prior to expiry consists of both intrinsic value and extrinsic value, commonly referred to as time value. Calculating the extrinsic value manually can be complex, often necessitating the use of option pricing models. - -
-
- To find the breakeven, simply add the price you paid for the contract(s) to the strike price: - - - -
- - +

+ Effect of Volatility +

+ +
+ Volatility is a large unknown when trading options. Like the price + of the stock itself, it is one thing that we cannot easily + predict. Options will increase in value as implied volatility + increases, and decrease when IV decreases. In fact, implied + volatility is actually calculated from the price of the option + itself compared to the "fair value" price of the option. When + other traders are willing to pay more for an option, it increases + that gap, which IV represents. +
+
+ Why would an investor pay more for an option than the theoretical fair + value? There are many reasons, all of which involve real world events + that factor into their decision. The most common reason is that an + earnings announcement is upcoming. +
+
+ Typically, a stock moves either up or down a fair bit when earnings + are announced, as the company either beats or doesn't meet earning + expectations. You might think this would be the perfect time to buy + a call, as there is a chance the stock makes a big move in the coming + days. Of course, everyone else in the market also thinks this and wants + to get in on the action. Demand from lots of buyers of an option will + cause the price of the option to go up. (Just like how lots of demand + from home buyers or concert-goers allows for sellers to charge more) + It goes the other way too, as option sellers know their worth and aren't + going to sell an option that could double in the coming days for cheap. +
+
+ Since there's expectation of a price raise, and therefore higher implied + volatility, options are going for more than they usually would. However, + after the announcement, implied volatility (and the price of the option) + rapidly collapse to typical levels. So even if the price raises a lot + as a result of the earnings, the call option might be worth less just + because the IV is now lower (no more expectations that the price could + raise further). +
+ - {#if data?.user?.tier !== 'Pro'} -
- -
- {/if} +

+ Pros of Long Call Options +

+ +
+
    +
  1. + Buying a call is much cheaper than buying 100 shares of the + underlying stock, giving you lots of leverage for relatively + little capital. +
  2. +
  3. + Like owning shares, a long call has no profit cap. +
  4. +
  5. + You can never lose more than 100% of your investment. (This + may sound like a con, but it is a benefit over other option + strategies that have uncapped loss potential). +
  6. +
+
+ +

+ Cons of Long Call Options +

+ +
+
    +
  1. + If the stock doesn't reach your breakeven point, you will lose + your entire investment. If you owned shares instead, you may + only be down a small amount, as the chance of a stock going to + zero is slim. (But don't forget about Lehman Brothers) +
  2. +
  3. + Being highly leveraged means that even a small downwards move + can send the call plummeting, leaving you with a tough + decision to cut your losses or hold out for longer. +
  4. +
+
+ -
-
- - +

+ Simple Example +

+ +
+ When dealing with long call options, it's crucial to understand + their value and how they work. At expiration, the value of a call + option can be determined using a simple formula, also known as the + intrinsic value: + + + +
+
+ This formula reflects that if the stock price exceeds the strike price, + the option is profitable and worth exercising. For instance, if the + strike price is $100 and the stock is trading at $105, the option can + be exercised to buy shares at $100, resulting in a profit of $5 per + share when sold at the market price. +
+
+ The value of a call option prior to expiry consists of both intrinsic + value and extrinsic value, commonly referred to as time value. Calculating + the extrinsic value manually can be complex, often necessitating the + use of option pricing models. +
+
+ To find the breakeven, simply add the price you paid for the contract(s) + to the strike price: + + +
+ + + {#if data?.user?.tier !== "Pro"} +
+ +
+ {/if} +
- -
+
+
+
- - - - - diff --git a/src/routes/list/+layout.svelte b/src/routes/list/+layout.svelte index 8b93b43e..e8064a66 100644 --- a/src/routes/list/+layout.svelte +++ b/src/routes/list/+layout.svelte @@ -222,7 +222,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Stock - Lists · stocknear @@ -232,7 +232,7 @@ content="Lists of stocks that share common characteristics. See companies ranked by market cap, employee count, sales or others." /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Sign - In · stocknear @@ -84,7 +84,7 @@ content="Sign In to to improve your stock analysis for free" /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Markdown - Guide · stocknear @@ -15,7 +15,7 @@ content="Markdown Guide to Post on Stocknear Community Page" /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's - Top Stock {title} · stocknear + Top Stock {title} · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - Afterhours Top Stocks · stocknear + Afterhours Top Stocks · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's - Top Stock {title} · stocknear + Top Stock {title} · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's - Top Stock {title} · stocknear + Top Stock {title} · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - Premarket Top Stocks · stocknear + Premarket Top Stocks · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's - Stock Market News and Breaking Stories · stocknear + Stock Market News and Breaking Stories · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's - General News and Breaking Stories · stocknear + General News and Breaking Stories · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Free - Market Newsletter: Stay Informed in Just 2 Minutes Per Day · stocknear + Market Newsletter: Stay Informed in Just 2 Minutes Per Day · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Notifications - · stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Options - Flow Feed · stocknear + Flow Feed · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} US - Politician Stock Trade Tracker · stocknear @@ -157,7 +157,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Which - stocks is {name} trading? · stocknear + stocks is {name} trading? · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Latest - Congressional Trading · stocknear @@ -75,7 +75,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Price - Alert · stocknear @@ -273,7 +273,7 @@ content="Set a price alert and get instant notification." /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Pricing - · stocknear + · Stocknear - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Privacy - Policy · stocknear - + - + diff --git a/src/routes/profile/+page.svelte b/src/routes/profile/+page.svelte index 79a7f0ad..0236af66 100644 --- a/src/routes/profile/+page.svelte +++ b/src/routes/profile/+page.svelte @@ -141,20 +141,20 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - My Account · stocknear - + - + diff --git a/src/routes/reddit-tracker/+page.svelte b/src/routes/reddit-tracker/+page.svelte index dc236f8c..66d3fe0a 100644 --- a/src/routes/reddit-tracker/+page.svelte +++ b/src/routes/reddit-tracker/+page.svelte @@ -261,7 +261,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Wallstreetbets - Tracker · stocknear + Tracker · Stocknear - + - + - Sign Up · stocknear + Sign Up · Stocknear + - - Reset Password · stocknear - - + + Reset Password · Stocknear + + -
-

- Reset Your Password -

-

We'll send you an email with a link to reset your password.

-
- -
- -
-
+
+

+ Reset Your Password +

+

+ We'll send you an email with a link to reset your password. +

+
+ +
+ +
+
- - - \ No newline at end of file diff --git a/src/routes/sentiment-tracker/+page.svelte b/src/routes/sentiment-tracker/+page.svelte index 61c3cc17..db90cbe6 100644 --- a/src/routes/sentiment-tracker/+page.svelte +++ b/src/routes/sentiment-tracker/+page.svelte @@ -36,7 +36,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Sentiment - Tracker · stocknear + Tracker · Stocknear - + - + { /> {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Stock - Screener · stocknear + Screener · Stocknear { content={`Build your Stock Screener to find profitable stocks.`} /> - + { - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} List - of All Stock Ticker Symbols · stocknear + of All Stock Ticker Symbols · Stocknear console.log("Content shared successfully.")) - .catch((error) => console.log("Error sharing content:", error)); + ?.then(() => console.log("Content shared successfully.")) + ?.catch((error) => console.log("Error sharing content:", error)); } else { toast.error("Sharing is not supported by your device", { style: "background: #333; color: #fff;", @@ -75,7 +75,7 @@ metrics: "metrics", forecast: "/forecast", financials: "/financials", - news: "/news", + profile: "/profile", }; if (state !== "overview" && sectionMap[state]) { @@ -353,7 +353,7 @@ insider: "insider", dividends: "dividends", forecast: "forecast", - news: "news", + profile: "profile", }; displaySection = sectionMap[ @@ -446,16 +446,20 @@ > + + @@ -949,6 +953,16 @@ > Dividends + changeSection("profile")} + class="p-2 px-5 cursor-pointer {displaySection === + 'profile' + ? 'text-white bg-primary sm:hover:bg-opacity-[0.95]' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + > + Profile + diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index 76640881..5b90aa84 100644 --- a/src/routes/stocks/[tickerID]/+page.svelte +++ b/src/routes/stocks/[tickerID]/+page.svelte @@ -727,7 +727,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {data?.companyName} ({$stockTicker}) Stock Price, Quote & News · stocknear + {data?.companyName} ({$stockTicker}) Stock Price, Quote & News · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Cash Flow Statement · stocknear + {$displayCompanyName} ({$stockTicker}) Cash Flow Statement · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Forecast Overview · stocknear + {$displayCompanyName} ({$stockTicker}) Forecast Overview · Stocknear - import { numberOfUnreadNotification, displayCompanyName, stockTicker, sentimentComponent, priceAnalysisComponent } from "$lib/store"; + import { + numberOfUnreadNotification, + displayCompanyName, + stockTicker, + sentimentComponent, + priceAnalysisComponent, + } from "$lib/store"; import PriceAnalysis from "$lib/components/PriceAnalysis.svelte"; import SentimentAnalysis from "$lib/components/SentimentAnalysis.svelte"; import AnalystInsight from "$lib/components/AnalystInsight.svelte"; @@ -14,47 +20,78 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Forecast AI · stocknear + {$displayCompanyName} ({$stockTicker}) Forecast AI · Stocknear - + - - + + - - + + - - - - -
+
-
+
-
- +
+
-
- +
+
- -
- +
+
diff --git a/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte b/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte index 6465fa73..7b203750 100644 --- a/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte +++ b/src/routes/stocks/[tickerID]/forecast/analyst/+page.svelte @@ -197,7 +197,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Analyst Ratings · stocknear + {$displayCompanyName} ({$stockTicker}) Analyst Ratings · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} {$displayCompanyName} ({$stockTicker}) · Q{quarter} - {year} · Earnings Call Transcript · stocknear + {year} · Earnings Call Transcript · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Business Metric Overview · stocknear + {$displayCompanyName} ({$stockTicker}) Business Metric Overview · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Revenue Breakdown · stocknear + {$displayCompanyName} ({$stockTicker}) Revenue Breakdown · Stocknear diff --git a/src/routes/stocks/[tickerID]/options/+page.svelte b/src/routes/stocks/[tickerID]/options/+page.svelte index 4666dc4b..dcb88f28 100644 --- a/src/routes/stocks/[tickerID]/options/+page.svelte +++ b/src/routes/stocks/[tickerID]/options/+page.svelte @@ -538,7 +538,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Options Activity · stocknear + {$displayCompanyName} ({$stockTicker}) Options Activity · Stocknear { + + const getSimilarStocks = async () => { + const { apiKey, apiURL } = locals; + const postData = { + ticker: params.tickerID, + }; + + // make the POST request to the endpoint + const response = await fetch(apiURL + "/similar-stocks", { + 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 { + getSimilarStocks: await getSimilarStocks(), + }; +}; diff --git a/src/routes/stocks/[tickerID]/profile/+layout.svelte b/src/routes/stocks/[tickerID]/profile/+layout.svelte new file mode 100644 index 00000000..1dab400b --- /dev/null +++ b/src/routes/stocks/[tickerID]/profile/+layout.svelte @@ -0,0 +1,87 @@ + + +
+
+
+
+
+ +
+ + +
+
+
+
diff --git a/src/routes/stocks/[tickerID]/profile/+page.server.ts b/src/routes/stocks/[tickerID]/profile/+page.server.ts new file mode 100644 index 00000000..191e625e --- /dev/null +++ b/src/routes/stocks/[tickerID]/profile/+page.server.ts @@ -0,0 +1,187 @@ +import { error, fail, redirect } from "@sveltejs/kit"; +import { validateData } from "$lib/utils"; +import { loginUserSchema, registerUserSchema } from "$lib/schemas"; + + +export const load = async ({ params, locals }) => { + const getStockDividend = async () => { + let newsList; + + const { apiURL, apiKey } = locals; + + const postData = { + ticker: params.tickerID, + }; + + // make the POST request to the endpoint + const response = await fetch(apiURL + "/stock-dividend", { + method: "POST", + headers: { + "Content-Type": "application/json", + "X-API-KEY": apiKey, + }, + body: JSON.stringify(postData), + }); + + newsList = await response.json(); + + return newsList; + }; + + // Make sure to return a promise + return { + getStockDividend: await getStockDividend(), + }; +}; + + + +export const actions = { + login: async ({ url, request, locals }) => { + + const path = url?.href?.replace("/oauth2","") + + 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, path); + }, + + register: async ({ url, locals, request }) => { + const path = url?.href?.replace("/oauth2","") + + 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, path); + }, + + oauth2: async ({ url, locals, request, cookies }) => { + + const path = url?.href?.replace("/oauth2","") + 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", path, { + httpOnly: true, + sameSite: "lax", + secure: true, + path: "/", + maxAge: 60, + }); + + redirect(302, authProviderRedirect); + }, + +}; diff --git a/src/routes/stocks/[tickerID]/profile/+page.svelte b/src/routes/stocks/[tickerID]/profile/+page.svelte new file mode 100644 index 00000000..f4998021 --- /dev/null +++ b/src/routes/stocks/[tickerID]/profile/+page.svelte @@ -0,0 +1,454 @@ + + + + + + + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} + {$displayCompanyName} ({$stockTicker}) Company Profile & Overview - + Stocknear + + + + + + + + + + + + + + + + +
+
+
+
+
+

+ Dividends +

+ +
+ + + {#if rawData?.history?.length !== 0} + {#if !dateDistance} + {$displayCompanyName} has an annual dividend of ${annualDividend} + per share, with a forward yield of + {dividendYield}%. The dividend is paid every + {payoutFrequency === 4 + ? "3 months" + : payoutFrequency === 2 + ? "6 months" + : payoutFrequency === 1 + ? "12 months" + : "n/a"} + and the last ex-dividend date was + {new Date(exDividendDate)?.toLocaleString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + })} + {:else} + {$displayCompanyName} issued its most recent dividend on + {new Date(rawData?.history?.at(0)?.date)?.toLocaleString( + "en-US", + { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + }, + )}. Since then, the company has not distributed any further + dividends for over 12 months. + {/if} + {:else} + No dividend history available for {$displayCompanyName}. + {/if} +
+
+ + {#if rawData?.history?.length !== 0} +
+
+ +
+ {dividendYield !== "0.00" ? dividendYield : "0"}% +
+
+
+ + +
+ {annualDividend !== "0.00" ? annualDividend : "0"} +
+
+
+ + +
+ {new Date(exDividendDate)?.toLocaleString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + })} +
+
+ +
+ + +
+ {payoutFrequency === 4 + ? "Quartely" + : payoutFrequency === 2 + ? "Half-Yearly" + : payoutFrequency === 1 + ? "Annually" + : "n/a"} +
+
+
+ + +
+ {payoutRatio !== "0.00" ? payoutRatio : "0"}% +
+
+
+ + +
+ {dividendGrowth !== "NaN" ? dividendGrowth + "%" : "-"} +
+
+
+ +
+

Dividends History

+
+ + {#if isLoaded} + {#if rawData?.history?.length !== 0 && optionsDividend} +
+ +
+ +
+ + + + + + + + + + + {#each rawData?.history as item} + + + + + + + {/each} + +
+ Ex-Divid. Date + + Cash Amount + + Record Date + + Pay Date +
+ {new Date(item?.date)?.toLocaleString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + })} + + {item?.adjDividend?.toFixed(3)} + + {item?.recordDate?.length !== 0 + ? new Date(item?.recordDate)?.toLocaleString( + "en-US", + { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + }, + ) + : "n/a"} + + {item?.paymentDate?.length !== 0 + ? new Date(item?.paymentDate)?.toLocaleString( + "en-US", + { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + }, + ) + : "n/a"} +
+
+ + * Dividend amounts are adjusted for stock splits when + applicable. + + {:else} +

+ No history found +

+ {/if} + {:else} +
+
+ +
+
+ {/if} + {/if} +
+
+
+
+ + diff --git a/src/routes/stocks/[tickerID]/statistics/+page.svelte b/src/routes/stocks/[tickerID]/statistics/+page.svelte index fd81b177..d30215aa 100644 --- a/src/routes/stocks/[tickerID]/statistics/+page.svelte +++ b/src/routes/stocks/[tickerID]/statistics/+page.svelte @@ -46,7 +46,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Number of Employees · stocknear + {$displayCompanyName} ({$stockTicker}) Number of Employees · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Market Cap & Net Worth · stocknear + {$displayCompanyName} ({$stockTicker}) Market Cap & Net Worth · Stocknear {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Terms - of Use · stocknear - + - + diff --git a/src/routes/watchlist/options/+page.svelte b/src/routes/watchlist/options/+page.svelte index 864208c3..94dcddd0 100644 --- a/src/routes/watchlist/options/+page.svelte +++ b/src/routes/watchlist/options/+page.svelte @@ -138,7 +138,7 @@ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Options - Watchlist · stocknear @@ -148,7 +148,7 @@ content="A option watchlist tracker tool. Add stocks and ETFs to keep track of their performance." /> - + - + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Stock - Watchlist · stocknear @@ -1010,7 +1010,7 @@ content="A stock watchlist tracker tool. Add stocks and ETFs to keep track of their performance." /> - + - +