diff --git a/src/routes/stocks/[tickerID]/forecast/ai/+layout.svelte b/src/routes/stocks/[tickerID]/forecast/ai/+layout.svelte
index 3e3e8ddb..350c5487 100644
--- a/src/routes/stocks/[tickerID]/forecast/ai/+layout.svelte
+++ b/src/routes/stocks/[tickerID]/forecast/ai/+layout.svelte
@@ -36,13 +36,14 @@
-
Revenue Definition
+
AI Score Definition
Revenue, also called sales, is the amount of money a company
receives from its business activities, such as sales of products
or services. Revenue does not take any expenses into account and
is therefore different from profits.
+
+
+
+
+
+ AI Trend Forecast Definition
+
+
+ Revenue, also called sales, is the amount of money a company
+ receives from its business activities, such as sales of products
+ or services. Revenue does not take any expenses into account and
+ is therefore different from profits.
+
+
diff --git a/src/routes/stocks/[tickerID]/forecast/ai/+page.svelte b/src/routes/stocks/[tickerID]/forecast/ai/+page.svelte
index 27a1ed4d..a8c7e8df 100644
--- a/src/routes/stocks/[tickerID]/forecast/ai/+page.svelte
+++ b/src/routes/stocks/[tickerID]/forecast/ai/+page.svelte
@@ -122,6 +122,9 @@
return dataPoint;
});
+ const solidData = processedData.slice(0, -1);
+ const lastTwoPoints = processedData.slice(-2); // Extract the last two points
+
// Highcharts options for plotting the data with markers.
const options = {
chart: {
@@ -175,7 +178,7 @@
series: [
{
name: "Close Price",
- data: processedData,
+ data: solidData,
color: $mode === "light" ? "#007050" : "#fff",
animation: false,
marker: {
@@ -183,7 +186,19 @@
},
lineWidth: 2,
},
+ {
+ name: "Projected Price",
+ data: lastTwoPoints, // Include the second-last and last point
+ color: $mode === "light" ? "#007050" : "#fff",
+ animation: false,
+ marker: {
+ enabled: false,
+ },
+ lineWidth: 2,
+ dashStyle: "Dash", // Dashed line for the last part
+ },
],
+
plotOptions: {
series: {
enableMouseTracking: false,
@@ -374,92 +389,6 @@
},
},
],
- /*
- annotations: [
- {
- labels: [
- {
- point: {
- x: forecastHigh[forecastHigh.length - 1][0], // Last X (timestamp)
- y: forecastHigh[forecastHigh.length - 1][1], // Last Y (Average value)
- xAxis: 0,
- yAxis: 0,
- },
- text: `
High$${forecastHigh[forecastHigh.length - 1][1]}`,
- useHTML: true,
- style: {
- backgroundColor: "rgba(0, 0, 0, 0.8)",
- borderColor: "rgba(255, 255, 255, 0.2)",
- borderWidth: 1,
- fontSize: "12px",
- fontWeight: "bold",
- },
- align: "left",
- verticalAlign: "middles",
- x: -10,
- y: 0,
- backgroundColor: "rgba(0, 0, 0, 0.8)",
- borderColor: "rgba(255, 255, 255, 0.2)",
- borderWidth: 1,
- padding: 8,
- shape: "",
- },
- {
- point: {
- x: forecastAvg[forecastAvg.length - 1][0], // Last X (timestamp)
- y: forecastAvg[forecastAvg.length - 1][1], // Last Y (Average value)
- xAxis: 0,
- yAxis: 0,
- },
- text: `
Average$${forecastAvg[forecastAvg.length - 1][1]}`,
- useHTML: true,
- style: {
- backgroundColor: "rgba(0, 0, 0, 0.8)",
- borderColor: "rgba(255, 255, 255, 0.2)",
- borderWidth: 1,
- fontSize: "12px",
- fontWeight: "bold",
- },
- align: "right",
- verticalAlign: "middle",
- x: -10,
- y: 30,
- backgroundColor: "rgba(0, 0, 0, 0.8)",
- borderColor: "rgba(255, 255, 255, 0.2)",
- borderWidth: 1,
- padding: 5,
- shape: "",
- },
- {
- point: {
- x: forecastLow[forecastLow.length - 1][0], // Last X (timestamp)
- y: forecastLow[forecastLow.length - 1][1], // Last Y (Average value)
- xAxis: 0,
- yAxis: 0,
- },
- text: `
Low$${forecastLow[forecastLow.length - 1][1]}`,
- useHTML: true,
- style: {
- backgroundColor: "rgba(0, 0, 0, 0.8)",
- borderColor: "rgba(255, 255, 255, 0.2)",
- borderWidth: 1,
- fontSize: "12px",
- fontWeight: "bold",
- },
- align: "top",
- verticalAlign: "middle",
- x: -10,
- y: -40,
- backgroundColor: "rgba(0, 0, 0, 0.8)",
- borderColor: "rgba(255, 255, 255, 0.2)",
- borderWidth: 1,
- padding: 5,
- shape: "",
- },
- ],
- },
- ],
- */
legend: {
enabled: false,
@@ -477,7 +406,7 @@
$: {
if ($mode) {
configScore = getAIScorePlot() || null;
- config = getAIScorePlot() || null;
+ config = getPriceForecastChart() || null;
}
}
@@ -494,13 +423,100 @@
>
-
-
- {removeCompanyStrings($displayCompanyName)} Trend Forecast
-
-
+ {#if Object?.keys(data?.getPriceAnalysis)?.length > 0}
+
+
+ {removeCompanyStrings($displayCompanyName)} AI Score
+
+
+
+
+
+
+
+
+
+
+
+ | Date | Q1 '23 |
+ Q2 '23 |
+ Q3 '23 |
+ Q4 '23 |
+ | Score |
+ 8 (Bullish) |
+ 9 (Bullish) |
+ 8 (Bullish) |
+ 7 (Hold) |
+ | QoQ Change |
+ 0
+ ? "before:content-['+'] text-green-600 dark:text-[#00FC50]"
+ : "text-red-600 dark:text-[#FF2F1F]"}
+ >{lowChange}% |
+ 0
+ ? "before:content-['+'] text-green-600 dark:text-[#00FC50]"
+ : "text-red-600 dark:text-[#FF2F1F]"}
+ >{avgChange}% |
+ 0
+ ? "before:content-['+'] text-green-600 dark:text-[#00FC50]"
+ : "text-red-600 dark:text-[#FF2F1F]"}
+ >{medianChange}% |
+ 0
+ ? "before:content-['+'] text-green-600 dark:text-[#00FC50]"
+ : "text-red-600 dark:text-[#FF2F1F]"}
+ >{highChange}% |
+
+
+
+
+ Following the AI Score for {removeCompanyStrings(
+ $displayCompanyName,
+ )} the model shows that the total return would be
+ +22.2%, with a maximum drawdown of
+ -12% based on the backtesting results.
+
+
+
+
+ {/if}
{#if Object?.keys(data?.getPriceAnalysis)?.length > 0}
+
+
+ {removeCompanyStrings($displayCompanyName)} Trend Forecast
+
+