From a6771db026f423aedc234acb9458d226ec664564 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 14 Jun 2024 22:15:35 +0200 Subject: [PATCH] remove unnecessary components && ui fixes --- src/lib/components/PostSection.svelte | 26 +- src/lib/components/PricePredictionCard.svelte | 513 ------------------ src/lib/components/TradingModel.svelte | 243 --------- src/routes/+page.svelte | 36 +- 4 files changed, 40 insertions(+), 778 deletions(-) delete mode 100644 src/lib/components/PricePredictionCard.svelte delete mode 100644 src/lib/components/TradingModel.svelte diff --git a/src/lib/components/PostSection.svelte b/src/lib/components/PostSection.svelte index c58e4b41..a9a70f37 100644 --- a/src/lib/components/PostSection.svelte +++ b/src/lib/components/PostSection.svelte @@ -424,7 +424,7 @@ $: { {#if posts?.postType === 'text'} -
+
@@ -434,8 +434,8 @@ $: {
-
- {@html posts?.description?.length > 400 ? posts?.description.slice(0, 400) + "..." : posts?.description} +
+ {@html posts?.description}
@@ -676,4 +676,22 @@ $: {
- \ No newline at end of file + + \ No newline at end of file diff --git a/src/lib/components/PricePredictionCard.svelte b/src/lib/components/PricePredictionCard.svelte deleted file mode 100644 index c3fc1ab6..00000000 --- a/src/lib/components/PricePredictionCard.svelte +++ /dev/null @@ -1,513 +0,0 @@ - - - - - -
- -
- -
-
- -
- - -
- -
-
- - -
- - - Time Period - -
- - - - -
- -
- - - {#if mode} - -
- - Past Price - - - Future Price - -
- - -
- -
-
- -

- You can anticipate future returns in the next {timePeriod === '1W' ? '7 days' : timePeriod === '1M' ? '1 month' : timePeriod === '3M' ? '3 months' : timePeriod === '6M' ? '6 months' : 'n/a'}, based on the last price, with a 68% confidence level. -

- - - - - - - - - - - - - - - - - - - - - - - - - - -
TargetLowestAverageHighest
- Price - - ${lowPrice?.toFixed(2)} - - ${meanPrice?.toFixed(2)} - - ${highPrice?.toFixed(2)} -
- Change - -
- {#if changeMin >= 0} - - +{changeMin?.toFixed(2)}% - {:else if changeMin < 0} - - {changeMin?.toFixed(2)}% - {:else} - n/a - {/if} -
-
-
- {#if changeMean >= 0} - - +{changeMean?.toFixed(2)}% - {:else if changeMean < 0} - - {changeMean?.toFixed(2)}% - {:else} - n/a - {/if} -
-
-
- {#if changeMax >= 0} - - +{changeMax?.toFixed(2)}% - {:else if changeMax < 0} - - {changeMax?.toFixed(2)}% - {:else} - n/a - {/if} -
-
- {/if} - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/lib/components/TradingModel.svelte b/src/lib/components/TradingModel.svelte deleted file mode 100644 index bc247ba8..00000000 --- a/src/lib/components/TradingModel.svelte +++ /dev/null @@ -1,243 +0,0 @@ - - - - -
- -
- {#if Object?.keys(modelStats)?.length !== 0} - -
- - -
- -
- The Algorithm signals a - {#if modelStats['nextSignal'] === 'Buy'} - - - {modelStats['nextSignal']} - - - {:else if modelStats['nextSignal'] === 'Hold'} - - - {modelStats['nextSignal']}. - - {:else} - - - {modelStats['nextSignal']}. - - {/if} -
- - For past performance on historical data see Backtesting result. - -
- -
- -
- - -
- - -
- - - - - - - - - - - - - - - - - - {#if showFullStats} - - - - - - - - - - - - - - - - - - - - - - - - - {/if} - - -
- Total Return - -
- {#if modelStats['Return [%]'] >= 0} - +{modelStats['Return [%]']?.toFixed(2)} % - {:else if modelStats['Return [%]'] < 0} - {modelStats['Return [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Buy & Hold Return - -
- {#if modelStats['Buy & Hold Return [%]'] >= 0} - +{modelStats['Buy & Hold Return [%]']?.toFixed(2)} % - {:else if modelStats['Buy & Hold Return [%]'] < 0} - {modelStats['Buy & Hold Return [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Win Rate - -
- {#if modelStats['Win Rate [%]'] >= 0} - +{modelStats['Win Rate [%]']?.toFixed(2)} % - {:else if modelStats['Win Rate [%]'] < 0} - {modelStats['Win Rate [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Best Trade - -
- {#if modelStats['Best Trade [%]'] >= 0} - +{modelStats['Best Trade [%]']?.toFixed(2)} % - {:else if modelStats['Best Trade [%]'] < 0} - {modelStats['Best Trade [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Avg. Trade - -
- {#if modelStats['Avg. Trade [%]'] >= 0} - +{modelStats['Avg. Trade [%]']?.toFixed(2)} % - {:else if modelStats['Avg. Trade [%]'] < 0} - {modelStats['Avg. Trade [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Worst Trade - -
- {#if modelStats['Worst Trade [%]'] >= 0} - +{modelStats['Worst Trade [%]']?.toFixed(2)} % - {:else if modelStats['Worst Trade [%]'] < 0} - {modelStats['Worst Trade [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Avg. Drawdown - -
- {#if modelStats['Avg. Drawdown [%]'] >= 0} - +{modelStats['Avg. Drawdown [%]']?.toFixed(2)} % - {:else if modelStats['Avg. Drawdown [%]'] < 0} - {modelStats['Avg. Drawdown [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Max. Drawdown - -
- {#if modelStats['Max. Drawdown [%]'] >= 0} - +{modelStats['Max. Drawdown [%]']?.toFixed(2)} % - {:else if modelStats['Max. Drawdown [%]'] < 0} - {modelStats['Max. Drawdown [%]']?.toFixed(2)} % - {:else} - n/a - {/if} -
-
- Number of Trades - {modelStats['# Trades']} - Profit Factor - {modelStats['Profit Factor']?.toFixed(2)}
- Sharpe Ratio - {modelStats['Sharpe Ratio']?.toFixed(2)} - Sortino Ratio - {modelStats['Sortino Ratio']?.toFixed(2)}
- - - Time Period between {new Date(modelStats['Start'])?.toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} - - - {new Date(modelStats['End'])?.toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} - - - - - {:else} -

- No data available - -

- {/if} -
-
- - - - - - - diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 9a91fd6e..cba5fd4f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -456,35 +456,35 @@ onMount( async() => {
- +
- - - - - + + + + + {#each gainerLoserTickers as item} - goto("/stocks/"+item.symbol)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] border-b-[#202020] shake-ticker cursor-pointer"> - goto("/stocks/"+item.symbol)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#202020] shake-ticker cursor-pointer"> + - - -
SymbolNameMarket CapToday
SymbolNameMarket CapToday
+
{item?.symbol} + {item?.name?.length > 20 ? item?.name?.slice(0,20) + "..." : item?.name} + {item?.marketCap !== null ? abbreviateNumber(item?.marketCap,true) : '-'} +
@@ -603,9 +603,9 @@ onMount( async() => {
- +
- + @@ -614,23 +614,23 @@ onMount( async() => { {#each active as item, index} - goto("/stocks/"+item?.symbol)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] border-b-[#202020] shake-ticker cursor-pointer"> - goto("/stocks/"+item?.symbol)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#202020] shake-ticker cursor-pointer"> + - - -
Symbol Name Volume
+
{item?.symbol} + {item?.name?.length > 20 ? item?.name?.slice(0,20) + "..." : item?.name} + {item?.volume !== null ? abbreviateNumber(item?.volume) : '-'} +