{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} Portfolio Β· stocknear

Portfolio Tournament

{displayMonth} 2024 πŸš€

{#if isLoaded}
{#if portfolio.length === 0}
Portfolio
Account Value
$100,000.00
Available Cash
$100,000.00
Overall Return
0.00%
{:else}
Account Value
${new Intl.NumberFormat("en", { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(portfolio?.at(0)?.accountValue)}
Available Cash
${new Intl.NumberFormat("en", { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(portfolio?.at(0)?.availableCash)}
Overall Return
{#if portfolio?.at(0)?.overallReturn > 0} +{portfolio?.at(0)?.overallReturn?.toFixed(2)}% {:else if portfolio?.at(0)?.overallReturn < 0} {portfolio?.at(0)?.overallReturn?.toFixed(2)}% {:else} {portfolio?.at(0)?.overallReturn?.toFixed(2)}% {/if}
{/if} {#if portfolio?.length !== 0}
Holdings
{#if holdingsList?.length === 0}
No Holdings found
Click on the Search Icon to find your favorite stocks and begin growing your portfolio.
{:else} {#each holdingsList as item, index} goto(`/${item?.assetType === 'etf' ? 'etf' : 'stocks'}/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] {index % 2 === 0 ? 'bg-opacity-[0.25] bg-[#323239]' : 'bg-[#202020]'} border-b-[#0F0F0F] cursor-pointer"> {/each}
{item?.symbol} {item.name?.length > charNumber ? item?.name?.slice(0,charNumber) + "..." : item?.name}
x{item?.numberOfShares} ${new Intl.NumberFormat("en", { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(item?.numberOfShares * item?.currentPrice)}
${item?.currentPrice?.toFixed(2)}
{#if displayChange === "Change in %"} {#if item?.sinceBoughtChange >=0} +{item?.sinceBoughtChange?.toFixed(2)}% {:else} {item?.sinceBoughtChange?.toFixed(2)}% {/if} {:else} {#if item?.sinceBoughtChange >=0} +${(item?.numberOfShares * item?.currentPrice * item?.sinceBoughtChange/100 )?.toFixed(2)} {:else} ${(item?.numberOfShares * item?.currentPrice * item?.sinceBoughtChange/100 )?.toFixed(2)} {/if} {/if}
{/if}
showTradingHistory = !showTradingHistory} class="cursor-pointer flex flex-row items-center justify-between">
Trading History
{#if tradingHistoryList?.length === 0}
{#if showTradingHistory} No Trading History found {/if}
{:else} {#if showTradingHistory}
{#each tradingHistoryList as item, index} {/each}
{item?.symbol} {item.name?.length > charNumber ? item?.name.slice(0,charNumber) + "..." : item?.name}
{#if item?.type === 'buy'} Bought {item?.numberOfShares} shares at {item?.price?.toLocaleString(undefined, { style: 'currency', currency: 'USD', })} {:else} Sold {item?.numberOfShares} shares at {item?.price?.toLocaleString(undefined, { style: 'currency', currency: 'USD', })} {/if}
{/if} {/if}
{/if} {:else}
{/if}
{#if LoginPopup} {/if}