From 6e890170110472586eaaea058f178326d9749385 Mon Sep 17 00:00:00 2001 From: Noir97 <37800725+Noir97@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:45:47 +0800 Subject: [PATCH] Update README.md --- fingpt/FinGPT_Forecaster/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/fingpt/FinGPT_Forecaster/README.md b/fingpt/FinGPT_Forecaster/README.md index 77fa64c..ca90806 100644 --- a/fingpt/FinGPT_Forecaster/README.md +++ b/fingpt/FinGPT_Forecaster/README.md @@ -74,6 +74,35 @@ answer = re.sub(r'.*\[/INST\]\s*', '', output, flags=re.DOTALL) # don't forget t ## Data Preparation Company profile & Market news & Basic financials & Stock prices are retrieved using **yfinance & finnhub**. +Prompts used are organized as below: + +``` +SYSTEM_PROMPT = "You are a seasoned stock market analyst. Your task is to list the positive developments and potential concerns for companies based on relevant news and basic financials from the past weeks, then provide an analysis and prediction for the companies' stock price movement for the upcoming week. Your answer format should be as follows:\n\n[Positive Developments]:\n1. ...\n\n[Potential Concerns]:\n1. ...\n\n[Prediction & Analysis]:\n...\n" + +prompt = """ +[Company Introduction]: + +{name} is a leading entity in the {finnhubIndustry} sector. Incorporated and publicly traded since {ipo}, the company has established its reputation as one of the key players in the market. As of today, {name} has a market capitalization of {marketCapitalization:.2f} in {currency}, with {shareOutstanding:.2f} shares outstanding. {name} operates primarily in the {country}, trading under the ticker {ticker} on the {exchange}. As a dominant force in the {finnhubIndustry} space, the company continues to innovate and drive progress within the industry. + +From {startDate} to {endDate}, {name}'s stock price {increase/decrease} from {startPrice} to {endPrice}. Company news during this period are listed below: + +[Headline]: ... +[Summary]: ... + +[Headline]: ... +[Summary]: ... + +Some recent basic financials of {name}, reported at {date}, are presented below: + +[Basic Financials]: +{attr1}: {value1} +{attr2}: {value2} +... + +Based on all the information before {curday}, let's first analyze the positive developments and potential concerns for {symbol}. Come up with 2-4 most important factors respectively and keep them concise. Most factors should be inferred from company-related news. Then make your prediction of the {symbol} stock price movement for next week ({period}). Provide a summary analysis to support your prediction. + +""" +``` ## Train your own FinGPT-Forecaster