diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 00000000..a783d1a9 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +# Contributors + +- Kamlesh (@your-github-username) — Documentation improvements, added run_stock_sentiment example, and created docs/FAQ.md diff --git a/README.md b/README.md index 96d72d38..b2189550 100644 --- a/README.md +++ b/README.md @@ -370,6 +370,18 @@ on Reasoning, Hallucination, and Interactivity](https://arxiv.org/pdf/2302.04023 ``` + + +**Disclaimer: We are sharing codes for academic purposes under the MIT education license. Nothing herein is financial advice, and NOT a recommendation to trade real money. Please use common sense and always first consult a professional before trading or investing.** + +> Note: Installation may require Python 3.9+. + +> ## Examples and Help +> Please see [examples/hello_fingpt/hello.py](examples/hello_fingpt/hello.py) for a simple script that downloads CNBC news about AAPL. +- Quick example: see [`examples/run_stock_sentiment.py`](examples/run_stock_sentiment.py) to download CNBC news for a given ticker (default TSLA). +- First-time issues: see [`docs/FAQ.md`](docs/FAQ.md). + +
@@ -379,6 +391,3 @@ on Reasoning, Hallucination, and Interactivity](https://arxiv.org/pdf/2302.04023 ## LICENSE MIT License - -**Disclaimer: We are sharing codes for academic purposes under the MIT education license. Nothing herein is financial advice, and NOT a recommendation to trade real money. Please use common sense and always first consult a professional before trading or investing.** - diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 00000000..34e89829 --- /dev/null +++ b/docs/FAQ.md @@ -0,0 +1,21 @@ +# FinGPT FAQ (Getting Started) + +### 1) I installed packages but import fails with `ModuleNotFoundError` +Ensure you installed dependencies in the same Python environment you are running. +Confirm with: +python -c "import sys; print(sys.executable)" + +If needed, reinstall: + >> pip install -r requirements.txt + +### 2) Which Python version should I use +Prefer a recent Python 3 version supported by the project. If installation fails, try Python 3.9 or later. + +### 3) How do I quickly verify my environment +Run the example: + >> python examples/run_stock_sentiment.py + +You should see a small table of CNBC news for TSLA. + +### 4) I do not see my contributions under my GitHub profile +Make sure your commit email matches the email registered on your GitHub account. You can use the GitHub no reply email as well. diff --git a/examples/hello_fingpt/hello.py b/examples/hello_fingpt/hello.py new file mode 100644 index 00000000..1689137b --- /dev/null +++ b/examples/hello_fingpt/hello.py @@ -0,0 +1,6 @@ +from finnlp.data_sources.news.cnbc import CNBC + +if __name__ == "__main__": + loader = CNBC() + loader.download_news(stock="AAPL") + print(loader.data.head()) diff --git a/examples/run_stock_sentiment.py b/examples/run_stock_sentiment.py new file mode 100644 index 00000000..336a344e --- /dev/null +++ b/examples/run_stock_sentiment.py @@ -0,0 +1,16 @@ +""" +Minimal example: download CNBC news for TSLA and show the first rows. +This helps first-time users verify their environment quickly. +""" + +from finnlp.data_sources.news.cnbc import CNBC + +def main() -> None: + loader = CNBC() + # You may change TSLA to any ticker string accepted by CNBC loader + loader.download_news(stock="TSLA") + # Print only a few rows to keep output small + print(loader.data.head()) + +if __name__ == "__main__": + main()